summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/mainwindow.cpp4
-rw-r--r--qt-ui/mainwindow.ui4
-rw-r--r--qt-ui/simplewidgets.cpp12
-rw-r--r--qt-ui/simplewidgets.h6
4 files changed, 22 insertions, 4 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index a86eb8e99..c052867fe 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -69,7 +69,7 @@ MainWindow::MainWindow() : QMainWindow(),
Q_ASSERT_X(m_Instance == NULL, "MainWindow", "MainWindow recreated!");
m_Instance = this;
ui.setupUi(this);
- ui.tagFilter->hide();
+ ui.multiFilter->hide();
profileToolbarActions << ui.profCalcAllTissues << ui.profCalcCeiling << ui.profDcCeiling << ui.profEad <<
ui.profHR << ui.profIncrement3m << ui.profMod << ui.profNdl_tts << ui.profNdl_tts <<
ui.profPhe << ui.profPn2 << ui.profPO2 << ui.profRuler << ui.profSAC << ui.profScaled <<
@@ -1379,5 +1379,5 @@ void MainWindow::on_paste_triggered()
void MainWindow::on_actionFilterTags_triggered()
{
- ui.tagFilter->setVisible(!ui.tagFilter->isVisible());
+ ui.multiFilter->setVisible(!ui.multiFilter->isVisible());
}
diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui
index 4e9c94a2d..926e8159d 100644
--- a/qt-ui/mainwindow.ui
+++ b/qt-ui/mainwindow.ui
@@ -126,7 +126,7 @@
<widget class="QWidget" name="page_3">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
- <widget class="TagFilter" name="tagFilter" native="true"/>
+ <widget class="MultiFilter" name="multiFilter" native="true"/>
</item>
<item>
<widget class="DiveListView" name="ListWidget"/>
@@ -897,7 +897,7 @@ p, li { white-space: pre-wrap; }
<container>1</container>
</customwidget>
<customwidget>
- <class>TagFilter</class>
+ <class>MultiFilter</class>
<extends>QWidget</extends>
<header>simplewidgets.h</header>
<container>1</container>
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp
index b31261518..47952c323 100644
--- a/qt-ui/simplewidgets.cpp
+++ b/qt-ui/simplewidgets.cpp
@@ -476,3 +476,15 @@ void TagFilter::hideEvent(QHideEvent *event)
TagFilterSortModel::instance()->removeFilterModel(TagFilterModel::instance());
QWidget::hideEvent(event);
}
+
+MultiFilter::MultiFilter(QWidget *parent): QScrollArea(parent)
+{
+ QWidget *w = new QWidget();
+ QHBoxLayout *l = new QHBoxLayout();
+
+ l->addWidget(new TagFilter());
+
+ w->setLayout(l);
+ w->setMinimumSize(l->count() * 150, 200);
+ setWidget(w);
+}
diff --git a/qt-ui/simplewidgets.h b/qt-ui/simplewidgets.h
index d3e27c06c..48a57493b 100644
--- a/qt-ui/simplewidgets.h
+++ b/qt-ui/simplewidgets.h
@@ -140,6 +140,12 @@ private:
Ui::TagFilter ui;
};
+class MultiFilter : public QScrollArea {
+ Q_OBJECT
+public:
+ MultiFilter(QWidget *parent);
+};
+
bool isGnome3Session();
QImage grayImage(const QImage &coloredImg);