KFile
kfileplacesmodel.cpp
Go to the documentation of this file.
141 // Force bookmarks to be saved. If on open/save dialog and the bookmarks are not saved, QFile::exists
142 // will always return false, which opening/closing all the time the open/save dialog would case the
143 // bookmarks to be added once each time, having lots of times each bookmark. This forces the defaults
144 // to be saved on the bookmarks.xml file. Of course, the complete list of bookmarks (those that come from
149 // create after, so if we have own places, they are added afterwards, in case of equal priorities
152 QString predicate("[[[[ StorageVolume.ignored == false AND [ StorageVolume.usage == 'FileSystem' OR StorageVolume.usage == 'Encrypted' ]]"
407 if (it_i+1!=end_i && (*(it_i+1))->id()==(*it_c)->id()) { // if the next one matches, it's a remove
665 void KFilePlacesModel::editPlace(const QModelIndex &index, const QString &text, const KUrl &url,
866 void KFilePlacesModel::Private::_k_storageTeardownDone(Solid::ErrorType error, QVariant errorData)
void message(KMessage::MessageType messageType, const QString &text, const QString &caption=QString())
QString i18n(const char *text)
bool moveBookmark(const KBookmark &bookmark, const KBookmark &after)
I18N_NOOP2("KCharSelect section name","European Alphabets")
DevIface * as()
static KBookmark createBookmark(KBookmarkManager *manager, const QString &label, const KUrl &url, const QString &iconName, KFilePlacesItem *after=0)
Definition: kfileplacesitem.cpp:234
void setPlaceHidden(const QModelIndex &index, bool hidden)
Definition: kfileplacesmodel.cpp:703
void requestSetup(const QModelIndex &index)
Definition: kfileplacesmodel.cpp:823
void populateMimeData(QMimeData *mimeData, const KUrl::MetaDataMap &metaData=MetaDataMap(), MimeDataFlags flags=DefaultMimeDataFlags) const
SOLID_EXPORT Notifier * notifier()
bool isDevice(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:208
static bool isKnownProtocol(const KUrl &url)
MimetypeJob * mimetype(const KUrl &url, JobFlags flags=DefaultFlags)
QString label(StandardShortcut id)
QModelIndex parent(const QModelIndex &child) const
Get the parent QModelIndex for the given model child.
Definition: kfileplacesmodel.cpp:266
static KBookmark createSystemBookmark(KBookmarkManager *manager, const QString &untranslatedLabel, const QString &translatedLabel, const KUrl &url, const QString &iconName)
Definition: kfileplacesitem.cpp:261
static QString mimetype(const KUrl &url, QWidget *window)
void setupDone(const QModelIndex &index, bool success)
void requestTeardown(const QModelIndex &index)
Definition: kfileplacesmodel.cpp:792
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Get the children model index for the given row and column.
Definition: kfileplacesmodel.cpp:255
void setIcon(const QString &icon)
Definition: kfileplacesmodel.h:45
QString text(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:198
void addPlace(const QString &text, const KUrl &url, const QString &iconName=QString(), const QString &appName=QString())
Definition: kfileplacesmodel.cpp:640
Qt::ItemFlags flags(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:489
QAction * teardownActionForIndex(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:733
void requestEject(const QModelIndex &index)
Definition: kfileplacesmodel.cpp:805
bool isParentOf(const KUrl &u) const
bool setupNeeded(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:188
static KBookmarkManager * managerForFile(const QString &bookmarksFile, const QString &dbusObjectName)
QVariant data(const QModelIndex &index, int role) const
Get a visible data based on Qt role for the given index.
Definition: kfileplacesmodel.cpp:246
int rowCount(const QModelIndex &parent=QModelIndex()) const
Get the number of rows for a model index.
Definition: kfileplacesmodel.cpp:272
bool eject()
bool isAccessible() const
Qt::DropActions supportedDropActions() const
Definition: kfileplacesmodel.cpp:484
ErrorType
bool isHidden(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:203
void removePlace(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:687
KIcon icon(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:193
static KUrl::List fromMimeData(const QMimeData *mimeData, KUrl::MetaDataMap *metaData=0)
static QList< Device > listFromQuery(const Predicate &predicate, const QString &parentUdi=QString())
void setFullText(const QString &fullText)
QModelIndex closestItem(const KUrl &url) const
Returns the closest item for the URL url.
Definition: kfileplacesmodel.cpp:287
Definition: kfileplacesitem_p.h:40
KBookmark bookmarkForIndex(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:232
Solid::Device deviceForIndex(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:218
static Predicate fromString(const QString &predicate)
int columnCount(const QModelIndex &parent=QModelIndex()) const
Get the number of columns for a model index.
Definition: kfileplacesmodel.cpp:280
KFilePlacesModel(QObject *parent=0)
Definition: kfileplacesmodel.cpp:93
bool is() const
QAction * ejectActionForIndex(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:777
QString udi() const
QString componentName() const
QStringList types(Mode mode=Writing)
QString metaDataItem(const QString &key) const
Device parent() const
QString homeDir(const QString &user)
void setMetaDataItem(const QString &key, const QString &value, MetaDataOverwriteMode mode=OverwriteMetaData)
void editPlace(const QModelIndex &index, const QString &text, const KUrl &url, const QString &iconName=QString(), const QString &appName=QString())
Definition: kfileplacesmodel.cpp:665
void errorMessage(const QString &message)
QString fileName(const DirectoryOptions &options=IgnoreTrailingSlash) const
static QString locateLocal(const char *type, const QString &filename, const KComponentData &cData=KGlobal::mainComponent())
int access(const QString &path, int mode)
const KComponentData & mainComponent()
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
static KBookmark createDeviceBookmark(KBookmarkManager *manager, const QString &udi)
Definition: kfileplacesitem.cpp:277
bool teardown()
QMimeData * mimeData(const QModelIndexList &indexes) const
Definition: kfileplacesmodel.cpp:516
void setUrl(const KUrl &url)
bool isNull() const
KBookmark next(const KBookmark ¤t) const
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
Definition: kfileplacesmodel.cpp:540
KBookmark first() const
static QString _k_internalMimetype(const KFilePlacesModel *const self)
Definition: kfileplacesmodel.cpp:502
QString prettyUrl(AdjustPathOption trailing=LeaveTrailingSlash) const
bool setup()
QString address() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:52:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:52:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.