Fraxinus  17.12-rc4
An IGT application
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 loadPatientFileCopySlot();
41  void savePatientFileSlot();
42  void clearPatientSlot();
43  //data menu
44  void exportDataSlot();
45  void importDataSlot();
46 
47  void togglePointPickerActionSlot();
48  void updatePointPickerActionSlot();
49 
50  //tool menu
51  void configureSlot();
52 
53  // help
54  void onGotoDocumentation();
55 
56  // navigation
57  void centerToImageCenterSlot();
58  void centerToTooltipSlot();
59 
60  void updateTrackingActionSlot();
61  void toggleTrackingSlot();
62  void toggleStreamingSlot();
63  void updateStreamingActionSlot();
64 
65  void shootScreen();
66  void shootWindow();
67  void recordFullscreen();
68  void updateRecordFullscreenActionSlot();
69 
70  void onStartLogConsole();
71 
72 private:
73  VisServicesPtr mServices;
74  void createActions();
75 
76  std::map<QString, QAction*> mActions;
77 
78  QAction* mShowPointPickerAction;
79  QAction* mTrackingToolsAction;
80  QAction* mStartStreamingAction;
81  QAction* mRecordFullscreenStreamingAction;
82 
83  QString mLastImportDataFolder;
84  ProcessWrapperPtr mLocalVideoServerProcess;
85  ScreenShotImageWriterPtr mScreenShotWriter;
86 
87  void createPatientActions();
88  void createTrackingActions();
89  QString getExistingSessionFolder();
90  QWidget* parentWidget();
91  void shootOneLayout(int index);
92 
93  template <class T>
94  QAction* createAction(QString uid, QString text, QIcon icon,
95  QKeySequence shortcut, QString help,
96  T triggerSlot);
97  QString selectNewPatientFolder();
98 };
99 
100 } // namespace cx
101 
102 
103 #endif // CXMAINWINDOWACTIONS_H
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:61
boost::shared_ptr< class ScreenShotImageWriter > ScreenShotImageWriterPtr
boost::shared_ptr< class ProcessWrapper > ProcessWrapperPtr
Definition: cxMainWindow.h:62
Namespace for all CustusX production code.