mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-23 02:10:52 +01:00
The elements panel now applies again the filter when the panel content is changed.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@1496 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -78,6 +78,8 @@ class ElementsPanel : public GenericPanel {
|
||||
void projectWasOpened(QETProject *);
|
||||
void projectWasClosed(QETProject *);
|
||||
bool scrollToElement(const ElementsLocation &);
|
||||
void applyCurrentFilter(const QList<QTreeWidgetItem *> &);
|
||||
void ensureHierarchyIsVisible(const QList<QTreeWidgetItem *> &);
|
||||
|
||||
protected:
|
||||
void dragEnterEvent(QDragEnterEvent *);
|
||||
@@ -86,9 +88,11 @@ class ElementsPanel : public GenericPanel {
|
||||
void startDrag(Qt::DropActions);
|
||||
void startElementDrag(const ElementsLocation &);
|
||||
void startTitleBlockTemplateDrag(const TitleBlockTemplateLocation &);
|
||||
bool matchesCurrentFilter(const QTreeWidgetItem *) const;
|
||||
|
||||
protected slots:
|
||||
void firstActivation();
|
||||
void panelContentChange();
|
||||
|
||||
private:
|
||||
QTreeWidgetItem *addProject (QETProject *);
|
||||
@@ -97,8 +101,6 @@ class ElementsPanel : public GenericPanel {
|
||||
QTreeWidgetItem *updateElementsCategoryItem(QTreeWidgetItem *, ElementsCategory *, PanelOptions, bool = false);
|
||||
QTreeWidgetItem *updateElementItem (QTreeWidgetItem *, ElementDefinition *, PanelOptions, bool = false);
|
||||
|
||||
void ensureHierarchyIsVisible(QList<QTreeWidgetItem *>);
|
||||
|
||||
// attributes
|
||||
private:
|
||||
QSet<QETProject *> projects_to_display_; ///< list of projects that have been added to this panel
|
||||
@@ -108,5 +110,6 @@ class ElementsPanel : public GenericPanel {
|
||||
QTreeWidgetItem *custom_tbt_collection_item_; ///< pointer to the item representing the user templates collection
|
||||
int loading_progress_; ///< used to track the loading progress of elements collections
|
||||
bool first_reload_; ///< used to distinguish the first time this panel is reloaded
|
||||
QString filter_; ///< Currently applied filter
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user