diff options
author | Anton Lundin <glance@acc.umu.se> | 2014-12-18 08:47:52 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-12-18 08:33:35 -0800 |
commit | 4599172a19f95664ed44b8293aeca2cf30e3f171 (patch) | |
tree | bbd1279cb2053edcd41b0c6b87244cf0bedd24ab /qt-ui | |
parent | 8571268d21deced25ac2cd332f3976f67f953e94 (diff) | |
download | subsurface-4599172a19f95664ed44b8293aeca2cf30e3f171.tar.gz |
Switch to having ui as member in MultiFilter
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/simplewidgets.cpp | 17 | ||||
-rw-r--r-- | qt-ui/simplewidgets.h | 3 |
2 files changed, 10 insertions, 10 deletions
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp index 0ec03b44b..d03f9f979 100644 --- a/qt-ui/simplewidgets.cpp +++ b/qt-ui/simplewidgets.cpp @@ -606,8 +606,7 @@ void SuitFilter::hideEvent(QHideEvent *event) MultiFilter::MultiFilter(QWidget *parent) : QWidget(parent) { - ui = new Ui::FilterWidget2(); - ui->setupUi(this); + ui.setupUi(this); QWidget *expandedWidget = new QWidget(); QHBoxLayout *l = new QHBoxLayout(); @@ -620,9 +619,9 @@ MultiFilter::MultiFilter(QWidget *parent) : QWidget(parent) QStringListModel *dummy = new QStringListModel(QStringList() << "Dummy Text"); dummyList->setModel(dummy); - connect(ui->close, SIGNAL(clicked(bool)), this, SLOT(closeFilter())); - connect(ui->clear, SIGNAL(clicked(bool)), MultiFilterSortModel::instance(), SLOT(clearFilter())); - connect(ui->maximize, SIGNAL(clicked(bool)), this, SLOT(adjustHeight())); + connect(ui.close, SIGNAL(clicked(bool)), this, SLOT(closeFilter())); + connect(ui.clear, SIGNAL(clicked(bool)), MultiFilterSortModel::instance(), SLOT(clearFilter())); + connect(ui.maximize, SIGNAL(clicked(bool)), this, SLOT(adjustHeight())); l->addWidget(tagFilter); l->addWidget(new BuddyFilter()); @@ -632,21 +631,21 @@ MultiFilter::MultiFilter(QWidget *parent) : QWidget(parent) l->setSpacing(0); expandedWidget->setLayout(l); - ui->scrollArea->setWidget(expandedWidget); + ui.scrollArea->setWidget(expandedWidget); expandedWidget->resize(expandedWidget->width(), minimumHeight + dummyList->sizeHintForRow(0) * 5 ); - ui->scrollArea->setMinimumHeight(expandedWidget->height() + 5); + ui.scrollArea->setMinimumHeight(expandedWidget->height() + 5); connect(MultiFilterSortModel::instance(), SIGNAL(filterFinished()), this, SLOT(filterFinished())); } void MultiFilter::filterFinished() { - ui->filterText->setText(tr("Filter shows %1 (of %2) dives").arg(MultiFilterSortModel::instance()->divesDisplayed).arg(dive_table.nr)); + ui.filterText->setText(tr("Filter shows %1 (of %2) dives").arg(MultiFilterSortModel::instance()->divesDisplayed).arg(dive_table.nr)); } void MultiFilter::adjustHeight() { - ui->scrollArea->setVisible(!ui->scrollArea->isVisible()); + ui.scrollArea->setVisible(!ui.scrollArea->isVisible()); } void MultiFilter::closeFilter() diff --git a/qt-ui/simplewidgets.h b/qt-ui/simplewidgets.h index c5631fd75..b2b08d552 100644 --- a/qt-ui/simplewidgets.h +++ b/qt-ui/simplewidgets.h @@ -14,6 +14,7 @@ class QAbstractButton; #include "ui_shiftimagetimes.h" #include "ui_divecomponentselection.h" #include "ui_listfilter.h" +#include "ui_filterwidget.h" #include "exif.h" #include <dive.h> @@ -163,7 +164,7 @@ slots: public: MultiFilter(QWidget *parent); - Ui::FilterWidget2 *ui; + Ui::FilterWidget2 ui; }; class TagFilter : public QWidget { |