COPASI API  4.16.103
CQAnimationControls.h
Go to the documentation of this file.
1 // Copyright (C) 2013 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 #ifndef QANIMATION_CONTROLS_H
7 #define QANIMATION_CONTROLS_H
8 
9 #include <QtGui/QWidget>
10 
11 #include <qlayout/ui_CQAnimationControls.h>
12 
13 class QTimer;
14 
15 class CQAnimationControls : public QWidget, public Ui::CQAnimationControls
16 {
17  Q_OBJECT
18 public:
19  CQAnimationControls(QWidget* parent = NULL);
20  virtual ~CQAnimationControls();
21 
22  void setNumSteps(size_t numSteps);
23  void setCurrentStep(size_t currentStep);
24  bool isPlaying() const;
25 
26 public slots:
27  void slotChangeInterval(int);
28  void slotBack();
29  void slotForward();
30  void slotTogglePlayPause();
31  void slotStepBack();
32  void slotStepForward();
33  void slotStop();
34  void slotShowStep(int);
35 
36 signals:
37  void play();
38  void pause();
39  void stop();
40  void forward();
41  void backward();
42  void step_forward();
43  void step_backward();
44  void showStep(int);
45 
46 protected:
47  size_t mNumSteps;
48  size_t mCurrentStep;
50  QTimer *mpTimer;
51 
52  void updateButtons();
53  void updateActions();
54  void createActions();
55 };
56 
57 #endif // QANIMATION_CONTROLS_H
void setNumSteps(size_t numSteps)
CQAnimationControls(QWidget *parent=NULL)
void setCurrentStep(size_t currentStep)