From b384639799a68ca7d7c07eee518d3ef4b34812d0 Mon Sep 17 00:00:00 2001 From: Arno Date: Wed, 29 Jul 2020 05:16:15 +0200 Subject: Add collapse and expand all to SearchDialog Thought about using QSignalMapper for this, but that would be too convoluted, thus the inline functions. --- searchdialog.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'searchdialog.h') diff --git a/searchdialog.h b/searchdialog.h index 19d0d09..09ed259 100644 --- a/searchdialog.h +++ b/searchdialog.h @@ -10,6 +10,8 @@ #include +#include "smview.h" + class QCheckBox; class QLineEdit; class QPushButton; @@ -57,6 +59,10 @@ class ActorsAndMore : public QWidget { void doSearch(); void doData(const QModelIndex &cur, const QModelIndex &prev); void dataDoubleClicked(const QModelIndex &index); + void collapseAllResult() { mResultView->collapseAll(); } + void expandAllResult() { mResultView->expandAll(); } + void collapseAllData() { mDataView->collapseAll(); } + void expandAllData() { mDataView->expandAll(); } private: void searchActor(const QString &actor); @@ -68,8 +74,8 @@ class ActorsAndMore : public QWidget { QLineEdit *mSearch; QStandardItemModel *mResultModel; QStandardItemModel *mDataModel; - QTreeView *mResultView; - QTreeView *mDataView; + SmView *mResultView; + SmView *mDataView; }; class SearchDialog : public QDialog { -- cgit v1.2.3-70-g09d2