gui.cpp

changeset 30
31ff9aabd506
parent 29
55406ce7446e
child 32
5d22b7ecf110
equal deleted inserted replaced
29:55406ce7446e 30:31ff9aabd506
1 /*
2 * LDForge: LDraw parts authoring CAD
3 * Copyright (C) 2013 Santeri `arezey` Piippo
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
1 #include <QtGui> 19 #include <QtGui>
2 20
3 #include "common.h" 21 #include "common.h"
4 #include "gldraw.h" 22 #include "gldraw.h"
5 #include "gui.h" 23 #include "gui.h"
80 MAKE_ACTION (newVector, "New Vector", "add-vector", "Creates a new vector.") 98 MAKE_ACTION (newVector, "New Vector", "add-vector", "Creates a new vector.")
81 MAKE_ACTION (newVertex, "New Vertex", "add-vertex", "Creates a new vertex.") 99 MAKE_ACTION (newVertex, "New Vertex", "add-vertex", "Creates a new vertex.")
82 100
83 MAKE_ACTION (settings, "Settings", "settings", "Edit the settings of " APPNAME_DISPLAY ".") 101 MAKE_ACTION (settings, "Settings", "settings", "Edit the settings of " APPNAME_DISPLAY ".")
84 102
103 MAKE_ACTION (help, "Help", "help", "Shows the " APPNAME_DISPLAY " help manual.")
85 MAKE_ACTION (about, sAboutText, "ldforge", "Shows information about " APPNAME_DISPLAY ".") 104 MAKE_ACTION (about, sAboutText, "ldforge", "Shows information about " APPNAME_DISPLAY ".")
86 MAKE_ACTION (aboutQt, "About Qt", "aboutQt", "Shows information about Qt.") 105 MAKE_ACTION (aboutQt, "About Qt", "aboutQt", "Shows information about Qt.")
87 106
88 // Keyboard shortcuts 107 // Keyboard shortcuts
89 qAct_new->setShortcut (Qt::CTRL | Qt::Key_N); 108 qAct_new->setShortcut (Qt::CTRL | Qt::Key_N);
107 qAct_cut, 126 qAct_cut,
108 qAct_copy, 127 qAct_copy,
109 qAct_paste, 128 qAct_paste,
110 qAct_about, 129 qAct_about,
111 qAct_inline, 130 qAct_inline,
131 qAct_help,
112 }; 132 };
113 133
114 for (ushort i = 0; i < sizeof qaDisabledActions / sizeof *qaDisabledActions; ++i) 134 for (ushort i = 0; i < sizeof qaDisabledActions / sizeof *qaDisabledActions; ++i)
115 qaDisabledActions[i]->setEnabled (false); 135 qaDisabledActions[i]->setEnabled (false);
116 } 136 }
150 qEditMenu->addAction (qAct_splitQuads); // Split Quads 170 qEditMenu->addAction (qAct_splitQuads); // Split Quads
151 qEditMenu->addAction (qAct_setContents); // Set Contents 171 qEditMenu->addAction (qAct_setContents); // Set Contents
152 172
153 // Help menu 173 // Help menu
154 qHelpMenu = menuBar ()->addMenu (tr ("&Help")); 174 qHelpMenu = menuBar ()->addMenu (tr ("&Help"));
175 qHelpMenu->addAction (qAct_help); // Help
176 qHelpMenu->addSeparator (); // -----
155 qHelpMenu->addAction (qAct_about); // About 177 qHelpMenu->addAction (qAct_about); // About
156 qHelpMenu->addAction (qAct_aboutQt); // About Qt 178 qHelpMenu->addAction (qAct_aboutQt); // About Qt
157 } 179 }
158 180
159 // ============================================================================= 181 // =============================================================================
275 297
276 void ForgeWindow::slot_newComment () { 298 void ForgeWindow::slot_newComment () {
277 299
278 } 300 }
279 301
302 void ForgeWindow::slot_help () {
303
304 }
305
280 void ForgeWindow::slot_about () { 306 void ForgeWindow::slot_about () {
281 307
282 } 308 }
283 309
284 void ForgeWindow::slot_aboutQt () { 310 void ForgeWindow::slot_aboutQt () {
361 } 387 }
362 388
363 if (ulIndex >= g_CurrentFile->objects.size()) 389 if (ulIndex >= g_CurrentFile->objects.size())
364 return; 390 return;
365 391
366 Dialog_SetContents::staticDialog (obj, this); 392 SetContentsDialog::staticDialog (obj, this);
367 } 393 }
368 394
369 // ============================================================================= 395 // =============================================================================
370 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 396 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
371 // ============================================================================= 397 // =============================================================================

mercurial