summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/simplewidgets.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-05-31 19:28:45 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2019-06-10 17:59:35 +0300
commitb9154123ed5235b008a37b612a54a1fa637b39b5 (patch)
tree78c3176ede292bab79ef98308a06e76ef015148c /desktop-widgets/simplewidgets.h
parent58985cd8aee2015d4b182108a062357d6e256158 (diff)
downloadsubsurface-b9154123ed5235b008a37b612a54a1fa637b39b5.tar.gz
Cleanup: Un-PIMPL-ize MinMaxAvgWidget
The PIMPL idiom is used by some frameworks (notably Qt) to ensure binary compatibility. Objects consist only the general object header (ref-count, connections, children, etc..) plus a single pointer to private data. MinMaxAvgWidget was implemented using this idiom. This seems to make no sense, as we don't produce a general library with the need of a stable ABI. Let's remove this unnecessary indirection. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/simplewidgets.h')
-rw-r--r--desktop-widgets/simplewidgets.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/desktop-widgets/simplewidgets.h b/desktop-widgets/simplewidgets.h
index a814519c4..024edbca1 100644
--- a/desktop-widgets/simplewidgets.h
+++ b/desktop-widgets/simplewidgets.h
@@ -29,9 +29,11 @@ class MinMaxAvgWidget : public QWidget {
Q_PROPERTY(double minimum READ minimum WRITE setMinimum)
Q_PROPERTY(double maximum READ maximum WRITE setMaximum)
Q_PROPERTY(double average READ average WRITE setAverage)
+ QLabel *avgIco, *avgValue;
+ QLabel *minIco, *minValue;
+ QLabel *maxIco, *maxValue;
public:
MinMaxAvgWidget(QWidget *parent);
- ~MinMaxAvgWidget();
double minimum() const;
double maximum() const;
double average() const;
@@ -44,11 +46,8 @@ public:
void overrideMinToolTipText(const QString &newTip);
void overrideAvgToolTipText(const QString &newTip);
void overrideMaxToolTipText(const QString &newTip);
- void setAvgVisibility(const bool visible);
+ void setAvgVisibility(bool visible);
void clear();
-
-private:
- QScopedPointer<MinMaxAvgWidgetPrivate> d;
};
class RenumberDialog : public QDialog {