diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-10-26 17:05:37 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-10-26 20:56:56 -0700 |
commit | 49fc05de7ebdc3f402b76072a34e3aa53b3b7d4d (patch) | |
tree | 77e514c7099779c2ea63906fbd15132ad4628ea4 /desktop-widgets/simplewidgets.cpp | |
parent | ab94956759a934b7686b4db7874fb6266703726a (diff) | |
download | subsurface-49fc05de7ebdc3f402b76072a34e3aa53b3b7d4d.tar.gz |
desktop: move MinMaxAvgWidget to TabDiveStatistics
This is its only user and the widget is scheduled for removal.
Let's move it there temporarilly.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/simplewidgets.cpp')
-rw-r--r-- | desktop-widgets/simplewidgets.cpp | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp index 135326ecf..689517c76 100644 --- a/desktop-widgets/simplewidgets.cpp +++ b/desktop-widgets/simplewidgets.cpp @@ -25,106 +25,6 @@ #include "core/metadata.h" #include "core/tag.h" -double MinMaxAvgWidget::average() const -{ - return avgValue->text().toDouble(); -} - -double MinMaxAvgWidget::maximum() const -{ - return maxValue->text().toDouble(); -} - -double MinMaxAvgWidget::minimum() const -{ - return minValue->text().toDouble(); -} - -MinMaxAvgWidget::MinMaxAvgWidget(QWidget *parent) : QWidget(parent) -{ - avgIco = new QLabel(this); - avgIco->setPixmap(QIcon(":value-average-icon").pixmap(16, 16)); - avgIco->setToolTip(gettextFromC::tr("Average")); - minIco = new QLabel(this); - minIco->setPixmap(QIcon(":value-minimum-icon").pixmap(16, 16)); - minIco->setToolTip(gettextFromC::tr("Minimum")); - maxIco = new QLabel(this); - maxIco->setPixmap(QIcon(":value-maximum-icon").pixmap(16, 16)); - maxIco->setToolTip(gettextFromC::tr("Maximum")); - avgValue = new QLabel(this); - minValue = new QLabel(this); - maxValue = new QLabel(this); - - QGridLayout *formLayout = new QGridLayout; - formLayout->addWidget(maxIco, 0, 0); - formLayout->addWidget(maxValue, 0, 1); - formLayout->addWidget(avgIco, 1, 0); - formLayout->addWidget(avgValue, 1, 1); - formLayout->addWidget(minIco, 2, 0); - formLayout->addWidget(minValue, 2, 1); - setLayout(formLayout); -} - -void MinMaxAvgWidget::clear() -{ - avgValue->setText(QString()); - maxValue->setText(QString()); - minValue->setText(QString()); -} - -void MinMaxAvgWidget::setAverage(double average) -{ - avgValue->setText(QString::number(average)); -} - -void MinMaxAvgWidget::setMaximum(double maximum) -{ - maxValue->setText(QString::number(maximum)); -} -void MinMaxAvgWidget::setMinimum(double minimum) -{ - minValue->setText(QString::number(minimum)); -} - -void MinMaxAvgWidget::setAverage(const QString &average) -{ - avgValue->setText(average); -} - -void MinMaxAvgWidget::setMaximum(const QString &maximum) -{ - maxValue->setText(maximum); -} - -void MinMaxAvgWidget::setMinimum(const QString &minimum) -{ - minValue->setText(minimum); -} - -void MinMaxAvgWidget::overrideMinToolTipText(const QString &newTip) -{ - minIco->setToolTip(newTip); - minValue->setToolTip(newTip); -} - -void MinMaxAvgWidget::overrideAvgToolTipText(const QString &newTip) -{ - avgIco->setToolTip(newTip); - avgValue->setToolTip(newTip); -} - -void MinMaxAvgWidget::overrideMaxToolTipText(const QString &newTip) -{ - maxIco->setToolTip(newTip); - maxValue->setToolTip(newTip); -} - -void MinMaxAvgWidget::setAvgVisibility(bool visible) -{ - avgIco->setVisible(visible); - avgValue->setVisible(visible); -} - void RenumberDialog::buttonClicked(QAbstractButton *button) { if (ui.buttonBox->buttonRole(button) == QDialogButtonBox::AcceptRole) { |