KFile
kfileplacesmodel.cpp
Go to the documentation of this file.
138 // Force bookmarks to be saved. If on open/save dialog and the bookmarks are not saved, QFile::exists
139 // will always return false, which opening/closing all the time the open/save dialog would case the
140 // bookmarks to be added once each time, having lots of times each bookmark. This forces the defaults
141 // to be saved on the bookmarks.xml file. Of course, the complete list of bookmarks (those that come from
146 QString predicate("[[[[ StorageVolume.ignored == false AND [ StorageVolume.usage == 'FileSystem' OR StorageVolume.usage == 'Encrypted' ]]"
401 if (it_i+1!=end_i && (*(it_i+1))->id()==(*it_c)->id()) { // if the next one matches, it's a remove
659 void KFilePlacesModel::editPlace(const QModelIndex &index, const QString &text, const KUrl &url,
860 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)
QUrl toUrl() const
void clear()
bool moveBookmark(const KBookmark &bookmark, const KBookmark &after)
QString & append(QChar ch)
QByteArray data(const QString &mimeType) const
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:697
void requestSetup(const QModelIndex &index)
Definition: kfileplacesmodel.cpp:817
bool beginMoveRows(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationChild)
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:202
static bool isKnownProtocol(const KUrl &url)
virtual bool hasFormat(const QString &mimeType) const
virtual QMap< int, QVariant > itemData(const QModelIndex &index) const
QString & prepend(QChar ch)
MimetypeJob * mimetype(const KUrl &url, JobFlags flags=DefaultFlags)
QString label(StandardShortcut id)
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:786
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:249
void setIcon(const QString &icon)
Definition: kfileplacesmodel.h:45
QString text(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:192
void addPlace(const QString &text, const KUrl &url, const QString &iconName=QString(), const QString &appName=QString())
Definition: kfileplacesmodel.cpp:634
iterator erase(iterator pos)
bool exists() const
Qt::ItemFlags flags(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:483
QAction * teardownActionForIndex(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:727
void requestEject(const QModelIndex &index)
Definition: kfileplacesmodel.cpp:799
bool isParentOf(const KUrl &u) const
bool setupNeeded(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:182
QVariant data(const QModelIndex &index, int role) const
Get a visible data based on Qt role for the given index.
Definition: kfileplacesmodel.cpp:240
int rowCount(const QModelIndex &parent=QModelIndex()) const
Get the number of rows for a model index.
Definition: kfileplacesmodel.cpp:266
bool eject()
int indexOf(const T &value, int from) const
bool isAccessible() const
Qt::DropActions supportedDropActions() const
Definition: kfileplacesmodel.cpp:478
ErrorType
bool isValid() const
QString number(int n, int base)
bool isValid() const
bool isHidden(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:197
void removePlace(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:681
KIcon icon(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:187
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
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:281
bool isEmpty() const
QString absoluteFilePath() const
bool isEmpty() const
Definition: kfileplacesitem_p.h:40
int row() const
KBookmark bookmarkForIndex(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:226
Solid::Device deviceForIndex(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:212
void endMoveRows()
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:274
KFilePlacesModel(QObject *parent=0)
Definition: kfileplacesmodel.cpp:90
bool is() const
QString localxdgdatadir() const
void * internalPointer() const
QAction * ejectActionForIndex(const QModelIndex &index) const
Definition: kfileplacesmodel.cpp:771
static KBookmarkManager * managerForExternalFile(const QString &bookmarksFile)
QFileInfoList drives()
QString udi() const
QString componentName() const
QModelIndex createIndex(int row, int column, void *ptr) const
QStringList types(Mode mode=Writing)
iterator end()
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:659
QString & replace(int position, int n, QChar after)
bool isValid() const
bool remove(const T &value)
void errorMessage(const QString &message)
typedef DropActions
QString fileName(const DirectoryOptions &options=IgnoreTrailingSlash) const
void insert(int i, const T &value)
int access(const QString &path, int mode)
const KComponentData & mainComponent()
int length() const
bool toBool() const
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
static KBookmark createDeviceBookmark(KBookmarkManager *manager, const QString &udi)
Definition: kfileplacesitem.cpp:277
virtual QStringList formats() const
bool isValid() const
bool teardown()
void setData(const QString &mimeType, const QByteArray &data)
QMimeData * mimeData(const QModelIndexList &indexes) const
Definition: kfileplacesmodel.cpp:510
void setUrl(const KUrl &url)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const
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:534
QString toString() const
KBookmark first() const
iterator begin()
static QString _k_internalMimetype(const KFilePlacesModel *const self)
Definition: kfileplacesmodel.cpp:496
QString prettyUrl(AdjustPathOption trailing=LeaveTrailingSlash) const
bool setup()
QString address() const
singleShot
typedef ItemFlags
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:27:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:27:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.