KIO
kfileplacesitem.cpp
36KFilePlacesItem::KFilePlacesItem(KBookmarkManager *manager, const QString &address, const QString &udi, KFilePlacesModel *parent)
63 // Hide SSHFS network device mounted by kdeconnect, since we already have the kdeconnect:// place.
69 auto it = std::find_if(mountPoints.cbegin(), mountPoints.cend(), [&storageFilePath](const KMountPoint::Ptr &mountPoint) {
189 } else if (protocol == QLatin1String("bluetooth") || protocol == QLatin1String("obexftp") || protocol == QLatin1String("kdeconnect")) {
193 } else if (protocol == QLatin1String("remote") || KProtocolInfo::protocolClass(protocol) != QLatin1String(":local")) {
267 m_bookmark.setMetaDataItem(QStringLiteral("IsHidden"), hide ? QStringLiteral("true") : QStringLiteral("false"));
286 if (type != KFilePlacesModel::RecentlySavedType && type != KFilePlacesModel::SearchForType && type != KFilePlacesModel::TagsType) {
333 return i18nc("@info:tooltip path (mounted from)", "%1 (from %2)", m_access->filePath(), mountedFrom);
418KBookmark KFilePlacesItem::createBookmark(KBookmarkManager *manager, const QString &label, const QUrl &url, const QString &iconName, KFilePlacesItem *after)
448 KBookmark bookmark = createBookmark(manager, QString::fromUtf8(untranslatedLabel), url, iconName);
458KBookmark KFilePlacesItem::createDeviceBookmark(KBookmarkManager *manager, const Solid::Device &device)
480 KBookmark bookmark = createBookmark(manager, tag, QUrl(QLatin1String("tags:/") + tag), QStringLiteral("tag"));
495 return QString::number(QDateTime::currentSecsSinceEpoch()) + QLatin1Char('/') + QString::number(count++);
559 connect(m_access.data(), &Solid::StorageAccess::accessibilityChanged, this, &KFilePlacesItem::onAccessibilityChanged);
591 m_isCdrom = m_device.is<Solid::OpticalDrive>() || m_opticalDrive || (m_volume && m_volume->fsType() == QLatin1String("iso9660"));
bool moveBookmark(const KBookmark &bookmark, const KBookmark &after)
KBookmark createNewSeparator()
KBookmark addBookmark(const KBookmark &bm)
KBookmarkGroup root() const
QString text() const
QString icon() const
void setMetaDataItem(const QString &key, const QString &value, MetaDataOverwriteMode mode=OverwriteMetaData)
bool isNull() const
QUrl url() const
QString metaDataItem(const QString &key) const
KConfigGroup group(const QString &group)
QString readEntry(const char *key, const char *aDefault=nullptr) const
SimpleConfig
@ GroupRole
The name of the group, for example "Remote" or "Devices".
Definition kfileplacesmodel.h:73
@ TeardownOverlayRecommendedRole
roleName is "isTeardownOverlayRecommended".
Definition kfileplacesmodel.h:104
@ CapacityBarRecommendedRole
Whether the place should have its free space displayed in a capacity bar.
Definition kfileplacesmodel.h:67
@ FixedDeviceRole
Whether the place is a fixed device (neither hotpluggable nor removable).
Definition kfileplacesmodel.h:61
static List currentMountPoints(DetailsNeededFlags infoNeeded=BasicInfoNeeded)
Returns a list of all current mountpoints.
Definition kmountpoint.cpp:285
static QString protocolClass(const QString &protocol)
Returns the protocol class for the specified protocol.
Definition kprotocolinfo.cpp:250
QString device() const
QString udi() const
QString displayName() const
static Device storageAccessFromPath(const QString &path)
bool isValid() const
DevIface * as()
void ejectDone(Solid::ErrorType error, QVariant errorData, const QString &udi)
void ejectRequested(const QString &udi)
void setupRequested(const QString &udi)
void accessibilityChanged(bool accessible, const QString &udi)
void teardownRequested(const QString &udi)
void teardownDone(Solid::ErrorType error, QVariant errorData, const QString &udi)
void setupDone(Solid::ErrorType error, QVariant errorData, const QString &udi)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
Type type(const QSqlDatabase &db)
QIcon addOverlays(const QIcon &icon, const QHash< Qt::Corner, QIcon > &overlays)
QString path(const QString &relativePath)
char * data()
qint64 currentSecsSinceEpoch()
QString homePath()
QString rootPath()
QIcon fromTheme(const QString &name)
T & first()
bool isEmpty() const const
QObject * parent() const const
void chop(qsizetype n)
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
bool endsWith(QChar c, Qt::CaseSensitivity cs) const const
QString fromUtf8(QByteArrayView str)
bool isEmpty() const const
QString number(double n, char format, int precision)
QString section(QChar sep, qsizetype start, qsizetype end, SectionFlags flags) const const
QByteArray toUtf8() const const
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
lightGray
BackgroundRole
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
PreferLocalFile
QString scheme() const const
void setHost(const QString &host, ParsingMode mode)
void setPath(const QString &path, ParsingMode mode)
void setScheme(const QString &scheme)
QString toDisplayString(FormattingOptions options) const const
QString toString(FormattingOptions options) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.