65 virtual void setModel(QAbstractItemModel *model); |
65 virtual void setModel(QAbstractItemModel *model); |
66 QAbstractItemModel *model() const; |
66 QAbstractItemModel *model() const; |
67 |
67 |
68 // implementing model interface |
68 // implementing model interface |
69 |
69 |
70 QModelIndex index(int row, int column, const QModelIndex &parent) const; |
70 QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const; |
71 QModelIndex parent(const QModelIndex &child) const; |
71 QModelIndex parent(const QModelIndex &child) const; |
72 |
72 |
73 int rowCount(const QModelIndex &parent) const; |
73 int rowCount(const QModelIndex &parent = QModelIndex()) const; |
74 int columnCount(const QModelIndex &parent) const; |
74 int columnCount(const QModelIndex &parent = QModelIndex()) const; |
75 bool hasChildren(const QModelIndex &parent) const; |
75 bool hasChildren(const QModelIndex &parent = QModelIndex()) const; |
76 |
76 |
77 QVariant data(const QModelIndex &index, int role) const; |
77 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; |
78 bool setData(const QModelIndex &index, const QVariant &value, int role); |
78 bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole); |
79 |
79 |
80 QVariant headerData(int section, Qt::Orientation orientation, int role) const; |
80 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; |
81 bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, |
81 bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, |
82 int role); |
82 int role = Qt::EditRole); |
83 |
83 |
84 QStringList mimeTypes() const; |
84 QStringList mimeTypes() const; |
85 QMimeData *mimeData(const QModelIndexList &indexes) const; |
85 QMimeData *mimeData(const QModelIndexList &indexes) const; |
86 bool dropMimeData(const QMimeData *data, Qt::DropAction action, |
86 bool dropMimeData(const QMimeData *data, Qt::DropAction action, |
87 int row, int column, const QModelIndex &parent); |
87 int row, int column, const QModelIndex &parent); |
88 Qt::DropActions supportedDropActions() const; |
88 Qt::DropActions supportedDropActions() const; |
89 |
89 |
90 bool insertRows(int row, int count, const QModelIndex &parent); |
90 bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()); |
91 bool insertColumns(int column, int count, const QModelIndex &parent); |
91 bool insertColumns(int column, int count, const QModelIndex &parent = QModelIndex()); |
92 |
92 |
93 void fetchMore(const QModelIndex &parent); |
93 void fetchMore(const QModelIndex &parent); |
94 Qt::ItemFlags flags(const QModelIndex &index) const; |
94 Qt::ItemFlags flags(const QModelIndex &index) const; |
95 |
95 |
96 void sort(int column, Qt::SortOrder order); |
96 void sort(int column, Qt::SortOrder order = Qt::AscendingOrder); |
97 |
97 |
98 QModelIndexList match(const QModelIndex &start, int role, const QVariant &value, |
98 QModelIndexList match(const QModelIndex &start, int role, const QVariant &value, |
99 int hits, Qt::MatchFlags flags) const; |
99 int hits = 1, Qt::MatchFlags flags = |
|
100 Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const; |
100 |
101 |
101 QSize span(const QModelIndex &index) const; |
102 QSize span(const QModelIndex &index) const; |
102 |
103 |
103 bool submit(); |
104 bool submit(); |
104 void revert(); |
105 void revert(); |