tilde~
Puredata Qt-based GUI
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BaseWindow.h
Go to the documentation of this file.
1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H
3 
4 #include <QMainWindow>
5 #include <QWindow>
6 #include <QtWidgets>
7 
8 namespace Ui {
9 class cm_basewindow;
10 }
11 
12 namespace tilde {
13 
14 class ApplicationController;
15 
19 class BaseWindow : public QMainWindow {
20  Q_OBJECT
21 
22  ApplicationController* _appController;
23 
24  QMenu* _recentMenu;
25 
26  QFileSystemWatcher* _scriptsFolderWatcher;
27 
28 public:
29  explicit BaseWindow(QWidget* parent = 0);
30 
32  ApplicationController* appController() { return _appController; };
33  void createActions();
34  void createMenus();
35  void createScriptsMenu();
36 
37  void setRecentMenu(QMenu* menu);
38 
39 private:
40  Ui::cm_basewindow* _ui;
41 
42  QMenuBar* _menuBar;
43 
44  QMenu* _findMenu;
45  QMenu* _mediaMenu;
46  QMenu* _windowMenu;
47 
48  QAction* _newAct;
49 
50  QAction* _exitAct;
51 
52  QAction* _dspOnAct;
53  QAction* _dspOffAct;
54 
55  QAction* _pdWindowAct;
56  QAction* _pythonConsoleAct;
57  QAction* _pdAudioSettingsAct;
58  QAction* _pdPreferencesAct;
59  QAction* _pdKeyBindingsAct;
60 
61  QAction* _pdHelpAct;
62  QAction* _aboutAct;
63 
64  QAction* _newScriptAct;
65 
66 public:
67  QAction* messageAct;
68 
69  QAction* openAct;
70 
71  QAction* saveAct;
72  QAction* saveAsAct;
73 
74  QAction* closeAct;
75 
76  QAction* cutAct;
77  QAction* copyAct;
78  QAction* duplicateAct;
79  QAction* pasteAct;
80 
81  QAction* undoAct;
82  QAction* redoAct;
83 
84  QMenu* fileMenu;
85  QMenu* editMenu;
86  QMenu* putMenu;
87  QMenu* arrangeMenu;
88 
89  QMenu* scriptsMenu;
90 
91  QMenu* helpMenu;
92 
93 private slots:
94 
95  void close();
96 
97  void slotRunScript();
98 
99  void slotUpdateScriptsMenu(QString);
100 
101  void slotAboutMenu();
102 
103  // void slotCreateScriptList();
104 };
105 }
106 
107 #endif // MAINWINDOW_H
void createScriptsMenu()
create all menus
Definition: BaseWindow.cpp:239
QAction * cutAct
Definition: BaseWindow.h:76
void createMenus()
create all menus
Definition: BaseWindow.cpp:172
QAction * saveAct
Definition: BaseWindow.h:71
QMenu * fileMenu
Definition: BaseWindow.h:84
QAction * openAct
Definition: BaseWindow.h:69
QAction * pasteAct
Definition: BaseWindow.h:79
QAction * duplicateAct
Definition: BaseWindow.h:78
The Application Controller class.
Definition: ApplicationController.h:44
QMenu * arrangeMenu
Definition: BaseWindow.h:87
QMenu * helpMenu
Definition: BaseWindow.h:91
QAction * undoAct
Definition: BaseWindow.h:81
void setAppController(ApplicationController *appController)
Definition: BaseWindow.cpp:50
QAction * redoAct
Definition: BaseWindow.h:82
QMenu * scriptsMenu
Definition: BaseWindow.h:89
QMenu * putMenu
Definition: BaseWindow.h:86
QAction * messageAct
Definition: BaseWindow.h:67
QAction * saveAsAct
Definition: BaseWindow.h:72
void createActions()
Definition: BaseWindow.cpp:81
QAction * closeAct
Definition: BaseWindow.h:74
QMenu * editMenu
Definition: BaseWindow.h:85
ApplicationController * appController()
Definition: BaseWindow.h:32
void setRecentMenu(QMenu *menu)
create scripts menu
Definition: BaseWindow.cpp:263
BaseWindow(QWidget *parent=0)
Definition: BaseWindow.cpp:29
Base class for windows (patch, pd)
Definition: BaseWindow.h:19
QAction * copyAct
Definition: BaseWindow.h:77