Qt 4.8
Public Types | Public Functions | Public Variables | Private Slots | Private Functions | Properties | List of all members
QUrlModel Class Reference

#include <qsidebar_p.h>

Inheritance diagram for QUrlModel:
QStandardItemModel QAbstractItemModel QObject

Public Types

enum  Roles { UrlRole = Qt::UserRole + 1, EnabledRole = Qt::UserRole + 2 }
 

Public Functions

void addUrls (const QList< QUrl > &urls, int row=-1, bool move=true)
 Add urls list into the list at row. More...
 
bool canDrop (QDragEnterEvent *event)
 Decide based upon the data if it should be accepted or not. More...
 
bool dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
 Reimplemented Function More...
 
Qt::ItemFlags flags (const QModelIndex &index) const
 Reimplemented Function More...
 
QMimeDatamimeData (const QModelIndexList &indexes) const
 Reimplemented Function More...
 
QStringList mimeTypes () const
 Reimplemented Function More...
 
 QUrlModel (QObject *parent=0)
 QUrlModel lets you have indexes from a QFileSystemModel to a list. More...
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
 Reimplemented Function More...
 
void setFileSystemModel (QFileSystemModel *model)
 QFileSystemModel to get index's from, clears existing rows. More...
 
void setUrls (const QList< QUrl > &list)
 
QList< QUrlurls () const
 Return the complete list of urls in a QList. More...
 
- Public Functions inherited from QStandardItemModel
void appendColumn (const QList< QStandardItem *> &items)
 Appends a column containing items. More...
 
void appendRow (const QList< QStandardItem *> &items)
 Appends a row containing items. More...
 
void appendRow (QStandardItem *item)
 
void clear ()
 Removes all items (including header items) from the model and sets the number of rows and columns to zero. More...
 
int columnCount (const QModelIndex &parent=QModelIndex()) const
 Reimplemented Function More...
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 Reimplemented Function More...
 
bool dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
 Reimplemented Function More...
 
QList< QStandardItem * > findItems (const QString &text, Qt::MatchFlags flags=Qt::MatchExactly, int column=0) const
 Returns a list of items that match the given text, using the given flags, in the given column. More...
 
Qt::ItemFlags flags (const QModelIndex &index) const
 Reimplemented Function More...
 
bool hasChildren (const QModelIndex &parent=QModelIndex()) const
 Reimplemented Function More...
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 Reimplemented Function More...
 
QStandardItemhorizontalHeaderItem (int column) const
 Returns the horizontal header item for column if one has been set; otherwise returns 0. More...
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
 Reimplemented Function More...
 
QModelIndex indexFromItem (const QStandardItem *item) const
 Returns the QModelIndex associated with the given item. More...
 
void insertColumn (int column, const QList< QStandardItem *> &items)
 Inserts a column at column containing items. More...
 
bool insertColumn (int column, const QModelIndex &parent=QModelIndex())
 Inserts a single column before the given column in the child items of the parent specified. More...
 
bool insertColumns (int column, int count, const QModelIndex &parent=QModelIndex())
 Reimplemented Function More...
 
void insertRow (int row, const QList< QStandardItem *> &items)
 Inserts a row at row containing items. More...
 
void insertRow (int row, QStandardItem *item)
 
bool insertRow (int row, const QModelIndex &parent=QModelIndex())
 Inserts a single row before the given row in the child items of the parent specified. More...
 
bool insertRows (int row, int count, const QModelIndex &parent=QModelIndex())
 Reimplemented Function More...
 
QStandardIteminvisibleRootItem () const
 Returns the model's invisible root item. More...
 
QStandardItemitem (int row, int column=0) const
 Returns the item for the given row and column if one has been set; otherwise returns 0. More...
 
QMap< int, QVariantitemData (const QModelIndex &index) const
 Reimplemented Function More...
 
QStandardItemitemFromIndex (const QModelIndex &index) const
 Returns a pointer to the QStandardItem associated with the given index. More...
 
const QStandardItemitemPrototype () const
 Returns the item prototype used by the model. More...
 
QMimeDatamimeData (const QModelIndexList &indexes) const
 Reimplemented Function More...
 
QStringList mimeTypes () const
 Reimplemented Function More...
 
QModelIndex parent (const QModelIndex &child) const
 Reimplemented Function More...
 
 QStandardItemModel (QObject *parent=0)
 Constructs a new item model with the given parent. More...
 
 QStandardItemModel (int rows, int columns, QObject *parent=0)
 Constructs a new item model that initially has rows rows and columns columns, and that has the given parent. More...
 
bool removeColumns (int column, int count, const QModelIndex &parent=QModelIndex())
 Reimplemented Function More...
 
bool removeRows (int row, int count, const QModelIndex &parent=QModelIndex())
 Reimplemented Function More...
 
int rowCount (const QModelIndex &parent=QModelIndex()) const
 Reimplemented Function More...
 
void setColumnCount (int columns)
 Sets the number of columns in this model to columns. More...
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
 Reimplemented Function More...
 
bool setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole)
 Reimplemented Function More...
 
void setHorizontalHeaderItem (int column, QStandardItem *item)
 Sets the horizontal header item for column to item. More...
 
void setHorizontalHeaderLabels (const QStringList &labels)
 Sets the horizontal header labels using labels. More...
 
void setItem (int row, int column, QStandardItem *item)
 Sets the item for the given row and column to item. More...
 
void setItem (int row, QStandardItem *item)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
bool setItemData (const QModelIndex &index, const QMap< int, QVariant > &roles)
 Reimplemented Function More...
 
void setItemPrototype (const QStandardItem *item)
 Sets the item prototype for the model to the specified item. More...
 
void setRowCount (int rows)
 Sets the number of rows in this model to rows. More...
 
void setSortRole (int role)
 
void setVerticalHeaderItem (int row, QStandardItem *item)
 Sets the vertical header item for row to item. More...
 
void setVerticalHeaderLabels (const QStringList &labels)
 Sets the vertical header labels using labels. More...
 
void sort (int column, Qt::SortOrder order=Qt::AscendingOrder)
 Reimplemented Function More...
 
int sortRole () const
 
Qt::DropActions supportedDropActions () const
 QStandardItemModel supports both copy and move. More...
 
QList< QStandardItem * > takeColumn (int column)
 Removes the given column without deleting the column items, and returns a list of pointers to the removed items. More...
 
QStandardItemtakeHorizontalHeaderItem (int column)
 Removes the horizontal header item at column from the header without deleting it, and returns a pointer to the item. More...
 
QStandardItemtakeItem (int row, int column=0)
 Removes the item at (row, column) without deleting it. More...
 
QList< QStandardItem * > takeRow (int row)
 Removes the given row without deleting the row items, and returns a list of pointers to the removed items. More...
 
QStandardItemtakeVerticalHeaderItem (int row)
 Removes the vertical header item at row from the header without deleting it, and returns a pointer to the item. More...
 
QStandardItemverticalHeaderItem (int row) const
 Returns the vertical header item for row row if one has been set; otherwise returns 0. More...
 
 ~QStandardItemModel ()
 Destructs the model. More...
 
- Public Functions inherited from QAbstractItemModel
virtual QModelIndex buddy (const QModelIndex &index) const
 Returns a model index for the buddy of the item represented by index. More...
 
virtual bool canFetchMore (const QModelIndex &parent) const
 Returns true if there is more data available for parent; otherwise returns false. More...
 
virtual void fetchMore (const QModelIndex &parent)
 Fetches any available data for the items with the parent specified by the parent index. More...
 
bool hasIndex (int row, int column, const QModelIndex &parent=QModelIndex()) const
 Returns true if the model returns a valid QModelIndex for row and column with parent, otherwise returns false. More...
 
bool insertColumn (int column, const QModelIndex &parent=QModelIndex())
 Inserts a single column before the given column in the child items of the parent specified. More...
 
bool insertRow (int row, const QModelIndex &parent=QModelIndex())
 Inserts a single row before the given row in the child items of the parent specified. More...
 
virtual QModelIndexList match (const QModelIndex &start, int role, const QVariant &value, int hits=1, Qt::MatchFlags flags=Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const
 Returns a list of indexes for the items in the column of the start index where data stored under the given role matches the specified value. More...
 
 QAbstractItemModel (QObject *parent=0)
 Constructs an abstract item model with the given parent. More...
 
bool removeColumn (int column, const QModelIndex &parent=QModelIndex())
 Removes the given column from the child items of the parent specified. More...
 
bool removeRow (int row, const QModelIndex &parent=QModelIndex())
 Removes the given row from the child items of the parent specified. More...
 
const QHash< int, QByteArray > & roleNames () const
 Returns the model's role names. More...
 
void setSupportedDragActions (Qt::DropActions)
 Sets the supported drag actions for the items in the model. More...
 
QModelIndex sibling (int row, int column, const QModelIndex &idx) const
 Returns the sibling at row and column for the item at index, or an invalid QModelIndex if there is no sibling at that location. More...
 
virtual QSize span (const QModelIndex &index) const
 Returns the row and column span of the item represented by index. More...
 
Qt::DropActions supportedDragActions () const
 Returns the actions supported by the data in this model. More...
 
virtual ~QAbstractItemModel ()
 Destroys the abstract item model. More...
 
- Public Functions inherited from QObject
bool blockSignals (bool b)
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). More...
 
const QObjectListchildren () const
 Returns a list of child objects. More...
 
bool connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0)
 
bool disconnect (const QObject *receiver, const char *member=0)
 
void dumpObjectInfo ()
 Dumps information about signal connections, etc. More...
 
void dumpObjectTree ()
 Dumps a tree of children to the debug output. More...
 
QList< QByteArraydynamicPropertyNames () const
 Returns the names of all properties that were dynamically added to the object using setProperty(). More...
 
virtual bool event (QEvent *)
 This virtual function receives events to an object and should return true if the event e was recognized and processed. More...
 
virtual bool eventFilter (QObject *, QEvent *)
 Filters events if this object has been installed as an event filter for the watched object. More...
 
template<typename T >
findChild (const QString &aName=QString()) const
 Returns the child of this object that can be cast into type T and that is called name, or 0 if there is no such object. More...
 
template<typename T >
QList< T > findChildren (const QString &aName=QString()) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. More...
 
template<typename T >
QList< T > findChildren (const QRegExp &re) const
 
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false. More...
 
void installEventFilter (QObject *)
 Installs an event filter filterObj on this object. More...
 
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false. More...
 
void killTimer (int id)
 Kills the timer with timer identifier, id. More...
 
virtual const QMetaObjectmetaObject () const
 Returns a pointer to the meta-object of this object. More...
 
void moveToThread (QThread *thread)
 Changes the thread affinity for this object and its children. More...
 
QString objectName () const
 
QObjectparent () const
 Returns a pointer to the parent object. More...
 
QVariant property (const char *name) const
 Returns the value of the object's name property. More...
 
Q_INVOKABLE QObject (QObject *parent=0)
 Constructs an object with parent object parent. More...
 
void removeEventFilter (QObject *)
 Removes an event filter object obj from this object. More...
 
void setObjectName (const QString &name)
 
void setParent (QObject *)
 Makes the object a child of parent. More...
 
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value. More...
 
void setUserData (uint id, QObjectUserData *data)
 
bool signalsBlocked () const
 Returns true if signals are blocked; otherwise returns false. More...
 
int startTimer (int interval)
 Starts a timer and returns a timer identifier, or returns zero if it could not start a timer. More...
 
QThreadthread () const
 Returns the thread in which the object lives. More...
 
QObjectUserDatauserData (uint id) const
 
virtual ~QObject ()
 Destroys the object, deleting all its child objects. More...
 

Public Variables

bool showFullPath
 

Private Slots

void dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
 
void layoutChanged ()
 Re-get all of our data, anything could have changed! More...
 

Private Functions

void addIndexToWatch (const QString &path, const QModelIndex &index)
 
void changed (const QString &path)
 The following path changed data update our copy of that data. More...
 
void setUrl (const QModelIndex &index, const QUrl &url, const QModelIndex &dirIndex)
 

Properties

QFileSystemModelfileSystemModel
 
QList< QUrlinvalidUrls
 
QList< QPair< QModelIndex, QString > > watching
 

Additional Inherited Members

- Public Slots inherited from QAbstractItemModel
virtual void revert ()
 Lets the model know that it should discard cached information. More...
 
virtual bool submit ()
 Lets the model know that it should submit cached information to permanent storage. More...
 
- Public Slots inherited from QObject
void deleteLater ()
 Schedules this object for deletion. More...
 
- Signals inherited from QStandardItemModel
void itemChanged (QStandardItem *item)
 
- Signals inherited from QAbstractItemModel
void columnsAboutToBeInserted (const QModelIndex &parent, int first, int last)
 This signal is emitted just before columns are inserted into the model. More...
 
void columnsAboutToBeMoved (const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn)
 This signal is emitted just before columns are moved within the model. More...
 
void columnsAboutToBeRemoved (const QModelIndex &parent, int first, int last)
 This signal is emitted just before columns are removed from the model. More...
 
void columnsInserted (const QModelIndex &parent, int first, int last)
 This signal is emitted after columns have been inserted into the model. More...
 
void columnsMoved (const QModelIndex &parent, int start, int end, const QModelIndex &destination, int column)
 This signal is emitted after columns have been moved within the model. More...
 
void columnsRemoved (const QModelIndex &parent, int first, int last)
 This signal is emitted after columns have been removed from the model. More...
 
void dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
 This signal is emitted whenever the data in an existing item changes. More...
 
void headerDataChanged (Qt::Orientation orientation, int first, int last)
 This signal is emitted whenever a header is changed. More...
 
void layoutAboutToBeChanged ()
 This signal is emitted just before the layout of a model is changed. More...
 
void layoutChanged ()
 This signal is emitted whenever the layout of items exposed by the model has changed; for example, when the model has been sorted. More...
 
void modelAboutToBeReset ()
 This signal is emitted when reset() is called, before the model's internal state (e. More...
 
void modelReset ()
 This signal is emitted when reset() is called, after the model's internal state (e. More...
 
void rowsAboutToBeInserted (const QModelIndex &parent, int first, int last)
 This signal is emitted just before rows are inserted into the model. More...
 
void rowsAboutToBeMoved (const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow)
 This signal is emitted just before rows are moved within the model. More...
 
void rowsAboutToBeRemoved (const QModelIndex &parent, int first, int last)
 This signal is emitted just before rows are removed from the model. More...
 
void rowsInserted (const QModelIndex &parent, int first, int last)
 This signal is emitted after rows have been inserted into the model. More...
 
void rowsMoved (const QModelIndex &parent, int start, int end, const QModelIndex &destination, int row)
 This signal is emitted after rows have been moved within the model. More...
 
void rowsRemoved (const QModelIndex &parent, int first, int last)
 This signal is emitted after rows have been removed from the model. More...
 
- Signals inherited from QObject
void destroyed (QObject *=0)
 This signal is emitted immediately before the object obj is destroyed, and can not be blocked. More...
 
- Static Public Functions inherited from QObject
static bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 Creates a connection of the given type from the signal in the sender object to the method in the receiver object. More...
 
static bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 Disconnects signal in object sender from method in object receiver. More...
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static uint registerUserData ()
 
static QString tr (const char *sourceText, const char *comment=0, int n=-1)
 
static QString trUtf8 (const char *sourceText, const char *comment=0, int n=-1)
 
- Static Public Variables inherited from QObject
static const QMetaObject staticMetaObject
 This variable stores the meta-object for the class. More...
 
- Protected Slots inherited from QAbstractItemModel
void resetInternalData ()
 This slot is called just after the internal data of a model is cleared while it is being reset. More...
 
- Protected Functions inherited from QStandardItemModel
 QStandardItemModel (QStandardItemModelPrivate &dd, QObject *parent=0)
 
- Protected Functions inherited from QAbstractItemModel
void beginInsertColumns (const QModelIndex &parent, int first, int last)
 Begins a column insertion operation. More...
 
void beginInsertRows (const QModelIndex &parent, int first, int last)
 Begins a row insertion operation. More...
 
bool beginMoveColumns (const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationColumn)
 Begins a column move operation. More...
 
bool beginMoveRows (const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationRow)
 Begins a row move operation. More...
 
void beginRemoveColumns (const QModelIndex &parent, int first, int last)
 Begins a column removal operation. More...
 
void beginRemoveRows (const QModelIndex &parent, int first, int last)
 Begins a row removal operation. More...
 
void beginResetModel ()
 Begins a model reset operation. More...
 
void changePersistentIndex (const QModelIndex &from, const QModelIndex &to)
 Changes the QPersistentModelIndex that is equal to the given from model index to the given to model index. More...
 
void changePersistentIndexList (const QModelIndexList &from, const QModelIndexList &to)
 Changes the QPersistentModelIndexes that is equal to the indexes in the given from model index list to the given to model index list. More...
 
QModelIndex createIndex (int row, int column, void *data=0) const
 Creates a model index for the given row and column with the internal pointer ptr. More...
 
QModelIndex createIndex (int row, int column, int id) const
 Use QModelIndex QAbstractItemModel::createIndex(int row, int column, quint32 id) instead. More...
 
QModelIndex createIndex (int row, int column, quint32 id) const
 Creates a model index for the given row and column with the internal identifier, id. More...
 
bool decodeData (int row, int column, const QModelIndex &parent, QDataStream &stream)
 
void encodeData (const QModelIndexList &indexes, QDataStream &stream) const
 
void endInsertColumns ()
 Ends a column insertion operation. More...
 
void endInsertRows ()
 Ends a row insertion operation. More...
 
void endMoveColumns ()
 Ends a column move operation. More...
 
void endMoveRows ()
 Ends a row move operation. More...
 
void endRemoveColumns ()
 Ends a column removal operation. More...
 
void endRemoveRows ()
 Ends a row removal operation. More...
 
void endResetModel ()
 Completes a model reset operation. More...
 
QModelIndexList persistentIndexList () const
 Returns the list of indexes stored as persistent indexes in the model. More...
 
 QAbstractItemModel (QAbstractItemModelPrivate &dd, QObject *parent=0)
 
void reset ()
 Resets the model to its original state in any attached views. More...
 
void setRoleNames (const QHash< int, QByteArray > &roleNames)
 Sets the model's role names to roleNames. More...
 
- Protected Functions inherited from QObject
virtual void childEvent (QChildEvent *)
 This event handler can be reimplemented in a subclass to receive child events. More...
 
virtual void connectNotify (const char *signal)
 This virtual function is called when something has been connected to signal in this object. More...
 
virtual void customEvent (QEvent *)
 This event handler can be reimplemented in a subclass to receive custom events. More...
 
virtual void disconnectNotify (const char *signal)
 This virtual function is called when something has been disconnected from signal in this object. More...
 
 QObject (QObjectPrivate &dd, QObject *parent=0)
 
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal. More...
 
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns 0. More...
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *)
 This event handler can be reimplemented in a subclass to receive timer events for the object. More...
 
- Protected Variables inherited from QObject
QScopedPointer< QObjectDatad_ptr
 
- Static Protected Variables inherited from QObject
static const QMetaObject staticQtMetaObject
 

Detailed Description

Definition at line 75 of file qsidebar_p.h.

Enumerations

◆ Roles

Enumerator
UrlRole 
EnabledRole 

Definition at line 80 of file qsidebar_p.h.

Constructors and Destructors

◆ QUrlModel()

QUrlModel::QUrlModel ( QObject parent = 0)

QUrlModel lets you have indexes from a QFileSystemModel to a list.

When QFileSystemModel changes them QUrlModel will automatically update.

Example usage: File dialog sidebar and combo box

Definition at line 76 of file qsidebar.cpp.

76  : QStandardItemModel(parent), showFullPath(false), fileSystemModel(0)
77 {
78 }
bool showFullPath
Definition: qsidebar_p.h:100
QStandardItemModel(QObject *parent=0)
Constructs a new item model with the given parent.
QFileSystemModel * fileSystemModel
Definition: qsidebar_p.h:110

Functions

◆ addIndexToWatch()

void QUrlModel::addIndexToWatch ( const QString path,
const QModelIndex index 
)
private

◆ addUrls()

void QUrlModel::addUrls ( const QList< QUrl > &  list,
int  row = -1,
bool  move = true 
)

Add urls list into the list at row.

If move then movie existing ones to row.

See also
dropMimeData()

Definition at line 241 of file qsidebar.cpp.

Referenced by dropMimeData(), and setUrls().

242 {
243  if (row == -1)
244  row = rowCount();
245  row = qMin(row, rowCount());
246  for (int i = list.count() - 1; i >= 0; --i) {
247  QUrl url = list.at(i);
248  if (!url.isValid() || url.scheme() != QLatin1String("file"))
249  continue;
250  //this makes sure the url is clean
251  const QString cleanUrl = QDir::cleanPath(url.toLocalFile());
252  url = QUrl::fromLocalFile(cleanUrl);
253 
254  for (int j = 0; move && j < rowCount(); ++j) {
255  QString local = index(j, 0).data(UrlRole).toUrl().toLocalFile();
256 #if defined(Q_OS_WIN)
257  if (index(j, 0).data(UrlRole).toUrl().toLocalFile().toLower() == cleanUrl.toLower()) {
258 #else
259  if (index(j, 0).data(UrlRole).toUrl().toLocalFile() == cleanUrl) {
260 #endif
261  removeRow(j);
262  if (j <= row)
263  row--;
264  break;
265  }
266  }
267  row = qMax(row, 0);
268  QModelIndex idx = fileSystemModel->index(cleanUrl);
269  if (!fileSystemModel->isDir(idx))
270  continue;
271  insertRows(row, 1);
272  setUrl(index(row, 0), url, idx);
273  watching.append(qMakePair(idx, cleanUrl));
274  }
275 }
bool isValid() const
Returns true if the URL is valid; otherwise returns false.
Definition: qurl.cpp:4303
bool removeRow(int row, const QModelIndex &parent=QModelIndex())
Removes the given row from the child items of the parent specified.
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
QVariant data(int role=Qt::DisplayRole) const
Returns the data for the given role for the item referred to by the index.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Reimplemented Function
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
QFileSystemModel * fileSystemModel
Definition: qsidebar_p.h:110
The QUrl class provides a convenient interface for working with URLs.
Definition: qurl.h:61
The QString class provides a Unicode character string.
Definition: qstring.h:83
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Definition: qglobal.h:1217
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
void setUrl(const QModelIndex &index, const QUrl &url, const QModelIndex &dirIndex)
Definition: qsidebar.cpp:184
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Reimplemented Function
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
bool isDir(const QModelIndex &index) const
Returns true if the model item index represents a directory; otherwise returns false.
int rowCount(const QModelIndex &parent=QModelIndex()) const
Reimplemented Function
static QString cleanPath(const QString &path)
Removes all multiple directory separators "/" and resolves any "."s or ".."s found in the path...
Definition: qdir.cpp:2082
QList< QPair< QModelIndex, QString > > watching
Definition: qsidebar_p.h:111
QString toLocalFile() const
Returns the path of this URL formatted as a local file path.
Definition: qurl.cpp:6412
QUrl toUrl() const
Returns the variant as a QUrl if the variant has type() Url ; otherwise returns an invalid QUrl...
Definition: qvariant.cpp:2528
QString scheme() const
Returns the scheme of the URL.
Definition: qurl.cpp:4550
Q_OUTOFLINE_TEMPLATE QPair< T1, T2 > qMakePair(const T1 &x, const T2 &y)
Definition: qpair.h:102
QString toLower() const Q_REQUIRED_RESULT
Returns a lowercase copy of the string.
Definition: qstring.cpp:5389
The QModelIndex class is used to locate data in a data model.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Reimplemented Function
bool insertRows(int row, int count, const QModelIndex &parent=QModelIndex())
Reimplemented Function
static QUrl fromLocalFile(const QString &localfile)
Returns a QUrl representation of localFile, interpreted as a local file.
Definition: qurl.cpp:6374
static QUrl toUrl(Register *reg, int type, QDeclarativeContextData *context, bool *ok=0)

◆ canDrop()

bool QUrlModel::canDrop ( QDragEnterEvent event)

Decide based upon the data if it should be accepted or not.

We only accept dirs and not files

Definition at line 128 of file qsidebar.cpp.

Referenced by QSidebar::dragEnterEvent().

129 {
130  if (!event->mimeData()->formats().contains(mimeTypes().first()))
131  return false;
132 
133  const QList<QUrl> list = event->mimeData()->urls();
134  for (int i = 0; i < list.count(); ++i) {
135  QModelIndex idx = fileSystemModel->index(list.at(0).toLocalFile());
136  if (!fileSystemModel->isDir(idx))
137  return false;
138  }
139  return true;
140 }
virtual QStringList formats() const
Returns a list of formats supported by the object.
Definition: qmimedata.cpp:579
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
QFileSystemModel * fileSystemModel
Definition: qsidebar_p.h:110
QStringList mimeTypes() const
Reimplemented Function
Definition: qsidebar.cpp:83
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
bool isDir(const QModelIndex &index) const
Returns true if the model item index represents a directory; otherwise returns false.
QBool contains(const QString &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the list contains the string str; otherwise returns false.
Definition: qstringlist.h:172
QString toLocalFile() const
Returns the path of this URL formatted as a local file path.
Definition: qurl.cpp:6412
The QModelIndex class is used to locate data in a data model.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Reimplemented Function
const QMimeData * mimeData() const
Returns the data that was dropped on the widget and its associated MIME type information.
Definition: qevent.h:498

◆ changed()

void QUrlModel::changed ( const QString path)
private

The following path changed data update our copy of that data.

See also
layoutChanged() dataChanged()

Definition at line 360 of file qsidebar.cpp.

Referenced by dataChanged(), and layoutChanged().

361 {
362  for (int i = 0; i < rowCount(); ++i) {
363  QModelIndex idx = index(i, 0);
364  if (idx.data(UrlRole).toUrl().toLocalFile() == path) {
365  setData(idx, idx.data(UrlRole).toUrl());
366  }
367  }
368 }
QVariant data(int role=Qt::DisplayRole) const
Returns the data for the given role for the item referred to by the index.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Reimplemented Function
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Reimplemented Function
Definition: qsidebar.cpp:164
int rowCount(const QModelIndex &parent=QModelIndex()) const
Reimplemented Function
QString toLocalFile() const
Returns the path of this URL formatted as a local file path.
Definition: qurl.cpp:6412
QUrl toUrl() const
Returns the variant as a QUrl if the variant has type() Url ; otherwise returns an invalid QUrl...
Definition: qvariant.cpp:2528
The QModelIndex class is used to locate data in a data model.

◆ dataChanged

void QUrlModel::dataChanged ( const QModelIndex topLeft,
const QModelIndex bottomRight 
)
privateslot

Definition at line 319 of file qsidebar.cpp.

Referenced by setFileSystemModel().

320 {
321  QModelIndex parent = topLeft.parent();
322  for (int i = 0; i < watching.count(); ++i) {
323  QModelIndex index = watching.at(i).first;
324  if (index.model() && topLeft.model()) {
325  Q_ASSERT(index.model() == topLeft.model());
326  }
327  if ( index.row() >= topLeft.row()
328  && index.row() <= bottomRight.row()
329  && index.column() >= topLeft.column()
330  && index.column() <= bottomRight.column()
331  && index.parent() == parent) {
332  changed(watching.at(i).second);
333  }
334  }
335 }
void changed(const QString &path)
The following path changed data update our copy of that data.
Definition: qsidebar.cpp:360
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Reimplemented Function
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
QModelIndex parent() const
Returns the parent of the model index, or QModelIndex() if it has no parent.
int row() const
Returns the row this model index refers to.
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
const QAbstractItemModel * model() const
Returns a pointer to the model containing the item that this index refers to.
QList< QPair< QModelIndex, QString > > watching
Definition: qsidebar_p.h:111
QObject * parent() const
Returns a pointer to the parent object.
Definition: qobject.h:273
The QModelIndex class is used to locate data in a data model.
int column() const
Returns the column this model index refers to.

◆ dropMimeData()

bool QUrlModel::dropMimeData ( const QMimeData data,
Qt::DropAction  action,
int  row,
int  column,
const QModelIndex parent 
)
virtual

Reimplemented Function

Reimplemented from QAbstractItemModel.

Definition at line 145 of file qsidebar.cpp.

147 {
148  if (!data->formats().contains(mimeTypes().first()))
149  return false;
150  Q_UNUSED(action);
151  Q_UNUSED(column);
152  Q_UNUSED(parent);
153  addUrls(data->urls(), row);
154  return true;
155 }
virtual QStringList formats() const
Returns a list of formats supported by the object.
Definition: qmimedata.cpp:579
QStringList mimeTypes() const
Reimplemented Function
Definition: qsidebar.cpp:83
QBool contains(const QString &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the list contains the string str; otherwise returns false.
Definition: qstringlist.h:172
QList< QUrl > urls() const
Returns a list of URLs contained within the MIME data object.
Definition: qmimedata.cpp:310
void addUrls(const QList< QUrl > &urls, int row=-1, bool move=true)
Add urls list into the list at row.
Definition: qsidebar.cpp:241
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ flags()

Qt::ItemFlags QUrlModel::flags ( const QModelIndex index) const
virtual

Reimplemented Function

Reimplemented from QAbstractItemModel.

Definition at line 91 of file qsidebar.cpp.

92 {
93  Qt::ItemFlags flags = QStandardItemModel::flags(index);
94  if (index.isValid()) {
95  flags &= ~Qt::ItemIsEditable;
96  // ### some future version could support "moving" urls onto a folder
97  flags &= ~Qt::ItemIsDropEnabled;
98  }
99 
100  if (index.data(Qt::DecorationRole).isNull())
101  flags &= ~Qt::ItemIsEnabled;
102 
103  return flags;
104 }
QVariant data(int role=Qt::DisplayRole) const
Returns the data for the given role for the item referred to by the index.
bool isNull() const
Returns true if this is a NULL variant, false otherwise.
Definition: qvariant.cpp:3102
Qt::ItemFlags flags(const QModelIndex &index) const
Reimplemented Function
Definition: qsidebar.cpp:91
Qt::ItemFlags flags(const QModelIndex &index) const
Reimplemented Function
bool isValid() const
Returns true if this model index is valid; otherwise returns false.
Definition: qnamespace.h:54

◆ layoutChanged

void QUrlModel::layoutChanged ( )
privateslot

Re-get all of our data, anything could have changed!

Definition at line 340 of file qsidebar.cpp.

Referenced by setFileSystemModel().

341 {
342  QStringList paths;
343  for (int i = 0; i < watching.count(); ++i)
344  paths.append(watching.at(i).second);
345  watching.clear();
346  for (int i = 0; i < paths.count(); ++i) {
347  QString path = paths.at(i);
348  QModelIndex newIndex = fileSystemModel->index(path);
350  if (newIndex.isValid())
351  changed(path);
352  }
353 }
void changed(const QString &path)
The following path changed data update our copy of that data.
Definition: qsidebar.cpp:360
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
QFileSystemModel * fileSystemModel
Definition: qsidebar_p.h:110
The QString class provides a Unicode character string.
Definition: qstring.h:83
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
void clear()
Removes all items from the list.
Definition: qlist.h:764
QList< QPair< QModelIndex, QString > > watching
Definition: qsidebar_p.h:111
bool isValid() const
Returns true if this model index is valid; otherwise returns false.
The QModelIndex class is used to locate data in a data model.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Reimplemented Function

◆ mimeData()

QMimeData * QUrlModel::mimeData ( const QModelIndexList indexes) const
virtual

Reimplemented Function

Reimplemented from QAbstractItemModel.

Definition at line 109 of file qsidebar.cpp.

110 {
111  QList<QUrl> list;
112  for (int i = 0; i < indexes.count(); ++i) {
113  if (indexes.at(i).column() == 0)
114  list.append(indexes.at(i).data(UrlRole).toUrl());
115  }
116  QMimeData *data = new QMimeData();
117  data->setUrls(list);
118  return data;
119 }
QVariant data(int role=Qt::DisplayRole) const
Returns the data for the given role for the item referred to by the index.
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Reimplemented Function
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
void setUrls(const QList< QUrl > &urls)
Sets the URLs stored in the MIME data object to those specified by urls.
Definition: qmimedata.cpp:334
The QMimeData class provides a container for data that records information about its MIME type...
Definition: qmimedata.h:57
QUrl toUrl() const
Returns the variant as a QUrl if the variant has type() Url ; otherwise returns an invalid QUrl...
Definition: qvariant.cpp:2528
int column() const
Returns the column this model index refers to.

◆ mimeTypes()

QStringList QUrlModel::mimeTypes ( ) const
virtual

Reimplemented Function

Reimplemented from QAbstractItemModel.

Definition at line 83 of file qsidebar.cpp.

Referenced by canDrop(), and dropMimeData().

84 {
85  return QStringList(QLatin1String("text/uri-list"));
86 }
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QStringList class provides a list of strings.
Definition: qstringlist.h:66

◆ setData()

bool QUrlModel::setData ( const QModelIndex index,
const QVariant value,
int  role = Qt::EditRole 
)
virtual

Reimplemented Function

If the role is the UrlRole then handle otherwise just pass to QStandardItemModel

Reimplemented from QAbstractItemModel.

Definition at line 164 of file qsidebar.cpp.

Referenced by changed(), and setUrl().

165 {
166  if (value.type() == QVariant::Url) {
167  QUrl url = value.toUrl();
168  QModelIndex dirIndex = fileSystemModel->index(url.toLocalFile());
169  //On windows the popup display the "C:\", convert to nativeSeparators
170  if (showFullPath)
172  else {
175  }
179  return true;
180  }
181  return QStandardItemModel::setData(index, value, role);
182 }
bool showFullPath
Definition: qsidebar_p.h:100
QString toString() const
Returns the variant as a QString if the variant has type() String , Bool , ByteArray ...
Definition: qvariant.cpp:2270
QFileSystemModel * fileSystemModel
Definition: qsidebar_p.h:110
The QUrl class provides a convenient interface for working with URLs.
Definition: qurl.h:61
QString toLocalFile() const
Returns the path of this URL formatted as a local file path.
Definition: qurl.cpp:6412
QUrl toUrl() const
Returns the variant as a QUrl if the variant has type() Url ; otherwise returns an invalid QUrl...
Definition: qvariant.cpp:2528
Type type() const
Returns the storage type of the value stored in the variant.
Definition: qvariant.cpp:1901
The QModelIndex class is used to locate data in a data model.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Reimplemented Function
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Reimplemented Function
static QString toNativeSeparators(const QString &pathName)
Returns pathName with the &#39;/&#39; separators converted to separators that are appropriate for the underly...
Definition: qdir.cpp:812
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Reimplemented Function

◆ setFileSystemModel()

void QUrlModel::setFileSystemModel ( QFileSystemModel model)

QFileSystemModel to get index's from, clears existing rows.

Definition at line 291 of file qsidebar.cpp.

Referenced by QSidebar::init().

292 {
293  if (model == fileSystemModel)
294  return;
295  if (fileSystemModel != 0) {
298  disconnect(model, SIGNAL(layoutChanged()),
299  this, SLOT(layoutChanged()));
300  disconnect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
301  this, SLOT(layoutChanged()));
302  }
303  fileSystemModel = model;
304  if (fileSystemModel != 0) {
307  connect(model, SIGNAL(layoutChanged()),
308  this, SLOT(layoutChanged()));
309  connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
310  this, SLOT(layoutChanged()));
311  }
312  clear();
313  insertColumns(0, 1);
314 }
#define SLOT(a)
Definition: qobjectdefs.h:226
QFileSystemModel * fileSystemModel
Definition: qsidebar_p.h:110
#define SIGNAL(a)
Definition: qobjectdefs.h:227
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
Definition: qsidebar.cpp:319
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
bool insertColumns(int column, int count, const QModelIndex &parent=QModelIndex())
Reimplemented Function
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
Disconnects signal in object sender from method in object receiver.
Definition: qobject.cpp:2895
void layoutChanged()
Re-get all of our data, anything could have changed!
Definition: qsidebar.cpp:340
The QModelIndex class is used to locate data in a data model.
void clear()
Removes all items (including header items) from the model and sets the number of rows and columns to ...
void rowsRemoved(const QModelIndex &parent, int first, int last)
This signal is emitted after rows have been removed from the model.

◆ setUrl()

void QUrlModel::setUrl ( const QModelIndex index,
const QUrl url,
const QModelIndex dirIndex 
)
private

Definition at line 184 of file qsidebar.cpp.

Referenced by addUrls().

185 {
186  setData(index, url, UrlRole);
187  if (url.path().isEmpty()) {
190  } else {
191  QString newName;
192  if (showFullPath) {
193  //On windows the popup display the "C:\", convert to nativeSeparators
195  } else {
196  newName = dirIndex.data().toString();
197  }
198 
199  QIcon newIcon = qvariant_cast<QIcon>(dirIndex.data(Qt::DecorationRole));
200  if (!dirIndex.isValid()) {
202  newName = QFileInfo(url.toLocalFile()).fileName();
203  if (!invalidUrls.contains(url))
204  invalidUrls.append(url);
205  //The bookmark is invalid then we set to false the EnabledRole
206  setData(index, false, EnabledRole);
207  } else {
208  //The bookmark is valid then we set to true the EnabledRole
209  setData(index, true, EnabledRole);
210  }
211 
212  // Make sure that we have at least 32x32 images
213  const QSize size = newIcon.actualSize(QSize(32,32));
214  if (size.width() < 32) {
215  QPixmap smallPixmap = newIcon.pixmap(QSize(32, 32));
216  newIcon.addPixmap(smallPixmap.scaledToWidth(32, Qt::SmoothTransformation));
217  }
218 
219  if (index.data().toString() != newName)
220  setData(index, newName);
221  QIcon oldIcon = qvariant_cast<QIcon>(index.data(Qt::DecorationRole));
222  if (oldIcon.cacheKey() != newIcon.cacheKey())
223  setData(index, newIcon, Qt::DecorationRole);
224  }
225 }
void addPixmap(const QPixmap &pixmap, Mode mode=Normal, State state=Off)
Adds pixmap to the icon, as a specialization for mode and state.
Definition: qicon.cpp:814
QPixmap scaledToWidth(int w, Qt::TransformationMode mode=Qt::FastTransformation) const
Returns a scaled copy of the image.
Definition: qpixmap.cpp:1642
QVariant data(int role=Qt::DisplayRole) const
Returns the data for the given role for the item referred to by the index.
bool showFullPath
Definition: qsidebar_p.h:100
virtual QIcon icon(IconType type) const
Returns an icon set for the given type.
QString toString() const
Returns the variant as a QString if the variant has type() String , Bool , ByteArray ...
Definition: qvariant.cpp:2270
QFileSystemModel * fileSystemModel
Definition: qsidebar_p.h:110
The QString class provides a Unicode character string.
Definition: qstring.h:83
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Reimplemented Function
Definition: qsidebar.cpp:164
QFileIconProvider * iconProvider() const
Returns the file icon provider for this directory model.
QString path() const
Returns the path of the URL.
Definition: qurl.cpp:4977
int width() const
Returns the width.
Definition: qsize.h:126
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
QBool contains(const T &t) const
Returns true if the list contains an occurrence of value; otherwise returns false.
Definition: qlist.h:880
QList< QUrl > invalidUrls
Definition: qsidebar_p.h:112
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Definition: qstring.h:704
QVariant myComputer(int role=Qt::DisplayRole) const
Returns the data stored under the given role for the item "My Computer".
QString toLocalFile() const
Returns the path of this URL formatted as a local file path.
Definition: qurl.cpp:6412
bool isValid() const
Returns true if this model index is valid; otherwise returns false.
qint64 cacheKey() const
Returns a number that identifies the contents of this QIcon object.
Definition: qicon.cpp:679
QSize actualSize(const QSize &size, Mode mode=Normal, State state=Off) const
Returns the actual size of the icon for the requested size, mode, and state.
Definition: qicon.cpp:730
T qvariant_cast(const QVariant &)
Definition: qvariant.h:571
The QPixmap class is an off-screen image representation that can be used as a paint device...
Definition: qpixmap.h:71
QPixmap pixmap(const QSize &size, Mode mode=Normal, State state=Off) const
Returns a pixmap with the requested size, mode, and state, generating one if necessary.
Definition: qicon.cpp:693
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:60
static QString toNativeSeparators(const QString &pathName)
Returns pathName with the &#39;/&#39; separators converted to separators that are appropriate for the underly...
Definition: qdir.cpp:812
static QString fileName(const QString &fileUrl)
The QIcon class provides scalable icons in different modes and states.
Definition: qicon.h:60

◆ setUrls()

void QUrlModel::setUrls ( const QList< QUrl > &  list)

Definition at line 227 of file qsidebar.cpp.

Referenced by QSidebar::init().

228 {
229  removeRows(0, rowCount());
230  invalidUrls.clear();
231  watching.clear();
232  addUrls(list, 0);
233 }
QList< QUrl > invalidUrls
Definition: qsidebar_p.h:112
bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex())
Reimplemented Function
int rowCount(const QModelIndex &parent=QModelIndex()) const
Reimplemented Function
void clear()
Removes all items from the list.
Definition: qlist.h:764
QList< QPair< QModelIndex, QString > > watching
Definition: qsidebar_p.h:111
void addUrls(const QList< QUrl > &urls, int row=-1, bool move=true)
Add urls list into the list at row.
Definition: qsidebar.cpp:241

◆ urls()

QList< QUrl > QUrlModel::urls ( ) const

Return the complete list of urls in a QList.

Definition at line 280 of file qsidebar.cpp.

281 {
282  QList<QUrl> list;
283  for (int i = 0; i < rowCount(); ++i)
284  list.append(data(index(i, 0), UrlRole).toUrl());
285  return list;
286 }
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Reimplemented Function
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Reimplemented Function
int rowCount(const QModelIndex &parent=QModelIndex()) const
Reimplemented Function
static QUrl toUrl(Register *reg, int type, QDeclarativeContextData *context, bool *ok=0)

Properties

◆ fileSystemModel

QFileSystemModel* QUrlModel::fileSystemModel
private

Definition at line 110 of file qsidebar_p.h.

Referenced by addUrls(), canDrop(), layoutChanged(), setData(), setFileSystemModel(), and setUrl().

◆ invalidUrls

QList<QUrl> QUrlModel::invalidUrls
private

Definition at line 112 of file qsidebar_p.h.

Referenced by setUrl(), and setUrls().

◆ showFullPath

bool QUrlModel::showFullPath

Definition at line 100 of file qsidebar_p.h.

Referenced by setData(), and setUrl().

◆ watching

QList<QPair<QModelIndex, QString> > QUrlModel::watching
private

Definition at line 111 of file qsidebar_p.h.

Referenced by addUrls(), dataChanged(), layoutChanged(), and setUrls().


The documentation for this class was generated from the following files: