pqAnimationTimeWidget.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 pqAnimationTimeWidget_h
5 #define pqAnimationTimeWidget_h
6 
7 #include "pqComponentsModule.h"
8 #include "pqDoubleLineEdit.h" // for pqDoubleLineEdit::RealNumberNotation.
9 
10 #include "vtkParaViewDeprecation.h" // for PARAVIEW_DEPRECATED_IN_5_12_0
11 
12 #include <QList>
13 #include <QScopedPointer>
14 #include <QVariant>
15 #include <QWidget>
16 #include <vector>
17 
18 class pqAnimationScene;
19 class vtkSMProxy;
20 
29 {
30  Q_OBJECT
31  Q_ENUMS(RealNumberNotation)
32  Q_PROPERTY(QString playMode READ playMode WRITE setPlayMode NOTIFY playModeChanged)
33  Q_PROPERTY(int numberOfFrames READ numberOfFrames WRITE setNumberOfFrames)
34  Q_PROPERTY(double startTime READ startTime WRITE setStartTime)
35  Q_PROPERTY(double endTime READ endTime WRITE setEndTime)
36  Q_PROPERTY(QString timeLabel READ timeLabel WRITE setTimeLabel)
37  Q_PROPERTY(QList<QVariant> timestepValues READ timestepValues WRITE setTimestepValues)
38 
39  typedef QWidget Superclass;
40 
41 public:
42  pqAnimationTimeWidget(QWidget* parent = nullptr);
43  ~pqAnimationTimeWidget() override;
45 
50  vtkSMProxy* animationScene() const;
51 
55  void setAnimationScene(pqAnimationScene* animationScene);
56 
58 
62  void setTimestepValues(const QList<QVariant>& list);
63  const QList<QVariant>& timestepValues() const;
65 
67 
70  void setStartTime(double start);
71  double startTime() const;
73 
75 
78  void setEndTime(double end);
79  double endTime() const;
81 
83 
86  void setNumberOfFrames(int nbOfFrame);
87  int numberOfFrames() const;
89 
93  void setCurrentTime(double t);
94 
99  RealNumberNotation notation() const;
100 
105  int precision() const;
106 
108 
111  void setPlayMode(const QString& mode);
112  QString playMode() const;
114 
116 
119  void setTimeLabel(const QString& val);
120  QString timeLabel() const;
122 
123 Q_SIGNALS:
124  void playModeChanged();
125  void dummySignal();
126 
127 public Q_SLOTS:
132  PARAVIEW_DEPRECATED_IN_5_12_0("Unused. Display rely on global setting")
133  void setNotation(RealNumberNotation _notation);
134 
139  PARAVIEW_DEPRECATED_IN_5_12_0("Unused. Display rely on global setting")
140  void setPrecision(int precision);
141 
146  void render();
147 
148 protected Q_SLOTS:
152  void updateCurrentTime(double t);
153 
154 private:
155  Q_DISABLE_COPY(pqAnimationTimeWidget)
156 
157  class pqInternals;
158  QScopedPointer<pqInternals> Internals;
159 };
160 
161 #endif
#define PARAVIEW_DEPRECATED_IN_5_12_0(reason)
RealNumberNotation
This enum specifies which notations to use for displaying the value.
#define PQCOMPONENTS_EXPORT
pqLineEdit subclass that supports a low precision view when inactive
pqAnimationTimeWidget is a widget that can be used to show/set the current animation time...
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
#define const
Definition: zconf.h:238
pqAnimationScene is a representation for a vtkSMAnimationScene proxy.