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/simplewidgets.cpp | |
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/simplewidgets.cpp')
-rw-r--r-- | qt-ui/simplewidgets.cpp | 17 |
1 files changed, 8 insertions, 9 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() |