Changeset View
Changeset View
Standalone View
Standalone View
tests/test_tree_rust.h
Show All 34 Lines | 19 | public: | |||
---|---|---|---|---|---|
35 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; | 35 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; | ||
36 | bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role = Qt::EditRole) override; | 36 | bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role = Qt::EditRole) override; | ||
37 | Q_INVOKABLE bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) override; | 37 | Q_INVOKABLE bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) override; | ||
38 | Q_INVOKABLE bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override; | 38 | Q_INVOKABLE bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override; | ||
39 | bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; | 39 | bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; | ||
40 | Q_INVOKABLE QString userName(const QModelIndex& index) const; | 40 | Q_INVOKABLE QString userName(const QModelIndex& index) const; | ||
41 | Q_INVOKABLE bool setUserName(const QModelIndex& index, const QString& value); | 41 | Q_INVOKABLE bool setUserName(const QModelIndex& index, const QString& value); | ||
42 | 42 | | |||
43 | signals: | 43 | Q_SIGNALS: | ||
44 | // new data is ready to be made available to the model with fetchMore() | 44 | // new data is ready to be made available to the model with fetchMore() | ||
45 | void newDataReady(const QModelIndex &parent) const; | 45 | void newDataReady(const QModelIndex &parent) const; | ||
46 | private: | 46 | private: | ||
47 | QHash<QPair<int,Qt::ItemDataRole>, QVariant> m_headerData; | 47 | QHash<QPair<int,Qt::ItemDataRole>, QVariant> m_headerData; | ||
48 | void initHeaderData(); | 48 | void initHeaderData(); | ||
49 | void updatePersistentIndexes(); | 49 | void updatePersistentIndexes(); | ||
50 | signals: | 50 | Q_SIGNALS: | ||
51 | }; | 51 | }; | ||
52 | #endif // TEST_TREE_RUST_H | 52 | #endif // TEST_TREE_RUST_H |