CustusX  15.8
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 
28 class cxGui_EXPORT MainWindowActions : public QObject
29 {
30  Q_OBJECT
31 public:
32  MainWindowActions(VisServicesPtr services, QWidget* parent);
33  QAction* getAction(QString uid);
34 
35 private slots:
36  // File menu
37  void newPatientSlot();
38  void loadPatientFileSlot();
39  void savePatientFileSlot();
40  void clearPatientSlot();
41  //data menu
42  void exportDataSlot();
43  void importDataSlot();
44  void deleteDataSlot();
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 
85  void createPatientActions();
86  void createTrackingActions();
87  QString getExistingSessionFolder();
88  QWidget* parentWidget();
89  void saveScreenShot(QPixmap pixmap, QString id="");
90  void saveScreenShotThreaded(QImage pixmap, QString filename);
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 ProcessWrapper > ProcessWrapperPtr
Definition: cxMainWindow.h:63