42 #ifndef QSTANDARDITEMMODEL_P_H 43 #define QSTANDARDITEMMODEL_P_H 56 #include "private/qabstractitemmodel_p.h" 58 #ifndef QT_NO_STANDARDITEMMODEL 60 #include <private/qwidgetitemdata_p.h> 61 #include <QtCore/qlist.h> 62 #include <QtCore/qpair.h> 63 #include <QtCore/qstack.h> 64 #include <QtCore/qvariant.h> 65 #include <QtCore/qvector.h> 84 if ((row < 0) || (column < 0)
99 bool emitChanged =
false);
157 if (index.
model() != q)
168 void columnsAboutToBeInserted(
QStandardItem *parent,
int start,
int end);
169 void rowsAboutToBeRemoved(
QStandardItem *parent,
int start,
int end);
170 void columnsAboutToBeRemoved(
QStandardItem *parent,
int start,
int end);
171 void rowsInserted(
QStandardItem *parent,
int row,
int count);
172 void columnsInserted(
QStandardItem *parent,
int column,
int count);
174 void columnsRemoved(
QStandardItem *parent,
int column,
int count);
176 void _q_emitItemChanged(
const QModelIndex &topLeft,
190 #endif // QT_NO_STANDARDITEMMODEL 192 #endif // QSTANDARDITEMMODEL_P_H void * internalPointer() const
Returns a void * pointer used by the model to associate the index with the internal data structure...
QScopedPointer< QStandardItem > root
const QMap< int, QVariant > itemData() const
#define QT_END_NAMESPACE
This macro expands to.
void setModel(QStandardItemModel *mod)
const QStandardItem * itemPrototype
The QStandardItemModel class provides a generic model for storing custom data.
QVector< QStandardItem * > children
int childIndex(int row, int column) const
QStandardItem * createItem() const
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
void setParentAndModel(QStandardItem *par, QStandardItemModel *mod)
virtual QStandardItem * clone() const
Returns a copy of this item.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QPair< int, int > position() const
QVector< QStandardItem * > columnHeaderItems
static void sort(T *array, int count, LessThan lessThan)
void childDeleted(QStandardItem *child)
bool insertColumns(int column, int count, const QList< QStandardItem *> &items)
int row() const
Returns the row this model index refers to.
const QAbstractItemModel * model() const
Returns a pointer to the model containing the item that this index refers to.
bool insertRows(int row, int count, const QList< QStandardItem *> &items)
int indexOf(const T &t, int from=0) const
Returns the index position of the first occurrence of value in the vector, searching forward from ind...
int childIndex(const QStandardItem *child)
QStandardItemModel * model
bool isValid() const
Returns true if this model index is valid; otherwise returns false.
QVector< QStandardItem * > rowHeaderItems
#define Q_DECLARE_PUBLIC(Class)
The QModelIndex class is used to locate data in a data model.
void setChild(int row, int column, QStandardItem *item, bool emitChanged=false)
void sortChildren(int column, Qt::SortOrder order)
void changeFlags(bool enable, Qt::ItemFlags f)
virtual ~QStandardItemPrivate()
void setItemData(const QMap< int, QVariant > &roles)
The QDataStream class provides serialization of binary data to a QIODevice.
The QStandardItem class provides an item for use with the QStandardItemModel class.
static const KeyPair *const end
int lastIndexOf(const T &t, int from=-1) const
Returns the index position of the last occurrence of the value value in the vector, searching backward from index position from.
QVector< QWidgetItemData > values
The QMap class is a template class that provides a skip-list-based dictionary.
QStandardItem * itemFromIndex(const QModelIndex &index) const
int column() const
Returns the column this model index refers to.
QStandardItem * child(int row, int column=0) const
Returns the child item at (row, column) if one has been set; otherwise returns 0. ...
The QList class is a template class that provides lists.