Added status bar with full file path and graph zoom
[hypercube:hypercube.git] / GUI / gui.h
1 #ifndef GUI_H_
2 #define GUI_H_
3
4 #include <QtGui>
5
6 class GraphTab;
7 class FloatEdit;
8 class IntEdit;
9 class ColorComboBox;
10
11
12 class GUI : public QMainWindow
13 {
14         Q_OBJECT
15
16 public:
17         GUI();
18
19 private slots:
20         void about();
21         void saveFile();
22         void saveAs();
23         void saveAll();
24         void openFile();
25         void closeFile();
26         void transformGraph();
27         void reloadGraph();
28         void projectGraph(bool checked);
29
30         void setNodeDistribution(float value);
31         void setEdgeLength(float value);
32         void setEdgeCrossings(float value);
33         void setInitTemp(float value);
34         void setFinalTemp(float value);
35         void setCoolFactor(float value);
36         void setNumSteps(int value);
37         void setSALogInfo(int state);
38
39         void setGraphWidth(int width);
40         void setGraphHeight(int height);
41
42         void setVertexColor(const QColor &color);
43         void setEdgeColor(const QColor &color);
44         void setVertexSize(int size);
45         void setEdgeSize(int size);
46         void setEdgeFontSize(int size);
47         void setVertexFontSize(int size);
48
49         void showEdgeValues(int state);
50         void showVertexIDs(int state);
51
52         void tabChanged(int current);
53
54 private:
55         void createActions();
56         void createMenus();
57         void createToolBars();
58         void createStatusBar();
59
60         void createViews();
61         void createProperties();
62         void createSAProperties();
63         void createGraphProperties();
64
65         void getSAProperties(GraphTab *tab);
66         void getGraphProperties(GraphTab *tab);
67         void setSAProperties(GraphTab *tab);
68         void setGraphProperties(GraphTab *tab);
69
70
71         QMenu *_fileMenu;
72         QMenu *_aboutMenu;
73         QMenu *_graphMenu;
74
75         QToolBar *_fileToolBar;
76         QToolBar *_graphToolBar;
77
78         QWidget *_graphProperties;
79         QWidget *_SAProperties;
80
81         QActionGroup *_fileActionGroup;
82         QActionGroup *_graphActionGroup;
83
84         QAction *_exitAction;
85         QAction *_aboutAction;
86         QAction *_aboutQtAction;
87         QAction *_saveFileAction;
88         QAction *_saveAsAction;
89         QAction *_saveAllAction;
90         QAction *_openFileAction;
91         QAction *_closeFileAction;
92         QAction *_transformAction;
93         QAction *_reloadAction;
94         QAction *_projectAction;
95
96         QToolBox *_properties;
97         QTabWidget *_viewTab;
98
99         QSpinBox *_graphWidth;
100         QSpinBox *_graphHeight;
101         QSpinBox *_edgeSize;
102         QSpinBox *_vertexSize;
103         QSpinBox *_edgeFontSize;
104         QSpinBox *_vertexFontSize;
105         QCheckBox *_edgeValues;
106         QCheckBox *_vertexIDs;
107         ColorComboBox *_edgeColor;
108         ColorComboBox *_vertexColor;
109
110         FloatEdit *_nodeDistribution;
111         FloatEdit *_edgeLength;
112         FloatEdit *_edgeCrossings;
113         FloatEdit *_initTemp;
114         FloatEdit *_finalTemp;
115         FloatEdit *_coolFactor;
116         IntEdit *_numSteps;
117         QCheckBox *_debug;
118
119         QLabel *_fileName;
120         QLabel *_zoom;
121
122         GraphTab* _masterTab;
123
124 private slots:
125         void zoom(qreal zoom);
126 };
127
128 #endif // GUI_H_