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>
This commit is contained in:
Berthold Stoeger 2019-05-31 19:28:45 +02:00 committed by Lubomir I. Ivanov
parent 58985cd8ae
commit b9154123ed
2 changed files with 47 additions and 62 deletions

View file

@ -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 {