2 * Declarations for Qt4 based control panel
4 #ifndef _CONTROLPANEL_H
5 #define _CONTROLPANEL_H
7 //#define CONTROLPANEL_DISABLED // To turn off the control panel
9 #ifndef CONTROLPANEL_DISABLED
12 #include <QPushButton>
13 #include <QMainWindow>
18 #include <QApplication>
29 * Class to manage Qt control panel
30 * Should be a singleton from the point of view of View, Document, Screen
31 * - Just call "Update"
33 class ControlPanel : public QMainWindow
35 Q_OBJECT // Having this causes shit about undefined vtables
36 // Not having it means things break
37 // Apparently you need "qmake" to build qt applications
38 // Or some bullshit -_-
49 static int Run(void * args);
50 static void Update() {if (g_panel != NULL) g_panel->UpdateAll();};
52 ControlPanel(RunArgs & a, QWidget * p = NULL);
53 virtual ~ControlPanel() {}
56 void SetGPURendering();
57 void SetCPURendering();
61 static ControlPanel * g_panel;
70 QMenu * CreateMainMenu();
71 QMenu * CreateViewMenu();
72 QMenu * CreateDocumentMenu();
73 QMenu * CreateScreenMenu();
75 QAction * m_screen_gpu_rendering;
76 QAction * m_screen_cpu_rendering;
83 #endif //CONTROLPANEL_DISABLED
85 #endif //_CONTROLPANEL_H