pqKeyFrameTypeWidget.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 pqKeyFrameTypeWidget_h
5 #define pqKeyFrameTypeWidget_h
6 
7 #include "pqComponentsModule.h"
8 #include <QWidget>
9 
10 #include <vtk_jsoncpp_fwd.h> // for forward declarations
11 
12 class QComboBox;
13 
15 {
16  Q_OBJECT
17  Q_PROPERTY(QString type READ type WRITE setType)
18 
19  Q_PROPERTY(QString base READ base WRITE setBase)
20  Q_PROPERTY(QString startPower READ startPower WRITE setStartPower)
21  Q_PROPERTY(QString endPower READ endPower WRITE setEndPower)
22 
23  Q_PROPERTY(double phase READ phase WRITE setPhase)
24  Q_PROPERTY(QString offset READ offset WRITE setOffset)
25  Q_PROPERTY(QString frequency READ frequency WRITE setFrequency)
26 
27 public:
28  pqKeyFrameTypeWidget(QWidget* parent = nullptr);
29  ~pqKeyFrameTypeWidget() override;
30 
34  void initializeUsingJSON(const Json::Value& json);
35 
39  Json::Value serializeToJSON() const;
40 
41 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
42  void setType(const QString& text);
43  void setBase(const QString& text);
44  void setStartPower(const QString& text);
45  void setEndPower(const QString& text);
46  void setPhase(double);
47  void setOffset(const QString& text);
48  void setFrequency(const QString& text);
49 
50 public: // NOLINT(readability-redundant-access-specifiers)
51  QString type() const;
52  QString base() const;
53  QString startPower() const;
54  QString endPower() const;
55  double phase() const;
56  QString offset() const;
57  QString frequency() const;
58 
59  QComboBox* typeComboBox() const;
60 
61 Q_SIGNALS:
62  void typeChanged(const QString&);
63  void baseChanged(const QString&);
64  void startPowerChanged(const QString&);
65  void endPowerChanged(const QString&);
66  void phaseChanged(double);
67  void offsetChanged(const QString&);
68  void frequencyChanged(const QString&);
69 
70 protected Q_SLOTS:
71  void onTypeChanged();
72 
73 private:
74  class pqInternal;
75  pqInternal* Internal;
76 };
77 
78 #endif
#define PQCOMPONENTS_EXPORT
#define const
Definition: zconf.h:238