mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-24 03:10:52 +01:00
Elements collection widget : improve the search
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4550 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <QWidget>
|
||||
#include <QModelIndex>
|
||||
#include <QTimer>
|
||||
|
||||
class ElementsCollectionModel;
|
||||
class QVBoxLayout;
|
||||
@@ -65,7 +66,7 @@ class ElementsCollectionWidget : public QWidget
|
||||
void newElement();
|
||||
void showThisDir();
|
||||
void resetShowThisDir();
|
||||
void search(const QString &text);
|
||||
void search();
|
||||
void hideCollection(bool hide = true);
|
||||
void hideItem(bool hide, const QModelIndex &index = QModelIndex(), bool recursive = true);
|
||||
void showAndExpandItem (const QModelIndex &index, bool parent = true, bool child = false);
|
||||
@@ -78,6 +79,7 @@ class ElementsCollectionWidget : public QWidget
|
||||
private:
|
||||
ElementsCollectionModel *m_model;
|
||||
QLineEdit *m_search_field;
|
||||
QTimer m_search_timer;
|
||||
ElementsTreeView *m_tree_view;
|
||||
QVBoxLayout *m_main_vlayout;
|
||||
QMenu *m_context_menu;
|
||||
|
||||
Reference in New Issue
Block a user