Fraxinus  16.5.0-fx-rc6
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cxMainWindowActions.h
Go to the documentation of this file.
1 #ifndef CXMAINWINDOWACTIONS_H
2 #define CXMAINWINDOWACTIONS_H
3 
4 #include "cxGuiExport.h"
5 
6 #include <QObject>
7 #include <map>
8 #include <set>
9 #include "boost/shared_ptr.hpp"
10 
11 class QAction;
12 class QMenu;
13 class QActionGroup;
14 class QDockWidget;
15 class QScrollArea;
16 
17 namespace cx
18 {
19 typedef boost::shared_ptr<class VisServices> VisServicesPtr;
20 typedef boost::shared_ptr<class ProcessWrapper> ProcessWrapperPtr;
21 typedef boost::shared_ptr<class ScreenShotImageWriter> ScreenShotImageWriterPtr;
22 
29 class cxGui_EXPORT MainWindowActions : public QObject
30 {
31  Q_OBJECT
32 public:
33  MainWindowActions(VisServicesPtr services, QWidget* parent);
34  QAction* getAction(QString uid);
35 
36 private slots:
37  // File menu
38  void newPatientSlot();
39  void loadPatientFileSlot();
40  void savePatientFileSlot();
41  void clearPatientSlot();
42  //data menu
43  void exportDataSlot();
44  void importDataSlot();
45 
46  void togglePointPickerActionSlot();
47  void updatePointPickerActionSlot();
48 
49  //tool menu
50  void configureSlot();
51 
52  // help
53  void onGotoDocumentation();
54 
55  // navigation
56  void centerToImageCenterSlot();
57  void centerToTooltipSlot();
58 
59  void updateTrackingActionSlot();
60  void toggleTrackingSlot();
61  void toggleStreamingSlot();
62  void updateStreamingActionSlot();
63 
64  void shootScreen();
65  void shootWindow();
66  void recordFullscreen();
67  void updateRecordFullscreenActionSlot();
68 
69  void onStartLogConsole();
70 
71 private:
72  VisServicesPtr mServices;
73  void createActions();
74 
75  std::map<QString, QAction*> mActions;
76 
77  QAction* mShowPointPickerAction;
78  QAction* mTrackingToolsAction;
79  QAction* mStartStreamingAction;
80  QAction* mRecordFullscreenStreamingAction;
81 
82  QString mLastImportDataFolder;
83  ProcessWrapperPtr mLocalVideoServerProcess;
84  ScreenShotImageWriterPtr mScreenShotWriter;
85 
86  void createPatientActions();
87  void createTrackingActions();
88  QString getExistingSessionFolder();
89  QWidget* parentWidget();
90  void shootOneLayout(int index);
91 
92  template <class T>
93  QAction* createAction(QString uid, QString text, QIcon icon,
94  QKeySequence shortcut, QString help,
95  T triggerSlot);
96 };
97 
98 } // namespace cx
99 
100 
101 #endif // CXMAINWINDOWACTIONS_H
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:62
boost::shared_ptr< class ScreenShotImageWriter > ScreenShotImageWriterPtr
boost::shared_ptr< class ProcessWrapper > ProcessWrapperPtr
Definition: cxMainWindow.h:63