pqScaleByButton.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 #ifndef pqScaleByButton_h
5 #define pqScaleByButton_h
6 
7 #include "pqWidgetsModule.h"
8 #include <QMap> // needed for QMap
9 #include <QToolButton>
10 
19 class PQWIDGETS_EXPORT pqScaleByButton : public QToolButton
20 {
21  Q_OBJECT
22  typedef QToolButton Superclass;
23 
24 public:
28  pqScaleByButton(QWidget* parent = nullptr);
29 
35  const QList<double>& scaleFactors, const QString& suffix = "X", QWidget* parent = nullptr);
36 
40  pqScaleByButton(const QMap<double, QString>& scaleFactorsAndLabels, QWidget* parent = nullptr);
41 
42  ~pqScaleByButton() override;
43 
44 Q_SIGNALS:
48  void scale(double factor);
49 
50 private Q_SLOTS:
51  void scaleTriggered();
52 
53 private: // NOLINT(readability-redundant-access-specifiers)
54  Q_DISABLE_COPY(pqScaleByButton);
55  void constructor(const QMap<double, QString>& scaleFactors);
56 };
57 
58 #endif
#define PQWIDGETS_EXPORT
scale
Custom QToolButton that adds a menu to key user scale by a factor.