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 
27 {
28  Q_OBJECT
29  Q_ENUMS(RealNumberNotation)
30  Q_PROPERTY(QString playMode READ playMode WRITE setPlayMode NOTIFY playModeChanged)
31  Q_PROPERTY(int numberOfFrames READ numberOfFrames WRITE setNumberOfFrames)
32  Q_PROPERTY(double startTime READ startTime WRITE setStartTime)
33  Q_PROPERTY(double endTime READ endTime WRITE setEndTime)
34  Q_PROPERTY(QString timeLabel READ timeLabel WRITE setTimeLabel)
35  Q_PROPERTY(QList<QVariant> timestepValues READ timestepValues WRITE setTimestepValues)
36 
37  typedef QWidget Superclass;
38 
39 public:
40  pqAnimationTimeWidget(QWidget* parent = nullptr);
41  ~pqAnimationTimeWidget() override;
43 
48  vtkSMProxy* animationScene() const;
49 
53  void setAnimationScene(pqAnimationScene* animationScene);
54 
56 
60  void setTimestepValues(const QList<QVariant>& list);
61  const QList<QVariant>& timestepValues() const;
63 
65 
68  void setStartTime(double start);
69  double startTime() const;
71 
73 
76  void setEndTime(double end);
77  double endTime() const;
79 
81 
84  void setNumberOfFrames(int nbOfFrame);
85  int numberOfFrames() const;
87 
91  void setCurrentTime(double t);
92 
97  RealNumberNotation notation() const;
98 
103  int precision() const;
104 
106 
109  void setPlayMode(const QString& mode);
110  QString playMode() const;
112 
114 
117  void setTimeLabel(const QString& val);
118  QString timeLabel() const;
120 
121 Q_SIGNALS:
122  void playModeChanged();
123  void dummySignal();
124 
125 public Q_SLOTS:
126 
131  void render();
132 
133 protected Q_SLOTS:
137  void updateCurrentTime(double t);
138 
139 private:
140  Q_DISABLE_COPY(pqAnimationTimeWidget)
141 
142  class pqInternals;
143  QScopedPointer<pqInternals> Internals;
144 };
145 
146 #endif
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.