4#ifndef QQmlTreeModelToTableModel_H
5#define QQmlTreeModelToTableModel_H
20#include <QtCore/qset.h>
21#include <QtCore/qpointer.h>
22#include <QtCore/qabstractitemmodel.h>
23#include <QtCore/qitemselectionmodel.h>
33 Q_PROPERTY(
QModelIndex rootIndex READ rootIndex WRITE setRootIndex RESET resetRootIndex NOTIFY rootIndexChanged FINAL)
43 void resetRootIndex();
65 void clearModelData();
76 void showModelTopLevelItems(
bool doInsertRows =
true);
77 void showModelChildItems(
const TreeItem &
parent,
int start,
int end,
bool doInsertRows =
true,
bool doExpandPendingRows =
true);
80 void expandPendingRows(
bool doInsertRows =
true);
82 void removeVisibleRows(
int startIndex,
int endIndex,
bool doRemoveRows =
true);
85 bool testConsistency(
bool dumpOnFail =
false)
const;
100 bool isExpanded(
int row)
const;
102 bool hasSiblings(
int row)
const;
103 int depthAtRow(
int row)
const;
104 void expandRow(
int n);
105 void expandRecursively(
int row,
int depth);
106 void collapseRow(
int n);
107 void collapseRecursively(
int row);
110 void modelHasBeenDestroyed();
111 void modelHasBeenReset();
116 void modelRowsAboutToBeMoved(
const QModelIndex & sourceParent,
int sourceStart,
int sourceEnd,
const QModelIndex & destinationParent,
int destinationRow);
119 void modelRowsMoved(
const QModelIndex & sourceParent,
int sourceStart,
int sourceEnd,
const QModelIndex & destinationParent,
int destinationRow);
134 return this->index ==
other.index;
138 struct DataChangedParams {
144 struct SignalFreezer {
146 m_parent->enableSignalAggregation();
148 ~SignalFreezer() { m_parent->disableSignalAggregation(); }
154 void enableSignalAggregation();
155 void disableSignalAggregation();
156 bool isAggregatingSignals()
const {
return m_signalAggregatorStack > 0; }
160 void emitQueuedSignals();
167 mutable int m_lastItemIndex = 0;
168 bool m_visibleRowsMoved =
false;
169 bool m_modelLayoutChanged =
false;
170 int m_signalAggregatorStack = 0;
Q_INVOKABLE int const QModelIndex & parent
Returns the parent of the model item with the given index.
LayoutChangeHint
This enum describes the way the model changes layout.
virtual Q_INVOKABLE QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Returns the data for the given role and section in the header with the specified orientation.
virtual Q_INVOKABLE bool hasChildren(const QModelIndex &parent=QModelIndex()) const
Returns {true} if parent has any children; otherwise returns {false}.
virtual Q_INVOKABLE int rowCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of rows under the given parent.
virtual Q_INVOKABLE bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Sets the role data for the item at index to value.
virtual QHash< int, QByteArray > roleNames() const
virtual Q_INVOKABLE int columnCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of columns for the children of the given parent.
void modelChanged(QAbstractItemModel *model)
void collapsed(const QModelIndex &index)
void expanded(const QModelIndex &index)
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLint GLenum GLsizei GLsizei GLsizei depth
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLenum GLsizei void GLsizei void * column
GLenum GLenum GLsizei void * row
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
static QString dump(const QByteArray &)
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
static uint toIndex(ExecutionEngine *e, const Value &v)
view setModel(model)
[17] //! [18]
QSqlQueryModel * model
[16]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent