The base API for TerraLib applications. More...
#include <ApplicationController.h>
Public Slots | |
void | broadcast (te::qt::af::evt::Event *evt) |
Send events in broadcast for all registered components. More... | |
Signals | |
void | triggered (te::qt::af::evt::Event *) |
Signal emmited to the aplication framework listeners. More... | |
Public Member Functions | |
void | addListener (QObject *obj) |
Insert an application item that will listen to framework events. More... | |
ApplicationController () | |
Constructor. More... | |
virtual void | finalize () |
Finalize the application framework. More... | |
const QString & | getAppIconName () const |
Returns the application icon. More... | |
const QString & | getAppTitle () const |
Returns the application title. More... | |
int | getDefaultSRID () const |
Returns the application default SRID value. More... | |
QWidget * | getMainWindow () const |
Returns main window. More... | |
QString | getMostRecentProject () const |
Returns the most recent project. More... | |
te::qt::af::Project * | getProject () |
Get the current project. More... | |
QColor | getSelectionColor () const |
Returns the application selection color. More... | |
QSettings & | getSettings () |
Return the QSettings of the application. This can be used to add settings from external sources. More... | |
virtual void | initialize () |
Initializes the application framework. More... | |
virtual void | initializePlugins () |
Load the plugin list and initialize the plugins enabled by the user. More... | |
virtual void | initializeProjectMenus () |
Initializes the menus for the most recent open projects. More... | |
void | removeListener (QObject *obj) |
Remove the obj from the list of event listeners. More... | |
void | set (te::qt::af::Project *prj) |
Set the current project. More... | |
virtual void | setConfigFile (const std::string &configFileName) |
Tells wich configuration file to be used by the controller during its initialization. More... | |
virtual void | setMsgBoxParentWidget (QWidget *w) |
Tells the widget to be used as the parent of messages showned in a QMessageBox. More... | |
void | updateRecentProjects (const QString &prjFile, const QString &prjTitle) |
Update the list of recent projects. This is commonly used when there's a new most recent project. More... | |
virtual | ~ApplicationController () |
Destructor. More... | |
Menus and Menubars Management. | |
Register and recover menus and menu bars. The methods find will returns a valid object only if it exists in some menu, otherwise the return will be a NULL pointer. The methods get ALWAYS returns a valid pointer. If the requested menu or menubar does not exists these funtions will create, register and return the object.
| |
void | addToolBar (const QString &id, QToolBar *bar) |
Register the toolbar in the list of the known toolbars and dispatch an event. More... | |
void | registerToolBar (const QString &id, QToolBar *bar) |
Register the toolbar in the list of the known toolbars. More... | |
QToolBar * | getToolBar (const QString &id) const |
Return the toolbar identified by id or NULL if none is found. More... | |
std::vector< QToolBar * > | getToolBars () const |
Return the list of registered toolbars. More... | |
void | removeToolBar (const QString &id) |
Removes the toolbar identified by id. More... | |
void | registerMenu (QMenu *mnu) |
Register the mnu. More... | |
QMenu * | findMenu (const QString &id) const |
Returns the menu registered with key id. More... | |
QMenu * | getMenu (const QString &id) |
Returns a menu registered with key id. More... | |
void | registerMenuBar (QMenuBar *bar) |
Register the bar. More... | |
QMenuBar * | findMenuBar (const QString &id) const |
Returns the menu bar registered with key id. More... | |
QMenuBar * | getMenuBar (const QString &id) const |
Returns a menu bar registered with key id. More... | |
QAction * | findAction (const QString &id) const |
Returns the action identified by id or NULL if there's not an action identified by id. More... | |
Static Public Member Functions | |
static ApplicationController & | getInstance () |
It gives access to the controller singleton. More... | |
Protected Attributes | |
std::string | m_appConfigFile |
The application framework configuration file. More... | |
std::string | m_appDatasourcesFile |
Name of the file containing datasources used. More... | |
QString | m_appDefaultIconTheme |
Name of the icon theme to be used. More... | |
QString | m_appHelpFile |
Name of the help file. More... | |
QString | m_appIconName |
Icon used in the application. More... | |
QString | m_appIconThemeDir |
Directory of the application icon theme. More... | |
std::set< QObject * > | m_applicationItems |
The list of registered application items. More... | |
QString | m_appName |
Application name. More... | |
QString | m_appOrganization |
Organization name. More... | |
QString | m_appPluginsFile |
Name of the plugins file. More... | |
QSettings | m_appSettings |
QString | m_appTitle |
Application title. More... | |
QString | m_appToolBarDefaultIconSize |
Size of the tool buttons. More... | |
std::string | m_appUserSettingsFile |
Name of the user settings file. More... | |
int | m_defaultSRID |
Default SRID value. More... | |
bool | m_initialized |
A flag indicating if the controller is initialized. More... | |
std::vector< QMenuBar * > | m_menuBars |
Menu bars registered. More... | |
std::vector< QMenu * > | m_menus |
Menus registered. More... | |
QWidget * | m_msgBoxParentWidget |
Parent used to show message boxes. More... | |
Project * | m_project |
Pointer to current project. More... | |
QStringList | m_recentProjs |
List of the recent projects. More... | |
QStringList | m_recentProjsTitles |
List of the titles of the recent projects. More... | |
QColor | m_selectionColor |
Default selection color. More... | |
std::map< QString, QToolBar * > | m_toolbars |
Toolbars registered. More... | |
Static Protected Attributes | |
static ApplicationController * | sm_instance |
There can be only one object of class Application. More... | |
Related Functions | |
(Note that these are not member functions.) | |
QMenu * | findMenu |
The base API for TerraLib applications.
Definition at line 76 of file ApplicationController.h.
te::qt::af::ApplicationController::ApplicationController | ( | ) |
Constructor.
parent | The parent object. |
Definition at line 67 of file ApplicationController.cpp.
References sm_instance, and TR_QT_AF.
|
virtual |
Destructor.
Definition at line 81 of file ApplicationController.cpp.
void te::qt::af::ApplicationController::addListener | ( | QObject * | obj | ) |
Insert an application item that will listen to framework events.
obj | The application item that will listen to framework events. |
Definition at line 235 of file ApplicationController.cpp.
Referenced by te::qt::af::LayoutEditor::LayoutEditor(), te::qt::af::BaseApplication::makeDialog(), te::qt::af::BaseApplication::onLayerHistogramTriggered(), te::qt::af::BaseApplication::onLayerScatterTriggered(), and te::qt::af::BaseApplication::onLayerShowTableTriggered().
void te::qt::af::ApplicationController::addToolBar | ( | const QString & | id, |
QToolBar * | bar | ||
) |
Register the toolbar in the list of the known toolbars and dispatch an event.
id | The toolbar identification string. |
bar | The toolbar to be registered. The controller will not take the bar ownership. |
An event will be broadcasted to indicate that the toolbar was appended.
Exception | It throws an exception if a toolbar with the given id already exists. |
Definition at line 103 of file ApplicationController.cpp.
Referenced by te::qt::af::ToolbarsWidget::saveChanges().
|
slot |
Send events in broadcast for all registered components.
evt | Event to be sent. |
Definition at line 657 of file ApplicationController.cpp.
Referenced by te::qt::plugins::rp::AbstractAction::addNewLayer(), te::qt::af::MapDisplay::configSRS(), te::qt::plugins::terralib4::TL4ConverterWizard::finish(), te::qt::plugins::rp::AbstractAction::getCurrentLayer(), te::qt::af::BaseApplication::newProject(), te::qt::plugins::vp::AggregationAction::onActionActivated(), te::qt::plugins::vp::BufferAction::onActionActivated(), te::qt::plugins::vp::IntersectionAction::onActionActivated(), te::qt::af::BaseApplication::onAddDataSetLayerTriggered(), te::qt::af::BaseApplication::onAddFolderLayerTriggered(), te::qt::af::BaseApplication::onAddQueryLayerTriggered(), te::qt::af::BaseApplication::onAddTabularLayerTriggered(), te::qt::af::LayerExplorer::onApplicationTriggered(), te::qt::af::MapDisplay::onCoordTracked(), te::qt::af::BaseApplication::onDrawTriggered(), te::qt::af::BaseApplication::onHighlightLayerObjects(), te::qt::af::BaseApplication::onLayerChartTriggered(), te::qt::af::BaseApplication::onLayerGroupingTriggered(), te::qt::af::LayerExplorer::onLayerOrderChanged(), te::qt::af::BaseApplication::onLayerRemoveItemTriggered(), te::qt::af::BaseApplication::onLayerRemoveSelectionTriggered(), te::qt::af::BaseApplication::onLayerSelectedObjectsChanged(), te::qt::af::LayerExplorer::onLayerVisibilityChanged(), te::qt::af::BaseApplication::onMapRemoveSelectionTriggered(), te::qt::af::BaseApplication::onMapSetUnknwonSRIDTriggered(), te::qt::af::BaseApplication::onMapSRIDTriggered(), te::qt::af::BaseApplication::onPanToggled(), te::qt::af::BaseApplication::onRemoveLayerTriggered(), te::qt::af::BaseApplication::onRenameLayerTriggered(), te::qt::af::LayerExplorer::onSelectedLayersChanged(), te::qt::af::BaseApplication::onSelectionToggled(), te::qt::af::LayerExplorer::onTreeItemDoubleClicked(), te::qt::af::BaseApplication::onZoomInToggled(), te::qt::af::BaseApplication::onZoomOutToggled(), te::qt::plugins::gdal::Plugin::openFileDialog(), te::qt::af::BaseApplication::openProject(), te::qt::af::DisplayWidget::saveChanges(), te::qt::af::TableWidget::saveChanges(), te::qt::af::DataSetTableDockWidget::selectionChanged(), te::qt::af::ChartDisplayDockWidget::selectionChanged(), and te::qt::plugins::ogr::Plugin::showWindow().
|
virtual |
Finalize the application framework.
This method will unload all TerraLib modules, plugins, and dynamic libraries that are loaded.
Definition at line 630 of file ApplicationController.cpp.
References TerraLib::finalize(), te::common::Singleton< TerraLib >::getInstance(), te::common::Singleton< PluginManager >::getInstance(), te::qt::af::SaveDataSourcesFile(), te::qt::af::UpdateApplicationPlugins(), and te::qt::af::UpdateUserSettings().
Referenced by te::qt::af::BaseApplication::~BaseApplication().
QAction * te::qt::af::ApplicationController::findAction | ( | const QString & | id | ) | const |
Returns the action identified by id or NULL if there's not an action identified by id.
id | Identifier if the action. |
Definition at line 214 of file ApplicationController.cpp.
References te::qt::widgets::FindAction().
Referenced by te::qt::plugins::gdal::Plugin::startup(), te::qt::plugins::terralib4::Plugin::startup(), and te::qt::plugins::ogr::Plugin::startup().
QMenu * te::qt::af::ApplicationController::findMenu | ( | const QString & | id | ) | const |
Returns the menu registered with key id.
id | Indentifier of the menu. |
Definition at line 154 of file ApplicationController.cpp.
References te::qt::widgets::FindMenu().
Referenced by te::qt::af::MapDisplay::MapDisplay(), te::qt::plugins::terralib4::Plugin::startup(), te::qt::plugins::ogr::Plugin::startup(), and te::qt::plugins::gdal::Plugin::startup().
QMenuBar * te::qt::af::ApplicationController::findMenuBar | ( | const QString & | id | ) | const |
Returns the menu bar registered with key id.
id | Indentifier of the menu bar. |
Definition at line 204 of file ApplicationController.cpp.
const QString & te::qt::af::ApplicationController::getAppIconName | ( | ) | const |
Returns the application icon.
Definition at line 670 of file ApplicationController.cpp.
const QString & te::qt::af::ApplicationController::getAppTitle | ( | ) | const |
Returns the application title.
Definition at line 665 of file ApplicationController.cpp.
int te::qt::af::ApplicationController::getDefaultSRID | ( | ) | const |
Returns the application default SRID value.
Definition at line 680 of file ApplicationController.cpp.
|
static |
It gives access to the controller singleton.
Definition at line 88 of file ApplicationController.cpp.
Referenced by te::qt::plugins::rp::AbstractAction::addNewLayer(), te::qt::af::BaseApplication::BaseApplication(), te::qt::af::BaseApplication::checkProjectSave(), te::qt::af::MapDisplay::configSRS(), te::qt::af::MapDisplay::drawLayerSelection(), te::qt::plugins::terralib4::TL4ConverterWizard::finish(), te::qt::plugins::rp::AbstractAction::getCurrentLayer(), te::qt::plugins::rp::AbstractAction::getLayers(), te::qt::af::BaseApplication::init(), te::qt::af::BaseApplication::initMenus(), te::qt::af::BaseApplication::initToolbars(), te::qt::af::LayoutEditor::LayoutEditor(), TerraView::makeDialog(), te::qt::af::BaseApplication::makeDialog(), te::qt::af::MapDisplay::MapDisplay(), te::qt::af::BaseApplication::newProject(), te::qt::plugins::vp::TransformationAction::onActionActivated(), te::qt::plugins::rp::ClassifierAction::onActionActivated(), te::qt::plugins::rp::ContrastAction::onActionActivated(), te::qt::plugins::rp::MixtureModelAction::onActionActivated(), te::qt::plugins::rp::RegisterAction::onActionActivated(), te::qt::plugins::rp::SegmenterAction::onActionActivated(), te::qt::plugins::vp::AggregationAction::onActionActivated(), te::qt::plugins::vp::BufferAction::onActionActivated(), te::qt::plugins::vp::IntersectionAction::onActionActivated(), te::qt::plugins::vp::BasicGeographicOperationAction::onActionActivated(), te::qt::plugins::vp::SummarizationAction::onActionActivated(), te::qt::plugins::vp::PolygonToLineAction::onActionActivated(), te::qt::plugins::layout::LayoutEditorAction::onActionActivated(), te::qt::plugins::terralib4::TL4ConverterAction::onActionActivated(), te::qt::af::BaseApplication::onAddDataSetLayerTriggered(), te::qt::af::BaseApplication::onAddFolderLayerTriggered(), te::qt::af::BaseApplication::onAddQueryLayerTriggered(), te::qt::af::BaseApplication::onAddTabularLayerTriggered(), te::qt::af::LayerExplorer::onApplicationTriggered(), te::qt::af::LayoutEditor::onApplicationTriggered(), te::qt::af::MapDisplay::onApplicationTriggered(), te::qt::af::MapDisplay::onCoordTracked(), te::qt::af::BaseApplication::onDataSourceExplorerTriggered(), te::qt::af::MapDisplay::onDrawLayersFinished(), te::qt::af::BaseApplication::onDrawTriggered(), te::qt::af::BaseApplication::onHighlightLayerObjects(), te::qt::af::BaseApplication::onLayerChartTriggered(), te::qt::af::BaseApplication::onLayerFitOnMapDisplayTriggered(), te::qt::af::BaseApplication::onLayerFitSelectedOnMapDisplayTriggered(), te::qt::af::BaseApplication::onLayerGroupingTriggered(), te::qt::af::BaseApplication::onLayerHistogramTriggered(), te::qt::af::LayerExplorer::onLayerOrderChanged(), te::qt::af::BaseApplication::onLayerPanToSelectedOnMapDisplayTriggered(), te::qt::af::BaseApplication::onLayerPropertiesTriggered(), te::qt::af::BaseApplication::onLayerRemoveItemTriggered(), te::qt::af::BaseApplication::onLayerRemoveSelectionTriggered(), te::qt::af::BaseApplication::onLayerScatterTriggered(), te::qt::af::BaseApplication::onLayerSelectedObjectsChanged(), te::qt::af::BaseApplication::onLayerShowTableTriggered(), te::qt::af::BaseApplication::onLayerSRSTriggered(), te::qt::af::BaseApplication::onLayerTableClose(), te::qt::af::LayerExplorer::onLayerVisibilityChanged(), te::qt::af::BaseApplication::onMapRemoveSelectionTriggered(), te::qt::af::BaseApplication::onMapSetUnknwonSRIDTriggered(), te::qt::af::BaseApplication::onMapSRIDTriggered(), te::qt::af::BaseApplication::onOpenProjectTriggered(), te::qt::af::BaseApplication::onPanToggled(), te::qt::af::BaseApplication::onPluginsManagerTriggered(), te::qt::plugins::rp::SegmenterAction::onPopUpActionActivated(), te::qt::plugins::rp::ContrastAction::onPopUpActionActivated(), te::qt::plugins::rp::MixtureModelAction::onPopUpActionActivated(), te::qt::af::BaseApplication::onProjectPropertiesTriggered(), te::qt::af::BaseApplication::onRemoveLayerTriggered(), te::qt::af::BaseApplication::onRenameLayerTriggered(), te::qt::af::BaseApplication::onSaveProjectAsTriggered(), te::qt::af::BaseApplication::onSaveProjectTriggered(), te::qt::af::LayerExplorer::onSelectedLayersChanged(), te::qt::af::BaseApplication::onSelectionToggled(), te::qt::af::BaseApplication::onToolsCustomizeTriggered(), te::qt::af::BaseApplication::onToolsDataExchangerDirectPopUpTriggered(), te::qt::af::BaseApplication::onToolsDataExchangerDirectTriggered(), te::qt::af::BaseApplication::onToolsDataExchangerTriggered(), te::qt::af::LayerExplorer::onTreeItemDoubleClicked(), te::qt::af::BaseApplication::onZoomExtentTriggered(), te::qt::af::BaseApplication::onZoomInToggled(), te::qt::af::BaseApplication::onZoomOutToggled(), te::qt::plugins::gdal::Plugin::openFileDialog(), te::qt::af::BaseApplication::openProject(), te::qt::af::ReadProject(), RemoveBars(), te::qt::af::ToolbarsWidget::saveChanges(), te::qt::af::DisplayWidget::saveChanges(), te::qt::af::TableWidget::saveChanges(), te::qt::af::DataSetTableDockWidget::selectionChanged(), te::qt::af::ChartDisplayDockWidget::selectionChanged(), SetActions(), SetToolbars(), te::qt::plugins::ogr::Plugin::showWindow(), te::qt::plugins::terralib4::Plugin::showWindow(), te::qt::plugins::layout::Plugin::startup(), te::qt::plugins::terralib4::Plugin::startup(), te::qt::plugins::ogr::Plugin::startup(), te::qt::plugins::gdal::Plugin::startup(), te::qt::plugins::rp::Plugin::startup(), te::qt::plugins::vp::Plugin::startup(), te::qt::af::UpdateToolBarsInTheSettings(), and te::qt::af::BaseApplication::~BaseApplication().
QWidget * te::qt::af::ApplicationController::getMainWindow | ( | ) | const |
Returns main window.
Definition at line 690 of file ApplicationController.cpp.
Referenced by te::qt::plugins::vp::AggregationAction::onActionActivated(), te::qt::plugins::vp::IntersectionAction::onActionActivated(), te::qt::plugins::vp::BufferAction::onActionActivated(), te::qt::plugins::terralib4::TL4ConverterAction::onActionActivated(), and te::qt::plugins::terralib4::Plugin::showWindow().
QMenu * te::qt::af::ApplicationController::getMenu | ( | const QString & | id | ) |
Returns a menu registered with key id.
id | Identifier of menu to be searched. |
Definition at line 181 of file ApplicationController.cpp.
References te::qt::widgets::GetMenu().
Referenced by TerraView::makeDialog(), te::qt::plugins::layout::LayoutEditorAction::onActionActivated(), te::qt::plugins::layout::Plugin::startup(), te::qt::plugins::rp::Plugin::startup(), and te::qt::plugins::vp::Plugin::startup().
QMenuBar * te::qt::af::ApplicationController::getMenuBar | ( | const QString & | id | ) | const |
Returns a menu bar registered with key id.
id | Identifier of menu bar to be searched. |
Definition at line 209 of file ApplicationController.cpp.
QString te::qt::af::ApplicationController::getMostRecentProject | ( | ) | const |
Returns the most recent project.
Definition at line 675 of file ApplicationController.cpp.
Referenced by te::qt::af::BaseApplication::init().
te::qt::af::Project * te::qt::af::ApplicationController::getProject | ( | ) |
Get the current project.
Definition at line 625 of file ApplicationController.cpp.
Referenced by te::qt::plugins::rp::AbstractAction::getLayers(), te::qt::plugins::vp::AggregationAction::onActionActivated(), te::qt::plugins::vp::SummarizationAction::onActionActivated(), te::qt::plugins::vp::TransformationAction::onActionActivated(), te::qt::plugins::vp::BasicGeographicOperationAction::onActionActivated(), te::qt::plugins::vp::BufferAction::onActionActivated(), te::qt::plugins::vp::IntersectionAction::onActionActivated(), te::qt::plugins::vp::PolygonToLineAction::onActionActivated(), te::qt::af::BaseApplication::onAddQueryLayerTriggered(), te::qt::af::LayerExplorer::onApplicationTriggered(), te::qt::af::LayerExplorer::onLayerOrderChanged(), te::qt::af::BaseApplication::onMapRemoveSelectionTriggered(), te::qt::af::LayerExplorer::onSelectedLayersChanged(), te::qt::af::BaseApplication::onToolsDataExchangerDirectTriggered(), te::qt::plugins::gdal::Plugin::openFileDialog(), and te::qt::plugins::ogr::Plugin::showWindow().
QColor te::qt::af::ApplicationController::getSelectionColor | ( | ) | const |
Returns the application selection color.
Definition at line 685 of file ApplicationController.cpp.
Referenced by te::qt::af::MapDisplay::drawLayerSelection(), and te::qt::af::LayoutEditor::onApplicationTriggered().
QSettings & te::qt::af::ApplicationController::getSettings | ( | ) |
Return the QSettings of the application. This can be used to add settings from external sources.
Definition at line 652 of file ApplicationController.cpp.
QToolBar * te::qt::af::ApplicationController::getToolBar | ( | const QString & | id | ) | const |
Return the toolbar identified by id or NULL if none is found.
id | The toolbar identification string. |
Definition at line 123 of file ApplicationController.cpp.
std::vector< QToolBar * > te::qt::af::ApplicationController::getToolBars | ( | ) | const |
Return the list of registered toolbars.
Definition at line 130 of file ApplicationController.cpp.
Referenced by SetToolbars(), and te::qt::af::UpdateToolBarsInTheSettings().
|
virtual |
Initializes the application framework.
The initialization will read the following configurations files (in order):
It will start by initializing the available TerraLib modules. This means that applications that uses the application framework, does not need to call TerraLib initialization (TerraLib::getInstance().initialize()) and finalization methods (TerraLib::getInstance().finalize()).
Exception | It throws an exception if the initialization fails. |
Definition at line 259 of file ApplicationController.cpp.
References te::qt::af::CreateDefaultSettings(), te::common::Singleton< T >::getInstance(), te::common::Singleton< HelpManager >::getInstance(), te::common::Singleton< SplashScreenManager >::getInstance(), te::common::Singleton< TerraLib >::getInstance(), te::common::Singleton< UserApplicationSettings >::getInstance(), te::common::ApplicationSettings::getValue(), TerraLib::initialize(), te::common::UserApplicationSettings::load(), te::serialize::xml::ReadDataSourceInfo(), te::qt::af::SplashScreenManager::showMessage(), and TERRALIB_APPLICATION_CONFIG_FILE.
Referenced by te::qt::af::BaseApplication::init().
|
virtual |
Load the plugin list and initialize the plugins enabled by the user.
The plugin initialization will read a file containing a list of plugins with their addresses. This file is generally called application_plugins.xml.
Definition at line 443 of file ApplicationController.cpp.
References te::qt::af::SplashScreenManager::close(), te::common::Singleton< SplashScreenManager >::getInstance(), te::common::Singleton< ApplicationPlugins >::getInstance(), te::common::Singleton< UserPlugins >::getInstance(), te::common::Singleton< T >::getInstance(), te::qt::af::ApplicationPlugins::load(), te::qt::af::UserPlugins::load(), and te::qt::af::SplashScreenManager::showMessage().
Referenced by te::qt::af::BaseApplication::init().
|
virtual |
Initializes the menus for the most recent open projects.
Definition at line 507 of file ApplicationController.cpp.
References te::common::ApplicationSettings::getAllSettings(), te::common::Singleton< SplashScreenManager >::getInstance(), te::common::Singleton< UserApplicationSettings >::getInstance(), and te::qt::af::SplashScreenManager::showMessage().
Referenced by te::qt::af::BaseApplication::init().
void te::qt::af::ApplicationController::registerMenu | ( | QMenu * | mnu | ) |
Register the mnu.
mnu | Pointer to the menu to be registered. |
Definition at line 149 of file ApplicationController.cpp.
Referenced by te::qt::af::BaseApplication::initMenus().
void te::qt::af::ApplicationController::registerMenuBar | ( | QMenuBar * | bar | ) |
Register the bar.
bar | Pointer to the menu bar to be registered. |
Definition at line 199 of file ApplicationController.cpp.
Referenced by te::qt::af::BaseApplication::initMenus().
void te::qt::af::ApplicationController::registerToolBar | ( | const QString & | id, |
QToolBar * | bar | ||
) |
Register the toolbar in the list of the known toolbars.
id | The toolbar identification string. |
bar | The toolbar to be registered. The controller will not take the bar ownership. |
Exception | It throws an exception if a toolbar with the given id already exists. |
Definition at line 113 of file ApplicationController.cpp.
References TR_QT_AF.
Referenced by te::qt::af::BaseApplication::initToolbars().
void te::qt::af::ApplicationController::removeListener | ( | QObject * | obj | ) |
Remove the obj from the list of event listeners.
obj | The application item to be removed. |
Definition at line 247 of file ApplicationController.cpp.
Referenced by te::qt::af::BaseApplication::onLayerTableClose().
void te::qt::af::ApplicationController::removeToolBar | ( | const QString & | id | ) |
Removes the toolbar identified by id.
id | Identifier of the tool bar. |
Definition at line 141 of file ApplicationController.cpp.
Referenced by RemoveBars().
void te::qt::af::ApplicationController::set | ( | te::qt::af::Project * | prj | ) |
Set the current project.
prj | Pointer to a current project. |
Definition at line 620 of file ApplicationController.cpp.
Referenced by te::qt::af::BaseApplication::newProject(), and te::qt::af::BaseApplication::openProject().
|
virtual |
Tells wich configuration file to be used by the controller during its initialization.
configFileName | The configuration file name with full path. |
Definition at line 93 of file ApplicationController.cpp.
Referenced by te::qt::af::BaseApplication::init().
|
virtual |
Tells the widget to be used as the parent of messages showned in a QMessageBox.
w | The widget to be used as the parent of messages showned in a QMessageBox. |
Definition at line 98 of file ApplicationController.cpp.
Referenced by te::qt::af::BaseApplication::BaseApplication().
|
signal |
Signal emmited to the aplication framework listeners.
void te::qt::af::ApplicationController::updateRecentProjects | ( | const QString & | prjFile, |
const QString & | prjTitle | ||
) |
Update the list of recent projects. This is commonly used when there's a new most recent project.
prj_file | Complete file name for the project file. |
prj_title | Title of the project. |
Definition at line 567 of file ApplicationController.cpp.
References te::qt::af::GetProjectInformationsFromSettings().
Referenced by te::qt::af::BaseApplication::onSaveProjectAsTriggered(), te::qt::af::BaseApplication::onSaveProjectTriggered(), and te::qt::af::BaseApplication::openProject().
|
related |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
The difference for the above function is that this will search in all QMenu objects contained in the bar.
|
protected |
The application framework configuration file.
Definition at line 411 of file ApplicationController.h.
|
protected |
Name of the file containing datasources used.
Definition at line 424 of file ApplicationController.h.
|
protected |
Name of the icon theme to be used.
Definition at line 422 of file ApplicationController.h.
|
protected |
Name of the help file.
Definition at line 420 of file ApplicationController.h.
|
protected |
Icon used in the application.
Definition at line 415 of file ApplicationController.h.
|
protected |
Directory of the application icon theme.
Definition at line 421 of file ApplicationController.h.
|
protected |
The list of registered application items.
Definition at line 409 of file ApplicationController.h.
|
protected |
Application name.
Definition at line 413 of file ApplicationController.h.
|
protected |
Organization name.
Definition at line 412 of file ApplicationController.h.
|
protected |
Name of the plugins file.
Definition at line 419 of file ApplicationController.h.
|
protected |
Definition at line 432 of file ApplicationController.h.
|
protected |
Application title.
Definition at line 414 of file ApplicationController.h.
|
protected |
Size of the tool buttons.
Definition at line 423 of file ApplicationController.h.
|
protected |
Name of the user settings file.
Definition at line 418 of file ApplicationController.h.
|
protected |
Default SRID value.
Definition at line 425 of file ApplicationController.h.
|
protected |
A flag indicating if the controller is initialized.
Definition at line 428 of file ApplicationController.h.
|
protected |
Menu bars registered.
Definition at line 408 of file ApplicationController.h.
|
protected |
Menus registered.
Definition at line 407 of file ApplicationController.h.
|
protected |
Parent used to show message boxes.
Definition at line 410 of file ApplicationController.h.
|
protected |
Pointer to current project.
Definition at line 430 of file ApplicationController.h.
|
protected |
List of the recent projects.
Definition at line 416 of file ApplicationController.h.
|
protected |
List of the titles of the recent projects.
Definition at line 417 of file ApplicationController.h.
|
protected |
Default selection color.
Definition at line 426 of file ApplicationController.h.
|
protected |
Toolbars registered.
Definition at line 406 of file ApplicationController.h.
|
staticprotected |
There can be only one object of class Application.
Definition at line 435 of file ApplicationController.h.
Referenced by ApplicationController().