mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-22 17:50:52 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user