src/gui.h

changeset 186
a130960bb220
parent 183
f1b8cb53d2a2
child 189
ac2d3e8dd110
equal deleted inserted replaced
185:6fea53f1ffc2 186:a130960bb220
35 class QComboBox; 35 class QComboBox;
36 class ForgeWindow; 36 class ForgeWindow;
37 class color; 37 class color;
38 class QSplitter; 38 class QSplitter;
39 class DelHistory; 39 class DelHistory;
40 class QToolButton;
40 41
41 // Stuff for dialogs 42 // Stuff for dialogs
42 #define IMPLEMENT_DIALOG_BUTTONS \ 43 #define IMPLEMENT_DIALOG_BUTTONS \
43 bbx_buttons = new QDialogButtonBox (QDialogButtonBox::Ok | QDialogButtonBox::Cancel); \ 44 bbx_buttons = new QDialogButtonBox (QDialogButtonBox::Ok | QDialogButtonBox::Cancel); \
44 connect (bbx_buttons, SIGNAL (accepted ()), this, SLOT (accept ())); \ 45 connect (bbx_buttons, SIGNAL (accepted ()), this, SLOT (accept ())); \
76 #define CTRL_SHIFT(N) (Qt::CTRL | Qt::SHIFT | Qt::Key_##N) 77 #define CTRL_SHIFT(N) (Qt::CTRL | Qt::SHIFT | Qt::Key_##N)
77 78
78 // ============================================================================= 79 // =============================================================================
79 typedef struct { 80 typedef struct {
80 color* col; 81 color* col;
81 QPushButton* btn; 82 QToolButton* btn;
82 bool bSeparator; 83 bool bSeparator;
83 } quickColorMetaEntry; 84 } quickColorMetaEntry;
84 85
85 // ============================================================================= 86 // =============================================================================
86 // ActionAdder 87 // ActionAdder
167 str m_msglogHTML; 168 str m_msglogHTML;
168 QToolBar* m_colorToolBar; 169 QToolBar* m_colorToolBar;
169 std::vector<QToolBar*> m_toolBars; 170 std::vector<QToolBar*> m_toolBars;
170 std::vector<LDObject*> m_sel; 171 std::vector<LDObject*> m_sel;
171 std::vector<quickColorMetaEntry> m_colorMeta; 172 std::vector<quickColorMetaEntry> m_colorMeta;
172 std::vector<QPushButton*> m_colorButtons; 173 std::vector<QToolButton*> m_colorButtons;
173 std::vector<QAction*> m_recentFiles; 174 std::vector<QAction*> m_recentFiles;
174 175
175 void createMenuActions (); 176 void createMenuActions ();
176 void createMenus (); 177 void createMenus ();
177 void createToolbars (); 178 void createToolbars ();
242 std::vector<quickColorMetaEntry> parseQuickColorMeta (); 243 std::vector<quickColorMetaEntry> parseQuickColorMeta ();
243 bool confirm (str title, str msg); 244 bool confirm (str title, str msg);
244 bool confirm (str msg); 245 bool confirm (str msg);
245 void critical (str msg); 246 void critical (str msg);
246 QAction* findAction (str name); 247 QAction* findAction (str name);
248 QIcon makeColorIcon (color* colinfo, const ushort size);
247 void makeColorSelector (QComboBox* box); 249 void makeColorSelector (QComboBox* box);
248 250
249 // ----------------------------------------------------------------------------- 251 // -----------------------------------------------------------------------------
250 // Pointer to the instance of ForgeWindow. 252 // Pointer to the instance of ForgeWindow.
251 extern ForgeWindow* g_win; 253 extern ForgeWindow* g_win;

mercurial