From b9154123ed5235b008a37b612a54a1fa637b39b5 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Fri, 31 May 2019 19:28:45 +0200 Subject: 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 --- desktop-widgets/simplewidgets.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'desktop-widgets/simplewidgets.h') 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 d; }; class RenumberDialog : public QDialog { -- cgit v1.2.3-70-g09d2