CFormBoat Class Reference

#include <formboat.h>

Inheritance diagram for CFormBoat:

CFormDocument

List of all members.

Public Member Functions

 CFormBoat (CPrefs *myPrefs, QWidget *parent)
void add (const QString &newfile)

Protected Slots

virtual void languageChange ()
virtual void slotAdd ()
virtual void slotUpdate (const CBoatDef &newdef)

Protected Member Functions

T_KEYPRESS void setDef (const CBoatDef &newdef)
void setupMainWidget ()
void setupMenuBar ()

Protected Attributes

CBoatDefPaneldefpanel
QMenu * menuAdd
QAction * actionAddFile


Detailed Description

A form allowing the user to assemble several elements into a boat.

Definition at line 30 of file formboat.h.


Constructor & Destructor Documentation

CFormBoat::CFormBoat ( CPrefs myPrefs,
QWidget *  parent 
)

The constructor.

Parameters:
myPrefs the user preferences
parent the parent widget

Definition at line 39 of file formboat.cpp.

References languageChange(), setDef(), setupMainWidget(), and setupMenuBar().


Member Function Documentation

void CFormBoat::add ( const QString &  newfile  ) 

Adds a new element to the boat.

Parameters:
newfile name of the file to add

Definition at line 61 of file formboat.cpp.

References CBoatElement::filename, setDef(), and CBoatElement::type.

void CFormBoat::setDef ( const CBoatDef newdef  )  [protected]

We got a new boat definition, update widgets.

Parameters:
newdef The new boat definition

Definition at line 118 of file formboat.cpp.

References defpanel, CBoatDefPanel::setDef(), CSailViewerTabs::setObject(), and CFormDocument::tabs.

Referenced by add(), CFormBoat(), and slotUpdate().

void CFormBoat::setupMainWidget (  )  [protected]

Creates the main widget

Definition at line 129 of file formboat.cpp.

References defpanel, slotUpdate(), and CFormDocument::tabs.

Referenced by CFormBoat().

void CFormBoat::setupMenuBar (  )  [protected]

Creates the menu bar

Definition at line 148 of file formboat.cpp.

References actionAddFile, CFormDocument::extraFileMenus, menuAdd, and slotAdd().

Referenced by CFormBoat().

void CFormBoat::languageChange (  )  [protected, virtual, slot]

Sets the strings of the subwidgets using the current language.

Definition at line 102 of file formboat.cpp.

References actionAddFile, defpanel, CSailViewerTabs::languageChange(), CBoatDefPanel::languageChange(), menuAdd, and CFormDocument::tabs.

Referenced by CFormBoat().

void CFormBoat::slotAdd (  )  [protected, virtual, slot]

The file menu's "Add" item was clicked.

Definition at line 158 of file formboat.cpp.

Referenced by setupMenuBar().

void CFormBoat::slotUpdate ( const CBoatDef newdef  )  [protected, virtual, slot]

The boat definition was modified by the user.

Parameters:
newdef The new boat definition

Definition at line 178 of file formboat.cpp.

References setDef().

Referenced by setupMainWidget().


Member Data Documentation

A panel with one tab per element in the current boat.

Definition at line 51 of file formboat.h.

Referenced by languageChange(), setDef(), and setupMainWidget().

QMenu* CFormBoat::menuAdd [protected]

The Add menu.

Definition at line 53 of file formboat.h.

Referenced by languageChange(), and setupMenuBar().

QAction* CFormBoat::actionAddFile [protected]

add a file

Definition at line 55 of file formboat.h.

Referenced by languageChange(), and setupMenuBar().


The documentation for this class was generated from the following files:

Generated on Sun Mar 22 21:38:32 2009 for Sailcut CAD by  doxygen 1.5.6