elements collection model : use QStandardItemModel has base class instead of QAbstractItemModel.

Add minor improvement.


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4538 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2016-06-05 16:34:46 +00:00
parent 9a0e14161f
commit 1b00a457d7
14 changed files with 881 additions and 1477 deletions

View File

@@ -44,11 +44,13 @@ class ElementsCollectionWidget : public QWidget
ElementsCollectionWidget(QWidget *parent = nullptr);
void expandFirstItems();
ElementsCollectionModel *model() const;
void addProject (QETProject *project);
void removeProject (QETProject *project);
protected:
virtual bool event(QEvent *event);
private:
void setUpAction();
void setUpWidget();
@@ -70,11 +72,11 @@ class ElementsCollectionWidget : public QWidget
void showAndExpandItem (const QModelIndex &index, bool parent = true, bool child = false);
ElementCollectionItem *elementCollectionItemForIndex (const QModelIndex &index);
private:
ElementsCollectionModel *m_model;
private:
ElementsCollectionModel *m_model;
QLineEdit *m_search_field;
ElementsTreeView *m_tree_view;
QVBoxLayout *m_main_vlayout;
QVBoxLayout *m_main_vlayout;
QMenu *m_context_menu;
QModelIndex m_index_at_context_menu;
QModelIndex m_showed_index;
@@ -90,6 +92,8 @@ class ElementsCollectionWidget : public QWidget
*m_new_element,
*m_show_this_dir,
*m_show_all_dir;
bool m_first_show = true;
};
#endif // ELEMENTSCOLLECTIONWIDGET_H