Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qMRMLSequenceBrowserPlayWidget.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Copyright (c) Brigham and Women's Hospital
6 
7  See COPYRIGHT.txt
8  or http://www.slicer.org/copyright/copyright.txt for details.
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16  This file was originally developed by Laurent Chauvin, Brigham and Women's
17  Hospital. The project was supported by grants 5P01CA067165,
18  5R01CA124377, 5R01CA138586, 2R44DE019322, 7R01CA124377,
19  5R42CA137886, 5R42CA137886
20  It was then updated for the Markups module by Nicole Aucoin, BWH.
21 
22 ==============================================================================*/
23 
24 #ifndef __qMRMLSequenceBrowserPlayWidget_h
25 #define __qMRMLSequenceBrowserPlayWidget_h
26 
27 // CTK includes
28 #include <ctkPimpl.h>
29 #include <ctkVTKObject.h>
30 
31 // Slicer includes
32 #include "qMRMLWidget.h"
33 
34 #include "qSlicerSequencesModuleWidgetsExport.h"
35 
36 class qMRMLSequenceBrowserPlayWidgetPrivate;
37 class vtkMRMLNode;
39 
41 class Q_SLICER_MODULE_SEQUENCES_WIDGETS_EXPORT qMRMLSequenceBrowserPlayWidget
42 : public qMRMLWidget
43 {
44  Q_OBJECT
45  QVTK_OBJECT
46 
50  Q_PROPERTY(bool RecordingControlsVisible READ recordingControlsVisible WRITE setRecordingControlsVisible)
51 
52 
53 public:
55  qMRMLSequenceBrowserPlayWidget(QWidget *newParent = 0);
57 
59  void setPlayPauseShortcut(QString keySequence);
60 
62  void setPreviousFrameShortcut(QString keySequence);
63 
65  void setNextFrameShortcut(QString keySequence);
66 
71  bool recordingControlsVisible() const;
72 
73 public slots:
74  void setMRMLSequenceBrowserNode(vtkMRMLSequenceBrowserNode* browserNode);
75  void setMRMLSequenceBrowserNode(vtkMRMLNode* browserNode);
76  void setPlaybackEnabled(bool play);
77  void setRecordingEnabled(bool play);
78  void setPlaybackRateFps(double playbackRateFps);
79  void setPlaybackLoopEnabled(bool loopEnabled);
80  void setRecordingControlsVisible(bool show);
81  void onVcrFirst();
82  void onVcrPrevious();
83  void onVcrNext();
84  void onVcrLast();
85  void onVcrPlayPause();
86  void onRecordSnapshot();
87 
88 protected slots:
89  void updateWidgetFromMRML();
90 
91 protected:
92  QScopedPointer<qMRMLSequenceBrowserPlayWidgetPrivate> d_ptr;
93 
94 private:
95  Q_DECLARE_PRIVATE(qMRMLSequenceBrowserPlayWidget);
96  Q_DISABLE_COPY(qMRMLSequenceBrowserPlayWidget);
97 
98 };
99 
100 #endif
QScopedPointer< qMRMLSequenceBrowserPlayWidgetPrivate > d_ptr
Base class for any widget that requires a MRML Scene.
Definition: qMRMLWidget.h:35
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167