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 <QList>
11 #include <QScopedPointer>
12 #include <QVariant>
13 #include <QWidget>
14 #include <vector>
15 
16 class pqAnimationScene;
17 class vtkSMProxy;
18 
26 class PQCOMPONENTS_EXPORT pqAnimationTimeWidget : public QWidget
27 {
28  Q_OBJECT
29  Q_PROPERTY(QString playMode READ playMode WRITE setPlayMode NOTIFY playModeChanged)
30  Q_PROPERTY(int numberOfFrames READ numberOfFrames WRITE setNumberOfFrames)
31  Q_PROPERTY(double startTime READ startTime WRITE setStartTime)
32  Q_PROPERTY(double endTime READ endTime WRITE setEndTime)
33  Q_PROPERTY(QString timeLabel READ timeLabel WRITE setTimeLabel)
34  Q_PROPERTY(QList<QVariant> timestepValues READ timestepValues WRITE setTimestepValues)
35 
36  typedef QWidget Superclass;
37 
38 public:
39  pqAnimationTimeWidget(QWidget* parent = nullptr);
40  ~pqAnimationTimeWidget() override;
42 
47  vtkSMProxy* animationScene() const;
48 
52  void setAnimationScene(pqAnimationScene* animationScene);
53 
55 
59  void setTimestepValues(const QList<QVariant>& list);
60  const QList<QVariant>& timestepValues() const;
62 
64 
67  void setStartTime(double start);
68  double startTime() const;
70 
72 
75  void setEndTime(double end);
76  double endTime() const;
78 
80 
83  void setNumberOfFrames(int nbOfFrame);
84  int numberOfFrames() const;
86 
90  void setCurrentTime(double t);
91 
96  RealNumberNotation notation() const;
97 
102  int precision() const;
103 
105 
108  void setPlayMode(const QString& mode);
109  QString playMode() const;
111 
113 
116  void setTimeLabel(const QString& val);
117  QString timeLabel() const;
119 
120 Q_SIGNALS:
121  void playModeChanged();
122  void dummySignal();
123 
124 public Q_SLOTS:
125 
130  void render();
131 
132 protected Q_SLOTS:
136  void updateCurrentTime(double t);
137 
138 private:
139  Q_DISABLE_COPY(pqAnimationTimeWidget)
140 
141  class pqInternals;
142  QScopedPointer<pqInternals> Internals;
143 };
144 
145 #endif
RealNumberNotation
This enum specifies which notations to use for displaying the value.
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
pqAnimationScene is a representation for a vtkSMAnimationScene proxy.