Updraft  1.0
Open source glider flight visualisation tool.
Updraft::Core::MainWindow Class Reference

Main application window. More...

#include <mainwindow.h>

Collaboration diagram for Updraft::Core::MainWindow:

List of all members.

Public Member Functions

 MainWindow (QWidget *parent=0)
 ~MainWindow ()
MenugetSystemMenu (SystemMenu menu)
TabcreateTab (QWidget *content, QString title)
 Create a new tab in the bottom pane.
MenucreateMenu (QString title)
void removeMenu (Menu *menu)
void setMapWidget (QWidget *widget)
QWidget * getMapWidget ()
MapLayerGroupgetInvisibleRootMapLayerGroup ()
 Returns the invisible top level MapLayerGroup.
void registerMapLayer (MapLayerInterface *layer)
 Add a map layer and its tree widget item to the list of map layers.
void unregisterMapLayer (MapLayerInterface *layer)
 Remove a map layer and its tree widget item from the list of map layers.

Protected Member Functions

void contextMenuEvent (QContextMenuEvent *event)

Private Slots

void tabCloseRequested (int index)
 Called when any tab is about to close.
void tabRemoved (QWidget *tab)
 Called when tab has been removed from the bottom pane.
void tabSwitch (int index)
 Handles switchin an active tab in the bottom pane.
void openFile ()
 Handles File->Open... menu action.
void appExit ()
 Handles File->Exit menu action.
void openUserDoc ()
 Handles Help->User Documentation menu action.
void showAboutDialog ()
 Handles Help->About... menu action.
void mapLayerItemChanged (QTreeWidgetItem *item)
 Item in map layer tree widget was changed (= checked / unchecked)
void mapLayerContextMenuRequested (const QPoint &pos)
 Map layer tree view requested context menu.

Private Member Functions

void standardMenuItems ()
 Adds the standard menu items to menu.
void tabsVisibility ()
 Adjusts the visibility of the bottom pane.

Private Attributes

MapLayerGroupinvisibleRootMapLayerGroup
Ui::MainWindow * ui
MenumenuFile
MenumenuView
MenumenuTools
MenumenuHelp
MenumenuContext
MenumenuMapObject
TabactiveTab
QSet< Menu * > customMenus
QMap< QTreeWidgetItem
*, MapLayerInterface * > 
mapLayers

Detailed Description

Main application window.


Constructor & Destructor Documentation

Updraft::Core::MainWindow::MainWindow ( QWidget *  parent = 0) [explicit]

Member Function Documentation

void Updraft::Core::MainWindow::appExit ( ) [private, slot]

Handles File->Exit menu action.

void Updraft::Core::MainWindow::contextMenuEvent ( QContextMenuEvent *  event) [protected]
Core::Tab * Updraft::Core::MainWindow::createTab ( QWidget *  content,
QString  title 
)

Create a new tab in the bottom pane.

Takes ownership of content.

void Updraft::Core::MainWindow::mapLayerContextMenuRequested ( const QPoint &  pos) [private, slot]

Map layer tree view requested context menu.

Finds thee map layer and send the event to it.

void Updraft::Core::MainWindow::mapLayerItemChanged ( QTreeWidgetItem *  item) [private, slot]

Item in map layer tree widget was changed (= checked / unchecked)

void Updraft::Core::MainWindow::openFile ( ) [private, slot]

Handles File->Open... menu action.

void Updraft::Core::MainWindow::openUserDoc ( ) [private, slot]

Handles Help->User Documentation menu action.

Add a map layer and its tree widget item to the list of map layers.

void Updraft::Core::MainWindow::setMapWidget ( QWidget *  widget)

Handles Help->About... menu action.

Adds the standard menu items to menu.

This includes Open File, Exit, Help ...

void Updraft::Core::MainWindow::tabCloseRequested ( int  index) [private, slot]

Called when any tab is about to close.

Posts signal to appropriate tab.

void Updraft::Core::MainWindow::tabRemoved ( QWidget *  tab) [private, slot]

Called when tab has been removed from the bottom pane.

Adjusts the visibility of the bottom pane.

Shows it when there are any tabs to display, otherwise hides it.

void Updraft::Core::MainWindow::tabSwitch ( int  index) [private, slot]

Handles switchin an active tab in the bottom pane.

Remove a map layer and its tree widget item from the list of map layers.


Member Data Documentation

QMap<QTreeWidgetItem*, MapLayerInterface *> Updraft::Core::MainWindow::mapLayers [private]
Ui::MainWindow* Updraft::Core::MainWindow::ui [private]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines