Qt 4.8
|
#include <qtreewidget_p.h>
Classes | |
struct | SkipSorting |
Public Functions | |
void | clear () |
Removes all items in the model. More... | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const |
Returns the number of columns in the item referred to by the given index. More... | |
QModelIndex | createIndexFromItem (int row, int col, QTreeWidgetItem *item) const |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
Returns the data corresponding to the given model index and role. More... | |
bool | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) |
Handles the data supplied by a drag and drop operation that ended with the given action. More... | |
void | ensureSorted (int column, Qt::SortOrder order, int start, int end, const QModelIndex &parent) |
Qt::ItemFlags | flags (const QModelIndex &index) const |
Returns the flags for the item referred to the given index. More... | |
bool | hasChildren (const QModelIndex &parent) const |
Returns true if parent has any children; otherwise returns false. More... | |
QVariant | headerData (int section, Qt::Orientation orientation, int role) const |
Returns the header data corresponding to the given header section, orientation and data role. More... | |
QModelIndex | index (const QTreeWidgetItem *item, int column) const |
Returns the model index that refers to the tree view item and column. More... | |
QModelIndex | index (int row, int column, const QModelIndex &parent) const |
Returns the model index with the given row, column and parent. More... | |
bool | insertColumns (int column, int count, const QModelIndex &) |
bool | insertRows (int row, int count, const QModelIndex &) |
QMimeData * | internalMimeData () const |
QTreeWidgetItem * | item (const QModelIndex &index) const |
Returns the tree view item corresponding to the index given. More... | |
void | itemChanged (QTreeWidgetItem *item) |
QMap< int, QVariant > | itemData (const QModelIndex &index) const |
Returns a map with values for all predefined roles in the model for the item at the given index. More... | |
QMimeData * | mimeData (const QModelIndexList &indexes) const |
Returns an object that contains serialized items of data corresponding to the list of indexes specified. More... | |
QStringList | mimeTypes () const |
Returns a list of MIME types that can be used to describe a list of model indexes. More... | |
QModelIndex | parent (const QModelIndex &child) const |
Returns the parent model index of the index given as the child. More... | |
QTreeModel (int columns=0, QTreeWidget *parent=0) | |
Constructs a tree model with a parent object and the given number of columns. More... | |
bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) |
int | rowCount (const QModelIndex &parent) const |
Returns the number of rows in the parent model index. More... | |
void | setColumnCount (int columns) |
Sets the number of columns in the tree model. More... | |
bool | setData (const QModelIndex &index, const QVariant &value, int role) |
Sets the data for the item specified by the index and role to that referred to by the value. More... | |
bool | setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role) |
Sets the header data for the item specified by the header section, orientation and data role to the given value. More... | |
void | sort (int column, Qt::SortOrder order) |
Sorts the entire tree in the model in the given order, by the values in the given column. More... | |
Qt::DropActions | supportedDropActions () const |
Returns the drop actions supported by this model. More... | |
QTreeWidget * | view () const |
~QTreeModel () | |
Destroys this tree 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... | |
virtual bool | removeColumns (int column, int count, const QModelIndex &parent=QModelIndex()) |
On models that support this, removes count columns starting with the given column under parent parent from the model. 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... | |
virtual bool | setItemData (const QModelIndex &index, const QMap< int, QVariant > &roles) |
Sets the role data for the item at index to the associated value in roles, for every Qt::ItemDataRole. 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 QObjectList & | children () 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< QByteArray > | dynamicPropertyNames () 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 > | |
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 QMetaObject * | metaObject () 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 |
QObject * | parent () 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... | |
QThread * | thread () const |
Returns the thread in which the object lives. More... | |
QObjectUserData * | userData (uint id) const |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. More... | |
Static Public Functions | |
static bool | itemGreaterThan (const QPair< QTreeWidgetItem *, int > &left, const QPair< QTreeWidgetItem *, int > &right) |
Returns true if the value of the left item is greater than the value of the right item. More... | |
static bool | itemLessThan (const QPair< QTreeWidgetItem *, int > &left, const QPair< QTreeWidgetItem *, int > &right) |
Returns true if the value of the left item is less than the value of the right item. More... | |
static QList< QTreeWidgetItem * >::iterator | sortedInsertionIterator (const QList< QTreeWidgetItem *>::iterator &begin, const QList< QTreeWidgetItem *>::iterator &end, Qt::SortOrder order, QTreeWidgetItem *item) |
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) |
Protected Functions | |
void | beginInsertItems (QTreeWidgetItem *parent, int row, int count) |
void | beginRemoveItems (QTreeWidgetItem *parent, int row, int count) |
void | emitDataChanged (QTreeWidgetItem *item, int column) |
Emits the dataChanged() signal for the given item. More... | |
void | endInsertItems () |
void | endRemoveItems () |
QTreeModel (QTreeModelPrivate &, QTreeWidget *parent=0) | |
void | sortItems (QList< QTreeWidgetItem *> *items, int column, Qt::SortOrder order) |
void | timerEvent (QTimerEvent *) |
This event handler can be reimplemented in a subclass to receive timer events for the object. More... | |
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... | |
QObject * | sender () 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 |
Private Functions | |
bool | executePendingSort () const |
bool | isChanging () const |
Properties | |
QModelIndexList | cachedIndexes |
QTreeWidgetItem * | headerItem |
QList< QTreeWidgetItemIterator * > | iterators |
QTreeWidgetItem * | rootItem |
bool | skipPendingSort |
QBasicTimer | sortPendingTimer |
Friends | |
class | QTreeWidget |
class | QTreeWidgetItem |
class | QTreeWidgetItemIterator |
class | QTreeWidgetItemIteratorPrivate |
class | QTreeWidgetItemPrivate |
class | QTreeWidgetPrivate |
struct | SkipSorting |
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 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 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 Variables inherited from QObject | |
QScopedPointer< QObjectData > | d_ptr |
Static Protected Variables inherited from QObject | |
static const QMetaObject | staticQtMetaObject |
Related Functions inherited from QObject | |
T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QRegExp ®Exp)() |
T * | qobject_cast (QObject *object) |
QObjectList | |
void * | qt_find_obj_child (QObject *parent, const char *type, const QString &name) |
Returns a pointer to the object named name that inherits type and with a given parent. More... | |
Definition at line 71 of file qtreewidget_p.h.
|
explicit |
Constructs a tree model with a parent object and the given number of columns.
Definition at line 124 of file qtreewidget.cpp.
Referenced by createIndexFromItem().
QTreeModel::~QTreeModel | ( | ) |
Destroys this tree model.
Definition at line 157 of file qtreewidget.cpp.
|
protected |
Definition at line 139 of file qtreewidget.cpp.
|
protected |
Definition at line 862 of file qtreewidget.cpp.
Referenced by createIndexFromItem(), and QTreeWidgetItem::insertChildren().
|
protected |
Definition at line 873 of file qtreewidget.cpp.
Referenced by createIndexFromItem(), QTreeWidgetItem::takeChild(), QTreeWidgetItem::takeChildren(), and QTreeWidgetItem::~QTreeWidgetItem().
void QTreeModel::clear | ( | ) |
Removes all items in the model.
Definition at line 174 of file qtreewidget.cpp.
Referenced by view(), and ~QTreeModel().
|
virtual |
Returns the number of columns in the item referred to by the given index.
Implements QAbstractItemModel.
Definition at line 363 of file qtreewidget.cpp.
Referenced by emitDataChanged(), ensureSorted(), index(), insertColumns(), setColumnCount(), setHeaderData(), sort(), sortItems(), and view().
|
inline |
Definition at line 138 of file qtreewidget_p.h.
|
virtual |
Returns the data corresponding to the given model index and role.
Implements QAbstractItemModel.
Definition at line 401 of file qtreewidget.cpp.
Referenced by view().
|
virtual |
Handles the data supplied by a drag and drop operation that ended with the given action.
Returns true if the data and action can be handled by the model; otherwise returns false.
The specified row, column and parent indicate the location of an item in the model where the operation ended. It is the responsibility of the model to complete the action at the correct location.
For instance, a drop action on an item in a QTreeView can result in new items either being inserted as children of the item specified by row, column, and parent, or as siblings of the item.
When row and column are -1 it means that the dropped data should be considered as dropped directly on parent. Usually this will mean appending the data as child items of parent. If row and column are greater than or equal zero, it means that the drop occurred just before the specified row and column in the specified parent.
Reimplemented from QAbstractItemModel.
Definition at line 800 of file qtreewidget.cpp.
Referenced by view().
|
protected |
Emits the dataChanged() signal for the given item.
if column is -1 then all columns have changed
Definition at line 836 of file qtreewidget.cpp.
Referenced by createIndexFromItem(), and QTreeWidgetItem::setData().
|
protected |
Definition at line 868 of file qtreewidget.cpp.
Referenced by createIndexFromItem(), and QTreeWidgetItem::insertChildren().
|
protected |
Definition at line 889 of file qtreewidget.cpp.
Referenced by createIndexFromItem(), QTreeWidgetItem::takeChildren(), and QTreeWidgetItem::~QTreeWidgetItem().
void QTreeModel::ensureSorted | ( | int | column, |
Qt::SortOrder | order, | ||
int | start, | ||
int | end, | ||
const QModelIndex & | parent | ||
) |
Definition at line 641 of file qtreewidget.cpp.
Referenced by view().
|
inlineprivate |
Definition at line 203 of file qtreewidget_p.h.
Referenced by index(), QTreeWidgetItem::takeChild(), QTreeWidgetItem::takeChildren(), and timerEvent().
|
virtual |
Returns the flags for the item referred to the given index.
Reimplemented Function
Reimplemented from QAbstractItemModel.
Definition at line 607 of file qtreewidget.cpp.
Referenced by view().
|
virtual |
Returns true if parent has any children; otherwise returns false.
Use rowCount() on the parent to find out the number of children.
Reimplemented from QAbstractItemModel.
Definition at line 371 of file qtreewidget.cpp.
Referenced by view().
|
virtual |
Returns the header data corresponding to the given header section, orientation and data role.
Reimplemented from QAbstractItemModel.
Definition at line 562 of file qtreewidget.cpp.
Referenced by view().
QModelIndex QTreeModel::index | ( | const QTreeWidgetItem * | item, |
int | column | ||
) | const |
Returns the model index that refers to the tree view item and column.
Definition at line 253 of file qtreewidget.cpp.
Referenced by beginInsertItems(), beginRemoveItems(), emitDataChanged(), QTreeWidgetPrivate::item(), itemChanged(), parent(), and view().
|
virtual |
Returns the model index with the given row, column and parent.
Implements QAbstractItemModel.
Definition at line 287 of file qtreewidget.cpp.
|
virtual |
Reimplemented from QAbstractItemModel.
Definition at line 491 of file qtreewidget.cpp.
Referenced by view().
|
virtual |
Reimplemented from QAbstractItemModel.
Definition at line 465 of file qtreewidget.cpp.
Referenced by view().
QMimeData * QTreeModel::internalMimeData | ( | ) | const |
Definition at line 779 of file qtreewidget.cpp.
Referenced by view().
|
private |
Definition at line 821 of file qtreewidget.cpp.
Referenced by ensureSorted(), executePendingSort(), QTreeWidgetItem::sortChildren(), and sortItems().
QTreeWidgetItem * QTreeModel::item | ( | const QModelIndex & | index | ) | const |
Returns the tree view item corresponding to the index given.
Definition at line 236 of file qtreewidget.cpp.
Referenced by QTreeWidgetPrivate::_q_selectionChanged(), clear(), data(), dropMimeData(), emitDataChanged(), ensureSorted(), flags(), hasChildren(), index(), insertRows(), itemData(), mimeData(), QTreeWidgetItemIterator::QTreeWidgetItemIterator(), QTreeWidgetItemPrivate::QTreeWidgetItemPrivate(), removeRows(), rowCount(), setData(), sortItems(), and view().
void QTreeModel::itemChanged | ( | QTreeWidgetItem * | item | ) |
Definition at line 813 of file qtreewidget.cpp.
Referenced by view().
|
virtual |
Returns a map with values for all predefined roles in the model for the item at the given index.
Reimplement this function if you want to extend the default behavior of this function to include custom roles in the map.
Reimplemented from QAbstractItemModel.
Definition at line 436 of file qtreewidget.cpp.
Referenced by view().
|
static |
Returns true if the value of the left item is greater than the value of the right item.
Used by the sorting functions.
Definition at line 755 of file qtreewidget.cpp.
Referenced by ensureSorted(), sortItems(), and view().
|
static |
Returns true if the value of the left item is less than the value of the right item.
Used by the sorting functions.
Definition at line 737 of file qtreewidget.cpp.
Referenced by ensureSorted(), sortItems(), and view().
|
virtual |
Returns an object that contains serialized items of data corresponding to the list of indexes specified.
The formats used to describe the encoded data is obtained from the mimeTypes() function.
If the list of indexes is empty, or there are no supported MIME types, 0 is returned rather than a serialized empty list.
Reimplemented from QAbstractItemModel.
Definition at line 784 of file qtreewidget.cpp.
Referenced by view().
|
virtual |
Returns a list of MIME types that can be used to describe a list of model indexes.
Reimplemented from QAbstractItemModel.
Definition at line 774 of file qtreewidget.cpp.
Referenced by view().
|
virtual |
Returns the parent model index of the index given as the child.
Implements QAbstractItemModel.
Definition at line 317 of file qtreewidget.cpp.
|
virtual |
Reimplemented from QAbstractItemModel.
Definition at line 528 of file qtreewidget.cpp.
Referenced by view().
|
virtual |
Returns the number of rows in the parent model index.
Implements QAbstractItemModel.
Definition at line 341 of file qtreewidget.cpp.
Referenced by dropMimeData(), insertRows(), removeRows(), and view().
void QTreeModel::setColumnCount | ( | int | columns | ) |
Sets the number of columns in the tree model.
Definition at line 197 of file qtreewidget.cpp.
Referenced by QTreeModel(), QTreeWidgetItem::setData(), and view().
|
virtual |
Sets the data for the item specified by the index and role to that referred to by the value.
Returns true if successful; otherwise returns false.
Reimplemented from QAbstractItemModel.
Definition at line 424 of file qtreewidget.cpp.
Referenced by view().
|
virtual |
Sets the header data for the item specified by the header section, orientation and data role to the given value.
Returns true if successful; otherwise returns false.
Reimplemented from QAbstractItemModel.
Definition at line 587 of file qtreewidget.cpp.
Referenced by view().
|
virtual |
Sorts the entire tree in the model in the given order, by the values in the given column.
Reimplemented from QAbstractItemModel.
Definition at line 626 of file qtreewidget.cpp.
Referenced by executePendingSort(), and view().
|
static |
Definition at line 764 of file qtreewidget.cpp.
Referenced by ensureSorted(), and view().
|
protected |
Definition at line 894 of file qtreewidget.cpp.
Referenced by createIndexFromItem(), and QTreeWidgetItemPrivate::sortChildren().
|
virtual |
Returns the drop actions supported by this model.
The default implementation returns Qt::CopyAction. Reimplement this function if you wish to support additional actions. You must also reimplement the dropMimeData() function to handle the additional operations.
Reimplemented from QAbstractItemModel.
Definition at line 808 of file qtreewidget.cpp.
Referenced by view().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive timer events for the object.
QTimer provides a higher-level interface to the timer functionality, and also more general information about timers. The timer event is passed in the event parameter.
Reimplemented from QObject.
Definition at line 933 of file qtreewidget.cpp.
Referenced by createIndexFromItem().
|
inline |
Definition at line 85 of file qtreewidget_p.h.
Referenced by dropMimeData(), executePendingSort(), insertRows(), mimeData(), mimeTypes(), setColumnCount(), and supportedDropActions().
|
friend |
Definition at line 74 of file qtreewidget_p.h.
|
friend |
Definition at line 76 of file qtreewidget_p.h.
Referenced by insertRows(), and setColumnCount().
|
friend |
Definition at line 78 of file qtreewidget_p.h.
|
friend |
Definition at line 79 of file qtreewidget_p.h.
Referenced by QTreeWidgetItemIterator::QTreeWidgetItemIterator().
|
friend |
Definition at line 77 of file qtreewidget_p.h.
|
friend |
Definition at line 75 of file qtreewidget_p.h.
|
friend |
Definition at line 175 of file qtreewidget_p.h.
|
mutableprivate |
Definition at line 155 of file qtreewidget_p.h.
Referenced by internalMimeData(), and mimeData().
|
private |
Definition at line 153 of file qtreewidget_p.h.
Referenced by columnCount(), emitDataChanged(), headerData(), insertColumns(), QTreeModel(), QTreeWidgetItem::QTreeWidgetItem(), setColumnCount(), QTreeWidgetItem::setData(), setHeaderData(), ~QTreeModel(), and QTreeWidgetItem::~QTreeWidgetItem().
|
private |
Definition at line 156 of file qtreewidget_p.h.
Referenced by beginRemoveItems(), and QTreeWidgetItemIterator::QTreeWidgetItemIterator().
|
private |
Definition at line 152 of file qtreewidget_p.h.
Referenced by beginRemoveItems(), clear(), ensureSorted(), flags(), hasChildren(), index(), QTreeWidgetItem::insertChildren(), insertColumns(), insertRows(), parent(), QTreeModel(), QTreeWidgetItem::QTreeWidgetItem(), QTreeWidgetItemIterator::QTreeWidgetItemIterator(), removeRows(), rowCount(), sort(), ~QTreeModel(), and QTreeWidgetItem::~QTreeWidgetItem().
|
mutableprivate |
Definition at line 159 of file qtreewidget_p.h.
Referenced by executePendingSort(), QTreeModel::SkipSorting::SkipSorting(), QTreeWidgetItem::takeChild(), QTreeWidgetItem::~QTreeWidgetItem(), and QTreeModel::SkipSorting::~SkipSorting().
|
mutableprivate |
Definition at line 158 of file qtreewidget_p.h.
Referenced by clear(), ensureSorted(), executePendingSort(), sort(), and timerEvent().