COPASI API  4.16.103
CQPlayerControlWidget.h
Go to the documentation of this file.
1 // Copyright (C) 2010 - 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 // Copyright (C) 2008 - 2009 by Pedro Mendes, Virginia Tech Intellectual
7 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
8 // and The University of Manchester.
9 // All rights reserved.
10 
11 #ifndef CQPlayerControlWidget_H__
12 #define CQPlayerControlWidget_H__
13 
14 #include <QtGui/QWidget>
15 
16 class QAction;
17 class QPushButton;
18 
19 class CQPlayerControlWidget : public QWidget
20 {
21 
22  Q_OBJECT
23 
24 signals:
25  void play();
26  void pause();
27  void stop();
28  void forward();
29  void backward();
30  void step_forward();
31  void step_backward();
32 
33 private slots:
34  void slot_play_clicked();
35  void slot_pause_clicked();
36  void slot_stop_clicked();
37  void slot_forward_clicked();
38  void slot_backward_clicked();
41 
42 protected:
43  size_t mNumSteps;
44  size_t mCurrentStep;
45  bool mPlaying;
46 
47  QPushButton* mpPlayButton;
48  QPushButton* mpStopButton;
49  QPushButton* mpForwardButton;
50  QPushButton* mpBackwardButton;
51  QPushButton* mpStepForwardButton;
52  QPushButton* mpStepBackwardButton;
53 
54  QAction* mpPlayAction;
55  QAction* mpPauseAction;
56  QAction* mpStopAction;
57  QAction* mpForwardAction;
58  QAction* mpBackwardAction;
61 
62 public:
63  CQPlayerControlWidget(QWidget* pParent = NULL);
64 
65  void setNumSteps(size_t numSteps);
66  void setCurrentStep(size_t currentStep);
67  bool isPlaying() const;
68 
69  QAction* getPlayAction();
70  QAction* getPauseAction();
71  QAction* getStopAction();
72  QAction* getForwardAction();
73  QAction* getBackwardAction();
74  QAction* getStepForwardAction();
75  QAction* getStepBackwardAction();
76 
77 protected:
78  void updateButtons();
79  void updateActions();
80  void createActions();
81 };
82 
83 #endif // CQPlayerControlWidget_H__
void setNumSteps(size_t numSteps)
void setCurrentStep(size_t currentStep)
CQPlayerControlWidget(QWidget *pParent=NULL)
QPushButton * mpStepBackwardButton