Main Page   Namespace List   Alphabetical List   Data Structures   File List   Data Fields   Globals  

ApplicationWindow Class Reference

This class defines the main application window. More...


Public Slots

MDIWindownewGLWindow ()
MDIWindownewMultiviewWindow ()

Public Methods

 ApplicationWindow ()
 ~ApplicationWindow ()
QSize sizeHint ()
QSize minimumSizeHint ()

Data Fields

QWorkspace * ws
 the worspace object wich is the parent of the MDI windows


Private Slots

void load ()
void showGraphicOptions ()
void closeWindow ()
void tileHorizontal ()
void tileVertical ()
void about ()
void aboutQt ()
void windowsMenuActivated (int id)
void windowsMenuAboutToShow ()
void takeScreenshot ()
void setViewAllLines ()
void setViewLines ()
void setViewPoly ()
void setViewPolyEdges ()
void setViewPersp ()
void setViewOrtho1 ()
void setViewOrtho2 ()
void setViewOrtho3 ()

Private Methods

void closeEvent (QCloseEvent *)

Private Attributes

QPopupMenu * windowsMenu
 windowsMenu is a QPopupMenu created dynamically

FileDialog * fd
 this dialog gives the ATLAS file models choice

FieldDialog * mf
 this dialog is empty but refers to MField display options

GraphicOptions * go
 this dialog configures graphic options


Detailed Description

This class defines the main application window.

It contains a menu bar, a toolbar, several icons (xpm format), a status bar, a workspace and a few dialogs like graphic options, the ATLAS files dialog and a magnetic field dialog. It also contains 2 About dialog, 2 procedures to open MDI windows ( newGLWindow and newMultiviewWindow) and numerous slots to take in consideration the user actions. The functions sizeHint and minimumSizeHint serves to choose the good size for the ApplicationWindow (otherwise, the window system defaults to a too small window).


Constructor & Destructor Documentation

ApplicationWindow::ApplicationWindow  
 

The constructor builds the menuBar, the status bar, the toolbar (with buttons and icons). The layout of the toolbar is saved in a file called .layout in the current folder. Several actions (fileOpenAction, fileQuitAction, fileCloseAction, fileNewAction, graphicOptionsAction and exportScreenshotAction) are recorded in order to add them to the toolbar and to the menubar whithout duplication of the code. Concerning the icons, they are in XPM format (an array of char * whose name is included in the file - may be different from the filename). The dialogs are built but not shown yet.

ApplicationWindow::~ApplicationWindow  
 

Destruction of the ApplicationWindow, destroys the obects that needs to and saves the toolbar layout to the file .layout Please not that the widget that are child of this ApplicationWindow don't need to be destroyed explicitly. Because the destructor is automatically propagated to every child instance.


Member Function Documentation

void ApplicationWindow::about   [private, slot]
 

Shows useful information concerning the rights of this sofware and the conditions of its creation (company, licence, author ...).

void ApplicationWindow::aboutQt   [private, slot]
 

Displays information about the Qt library.

void ApplicationWindow::closeEvent QCloseEvent *    e [private]
 

This procedure is called if the user clicks on the top right cross of the application. It closes all the MDI windows then calls the inherited closeEvent to terminate the application.

void ApplicationWindow::closeWindow   [private, slot]
 

Closes the current activated MDI window. If there is none, does nothing.

void ApplicationWindow::load   [private, slot]
 

Loads a geometry file to the workspace on the current activated MDI window. If there is no MDI window with OpenGL context, a default new one is created. see MDIWindow::load(QString) for more details.

QSize ApplicationWindow::minimumSizeHint  
 

MDIWindow * ApplicationWindow::newGLWindow   [slot]
 

Opens a need MDI window with an OpenGL rendering context. If the window is the first MDI Window of the workspace, or if the previous window is maximised, it gets maximised directly.

MDIWindow * ApplicationWindow::newMultiviewWindow   [slot]
 

Opens a new MDI Window containing four OpenGL rendering contexts. If the window is the first MDI Window of the workspace, or if the previous window is maximised, it gets maximised directly.

void ApplicationWindow::setViewAllLines   [private, slot]
 

Grabs the activated MDI window and sets the view mode to ALL_LINES (even triangulation lines). Returns directly if no MDI window activated.

void ApplicationWindow::setViewLines   [private, slot]
 

Grabs the activated MDI window and sets the view mode to LINES (no triangulation lines). Returns directly if no MDI window activated.

void ApplicationWindow::setViewOrtho1   [private, slot]
 

Grabs the activated MDI window and sets the z projection. Returns directly if no MDI window activated.

void ApplicationWindow::setViewOrtho2   [private, slot]
 

Grabs the activated MDI window and sets the x projection. Returns directly if no MDI window activated.

void ApplicationWindow::setViewOrtho3   [private, slot]
 

Grabs the activated MDI window and sets the y projection. Returns directly if no MDI window activated.

void ApplicationWindow::setViewPersp   [private, slot]
 

Grabs the activated MDI window and sets the perspective mode. Returns directly if no MDI window activated.

void ApplicationWindow::setViewPoly   [private, slot]
 

Grabs the activated MDI window and sets the view mode to POLY (no edges highlightened). Returns directly if no MDI window activated.

void ApplicationWindow::setViewPolyEdges   [private, slot]
 

Grabs the activated MDI window and sets the view mode to POLY_EDGES (edges highlightened). Returns directly if no MDI window activated.

void ApplicationWindow::showGraphicOptions   [private, slot]
 

If a MDI window is opened, gets its graphic options and shows the graphic options dialog. If no MDI Window with OpenGL rendering context opened, doeas nothing.

QSize ApplicationWindow::sizeHint  
 

void ApplicationWindow::takeScreenshot   [private, slot]
 

Takes a screenshot and exports it as a bmp or bnp file The file name is given automatically, its the first name of type screenshotX.ext available.

void ApplicationWindow::tileHorizontal   [private, slot]
 

Tiles the MDI windows horizontally, separating equally the height of the workspace. Beware of confusions between workspace height and ApplicationWindow height.

See also:
http://doc.trolltech.com/3.1/geometry.html for more details. There are two tricks to avoid bad behaviour :
  • explicit call to hide and show to prevent flicker
  • call of widget->minimumWidth to avoid too small resizing

void ApplicationWindow::tileVertical   [private, slot]
 

Tiles the MDI windows vertically, separating equally the width of the workspace. Beware of confusions between workspace width and ApplicationWindow width.

See also:
http://doc.trolltech.com/3.1/geometry.html for more details. There are two tricks to avoid bad behaviour :
  • explicit call to hide and show to prevent flicker
  • call of widget->minimumWidth to avoid too small resizing

void ApplicationWindow::windowsMenuAboutToShow   [private, slot]
 

This function is called just before that the window menu is shown. It builds it, referencing each MDI window. Below, the choices Cascade, Tile, Tile Horizontally & Vertically each MDI window is referenced and the activation of these items calls windowsMenuActivated(int) .

void ApplicationWindow::windowsMenuActivated int    id [private, slot]
 

Activates a MDI window, it shows it and gives it the user focus.

Parameters:
id  arbitrary advised size arbitrary minimum size


Field Documentation

FileDialog* ApplicationWindow::fd [private]
 

this dialog gives the ATLAS file models choice

GraphicOptions* ApplicationWindow::go [private]
 

this dialog configures graphic options

FieldDialog* ApplicationWindow::mf [private]
 

this dialog is empty but refers to MField display options

QPopupMenu* ApplicationWindow::windowsMenu [private]
 

windowsMenu is a QPopupMenu created dynamically

QWorkspace* ApplicationWindow::ws
 

the worspace object wich is the parent of the MDI windows


The documentation for this class was generated from the following files:
Generated on Wed Feb 18 16:32:53 2004 for POVAMA by doxygen1.2.18