Updraft
1.0
Open source glider flight visualisation tool.
|
Main application window. More...
#include <mainwindow.h>
Public Member Functions | |
MainWindow (QWidget *parent=0) | |
~MainWindow () | |
Menu * | getSystemMenu (SystemMenu menu) |
Tab * | createTab (QWidget *content, QString title) |
Create a new tab in the bottom pane. | |
Menu * | createMenu (QString title) |
void | removeMenu (Menu *menu) |
void | setMapWidget (QWidget *widget) |
QWidget * | getMapWidget () |
MapLayerGroup * | getInvisibleRootMapLayerGroup () |
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 | |
MapLayerGroup * | invisibleRootMapLayerGroup |
Ui::MainWindow * | ui |
Menu * | menuFile |
Menu * | menuView |
Menu * | menuTools |
Menu * | menuHelp |
Menu * | menuContext |
Menu * | menuMapObject |
Tab * | activeTab |
QSet< Menu * > | customMenus |
QMap< QTreeWidgetItem *, MapLayerInterface * > | mapLayers |
Main application window.
Updraft::Core::MainWindow::MainWindow | ( | QWidget * | parent = 0 | ) | [explicit] |
void Updraft::Core::MainWindow::appExit | ( | ) | [private, slot] |
Handles File->Exit menu action.
void Updraft::Core::MainWindow::contextMenuEvent | ( | QContextMenuEvent * | event | ) | [protected] |
Menu * Updraft::Core::MainWindow::createMenu | ( | QString | title | ) |
Core::Tab * Updraft::Core::MainWindow::createTab | ( | QWidget * | content, |
QString | title | ||
) |
Create a new tab in the bottom pane.
Takes ownership of content.
Returns the invisible top level MapLayerGroup.
QWidget * Updraft::Core::MainWindow::getMapWidget | ( | ) |
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.
void Updraft::Core::MainWindow::registerMapLayer | ( | MapLayerInterface * | layer | ) |
Add a map layer and its tree widget item to the list of map layers.
void Updraft::Core::MainWindow::removeMenu | ( | Menu * | menu | ) |
void Updraft::Core::MainWindow::setMapWidget | ( | QWidget * | widget | ) |
void Updraft::Core::MainWindow::showAboutDialog | ( | ) | [private, slot] |
Handles Help->About... menu action.
void Updraft::Core::MainWindow::standardMenuItems | ( | ) | [private] |
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.
void Updraft::Core::MainWindow::tabsVisibility | ( | ) | [private] |
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.
void Updraft::Core::MainWindow::unregisterMapLayer | ( | MapLayerInterface * | layer | ) |
Remove a map layer and its tree widget item from the list of map layers.
Tab* Updraft::Core::MainWindow::activeTab [private] |
QSet<Menu*> Updraft::Core::MainWindow::customMenus [private] |
QMap<QTreeWidgetItem*, MapLayerInterface *> Updraft::Core::MainWindow::mapLayers [private] |
Menu* Updraft::Core::MainWindow::menuContext [private] |
Menu* Updraft::Core::MainWindow::menuFile [private] |
Menu* Updraft::Core::MainWindow::menuHelp [private] |
Menu* Updraft::Core::MainWindow::menuMapObject [private] |
Menu* Updraft::Core::MainWindow::menuTools [private] |
Menu* Updraft::Core::MainWindow::menuView [private] |
Ui::MainWindow* Updraft::Core::MainWindow::ui [private] |