#include <formmain.h>
Public Member Functions | |
| CFormMain (CSailApp *myApp, QWidget *parent=0) | |
| void | show (const QString newname=QString::null) |
Protected Slots | |
| virtual void | languageChange () |
| virtual void | slotAbout () |
| virtual void | slotAboutQt () |
| virtual void | slotNew () |
| virtual void | slotOpen () |
| virtual void | slotOpenRecent () |
| virtual void | slotSave () |
| virtual void | slotSaveAs () |
| virtual void | slotHandbook () |
| virtual void | slotLanguage () |
| virtual void | slotUpdateDocumentMenus () |
| virtual void | slotUpdateWindowMenu () |
Protected Member Functions | |
| void | closeEvent (QCloseEvent *e) |
| void | makeMenuMru () |
| void | open (QString filename) |
Protected Attributes | |
| QWorkspace * | workspace |
| QSignalMapper * | windowMapper |
| QUrl | handbook |
| CSailApp * | app |
| CPrefs * | prefs |
| QStatusBar * | statusbar |
| QMenu * | menuFile |
| QMenu * | menuFileNew |
| QMenu * | menuHelp |
| QMenu * | menuView |
| QMenu * | menuWindow |
| QMenu * | menuLanguage |
| QMenu * | menuRecent |
| QAction * | actionAbout |
| QAction * | actionAboutQt |
| QAction * | actionClose |
| QAction * | actionCloseAll |
| QAction * | actionTile |
| QAction * | actionCascade |
| QAction * | actionHandbook |
| QAction * | actionNewBoat |
| QAction * | actionNewHull |
| QAction * | actionNewRig |
| QAction * | actionNewSail |
| QAction * | actionOpen |
| QAction * | actionSave |
| QAction * | actionSaveAs |
| QAction * | actionFileSep |
| QAction * | actionViewDef |
| QAction * | actionViewMould |
| QAction * | actionViewPatch |
| QAction * | actionViewRig |
| QAction * | actionWindowSep |
| QAction * | actionQuit |
| vector< QAction * > | childFileActions |
| vector< QAction * > | childViewActions |
Definition at line 43 of file formmain.h.
| CFormMain::CFormMain | ( | CSailApp * | myApp, | |
| QWidget * | parent = 0 | |||
| ) |
Constructs Sailcut CAD's main window.
| myApp | the Sailcut application | |
| parent | the parent widget |
Definition at line 44 of file formmain.cpp.
References app, CSailApp::findHandbook(), handbook, CPrefs::language, languageChange(), CSailApp::loadTranslation(), CPrefs::mainWindowHeight, CPrefs::mainWindowWidth, prefs, slotUpdateDocumentMenus(), and statusbar.
| void CFormMain::show | ( | const QString | filename = QString::null |
) |
Opens a given sail file
Definition at line 301 of file formmain.cpp.
References makeMenuMru(), open(), and prefs.
| void CFormMain::closeEvent | ( | QCloseEvent * | e | ) | [protected] |
This event is received when the user closes the dialog.
Definition at line 106 of file formmain.cpp.
References CPrefs::mainWindowHeight, CPrefs::mainWindowWidth, and prefs.
| void CFormMain::makeMenuMru | ( | ) | [protected] |
Creates the "Open Recent" menu from the Most Recently Used files list.
Definition at line 159 of file formmain.cpp.
References menuRecent, CPrefs::mruDocuments, prefs, and slotOpenRecent().
Referenced by open(), show(), slotSave(), and slotSaveAs().
| void CFormMain::open | ( | QString | filename | ) | [protected] |
Opens the specified document.
| filename |
Definition at line 175 of file formmain.cpp.
References makeMenuMru(), CPrefs::mruDocuments, CFormDocument::open(), prefs, CPrefsMru::removeEntry(), statusbar, and CPrefsMru::touchEntry().
Referenced by show(), slotOpen(), and slotOpenRecent().
| void CFormMain::languageChange | ( | ) | [protected, virtual, slot] |
Sets the strings of the subwidgets using the current language.
Definition at line 118 of file formmain.cpp.
References actionAbout, actionAboutQt, actionCascade, actionClose, actionCloseAll, actionHandbook, actionNewBoat, actionNewHull, actionNewRig, actionNewSail, actionOpen, actionQuit, actionSave, actionSaveAs, actionTile, menuFile, menuFileNew, menuHelp, menuLanguage, menuRecent, menuView, and menuWindow.
Referenced by CFormMain(), and slotLanguage().
| void CFormMain::slotAbout | ( | ) | [protected, virtual, slot] |
Displays the "About Sailcut CAD" dialog box
Definition at line 325 of file formmain.cpp.
| void CFormMain::slotAboutQt | ( | ) | [protected, virtual, slot] |
Displays the "About Qt" dialog box
Definition at line 359 of file formmain.cpp.
| void CFormMain::slotNew | ( | ) | [protected, virtual, slot] |
Creates a new document
Definition at line 401 of file formmain.cpp.
References actionNewBoat, actionNewHull, actionNewRig, actionNewSail, and prefs.
| void CFormMain::slotOpen | ( | ) | [protected, virtual, slot] |
Displays a dialog box to open an XML sail definition.
Definition at line 434 of file formmain.cpp.
References open().
| void CFormMain::slotOpenRecent | ( | ) | [protected, virtual, slot] |
Opens a recently used sail definition.
Definition at line 453 of file formmain.cpp.
References CPrefs::mruDocuments, open(), and prefs.
Referenced by makeMenuMru().
| void CFormMain::slotSave | ( | ) | [protected, virtual, slot] |
Saves the current sail definition to an XML file.
Definition at line 467 of file formmain.cpp.
References CFormDocument::filename, makeMenuMru(), CPrefs::mruDocuments, prefs, statusbar, and CPrefsMru::touchEntry().
| void CFormMain::slotSaveAs | ( | ) | [protected, virtual, slot] |
Opens a dialog to select the XML to which the sail definition should be saved.
Definition at line 482 of file formmain.cpp.
References CFormDocument::filename, makeMenuMru(), CPrefs::mruDocuments, prefs, statusbar, and CPrefsMru::touchEntry().
| void CFormMain::slotHandbook | ( | ) | [protected, virtual, slot] |
| void CFormMain::slotLanguage | ( | ) | [protected, virtual, slot] |
Switches the current language.
Definition at line 378 of file formmain.cpp.
References app, CSailApp::findHandbook(), handbook, CPrefs::language, languageChange(), CSailApp::loadTranslation(), and prefs.
| void CFormMain::slotUpdateDocumentMenus | ( | ) | [protected, virtual, slot] |
Refresh the document-specific menus.
Definition at line 497 of file formmain.cpp.
References actionFileSep, actionSave, actionSaveAs, childFileActions, childViewActions, CFormDocument::extraFileMenus, CFormDocument::extraViewActions, menuFile, menuLanguage, and menuView.
Referenced by CFormMain().
| void CFormMain::slotUpdateWindowMenu | ( | ) | [protected, virtual, slot] |
Refresh the "window" menu.
Definition at line 540 of file formmain.cpp.
References actionCascade, actionClose, actionCloseAll, actionTile, actionWindowSep, CFormDocument::filename, menuWindow, windowMapper, and workspace.
QWorkspace* CFormMain::workspace [protected] |
QSignalMapper* CFormMain::windowMapper [protected] |
QUrl CFormMain::handbook [protected] |
The location of the Sailcut CAD Handbook
Definition at line 91 of file formmain.h.
Referenced by CFormMain(), slotHandbook(), and slotLanguage().
CSailApp* CFormMain::app [protected] |
The application
Definition at line 94 of file formmain.h.
Referenced by CFormMain(), and slotLanguage().
CPrefs* CFormMain::prefs [protected] |
The user preferences
Definition at line 97 of file formmain.h.
Referenced by CFormMain(), closeEvent(), makeMenuMru(), open(), show(), slotLanguage(), slotNew(), slotOpenRecent(), slotSave(), and slotSaveAs().
QStatusBar* CFormMain::statusbar [protected] |
The status bar
Definition at line 100 of file formmain.h.
Referenced by CFormMain(), open(), slotSave(), and slotSaveAs().
QMenu* CFormMain::menuFile [protected] |
The File menu
Definition at line 103 of file formmain.h.
Referenced by languageChange(), and slotUpdateDocumentMenus().
QMenu* CFormMain::menuFileNew [protected] |
QMenu* CFormMain::menuHelp [protected] |
QMenu* CFormMain::menuView [protected] |
The View menu
Definition at line 109 of file formmain.h.
Referenced by languageChange(), and slotUpdateDocumentMenus().
QMenu* CFormMain::menuWindow [protected] |
The Window menu
Definition at line 111 of file formmain.h.
Referenced by languageChange(), and slotUpdateWindowMenu().
QMenu* CFormMain::menuLanguage [protected] |
The Language menu
Definition at line 113 of file formmain.h.
Referenced by languageChange(), and slotUpdateDocumentMenus().
QMenu* CFormMain::menuRecent [protected] |
The Most Recently Used files menu
Definition at line 116 of file formmain.h.
Referenced by languageChange(), and makeMenuMru().
QAction* CFormMain::actionAbout [protected] |
Display information about sailcut
Definition at line 119 of file formmain.h.
Referenced by languageChange().
QAction* CFormMain::actionAboutQt [protected] |
Display information about Qt
Definition at line 121 of file formmain.h.
Referenced by languageChange().
QAction* CFormMain::actionClose [protected] |
Close the active document
Definition at line 123 of file formmain.h.
Referenced by languageChange(), and slotUpdateWindowMenu().
QAction* CFormMain::actionCloseAll [protected] |
Close all documents
Definition at line 125 of file formmain.h.
Referenced by languageChange(), and slotUpdateWindowMenu().
QAction* CFormMain::actionTile [protected] |
Tile document windows
Definition at line 127 of file formmain.h.
Referenced by languageChange(), and slotUpdateWindowMenu().
QAction* CFormMain::actionCascade [protected] |
Cascade document windows
Definition at line 129 of file formmain.h.
Referenced by languageChange(), and slotUpdateWindowMenu().
QAction* CFormMain::actionHandbook [protected] |
QAction* CFormMain::actionNewBoat [protected] |
Create a new boat
Definition at line 135 of file formmain.h.
Referenced by languageChange(), and slotNew().
QAction* CFormMain::actionNewHull [protected] |
Create a new hull
Definition at line 137 of file formmain.h.
Referenced by languageChange(), and slotNew().
QAction* CFormMain::actionNewRig [protected] |
Create a new rig
Definition at line 139 of file formmain.h.
Referenced by languageChange(), and slotNew().
QAction* CFormMain::actionNewSail [protected] |
Create a new sail
Definition at line 141 of file formmain.h.
Referenced by languageChange(), and slotNew().
QAction* CFormMain::actionOpen [protected] |
Open an existing sail definition
Definition at line 143 of file formmain.h.
Referenced by languageChange().
QAction* CFormMain::actionSave [protected] |
Save the sail definition to a file
Definition at line 146 of file formmain.h.
Referenced by languageChange(), and slotUpdateDocumentMenus().
QAction* CFormMain::actionSaveAs [protected] |
Prompt for a filename then write the sail definition to a file
Definition at line 148 of file formmain.h.
Referenced by languageChange(), and slotUpdateDocumentMenus().
QAction* CFormMain::actionFileSep [protected] |
Final separator in the 'File' menu before 'Quit'
Definition at line 150 of file formmain.h.
Referenced by slotUpdateDocumentMenus().
QAction* CFormMain::actionViewDef [protected] |
View the sail definition
Definition at line 153 of file formmain.h.
QAction* CFormMain::actionViewMould [protected] |
View the sail mould
Definition at line 155 of file formmain.h.
QAction* CFormMain::actionViewPatch [protected] |
View the sail patches definition
Definition at line 157 of file formmain.h.
QAction* CFormMain::actionViewRig [protected] |
View the sail rig
Definition at line 159 of file formmain.h.
QAction* CFormMain::actionWindowSep [protected] |
Separator in the 'Window' menu
Definition at line 161 of file formmain.h.
Referenced by slotUpdateWindowMenu().
QAction* CFormMain::actionQuit [protected] |
vector<QAction*> CFormMain::childFileActions [protected] |
Extra actions for the file menu
Definition at line 166 of file formmain.h.
Referenced by slotUpdateDocumentMenus().
vector<QAction*> CFormMain::childViewActions [protected] |
Extra actions for the view menu
Definition at line 168 of file formmain.h.
Referenced by slotUpdateDocumentMenus().
1.5.6