#include <TdkApplication.h>
Inheritance diagram for TdkApplication:
Public Member Functions | |
TdkApplication () | |
Basic constructor. | |
virtual | ~TdkApplication () |
Destructor. | |
virtual void | cleanup () |
virtual bool | init () |
virtual void * | getMainWinHandle ()=0 |
virtual void | importDatabase (TeDatabase *db1) |
virtual void | saveLegend () |
Saves everything that was modified in the current map. | |
virtual TeDatabase * | getDatabase () |
Returns the database. | |
virtual bool | getCanWriteDB () |
virtual void | setCurrentView (const TdkObjectGID &viewGID) |
Sets the index of the current map (the one that will be worked on). | |
virtual TdkTreeLegend * | getLegend () |
Accessor method to Legend. | |
virtual TdkObjectGID | getProjectId () |
Accessor method to project identifier. | |
virtual TdkProject * | getCurrentProject () |
Accessor method to Project. | |
virtual void | setProject (TdkObjectGID &project_id) |
Mutator method to Project. | |
virtual void | createProject (TdkObjectGID &projectId, std::string name, std::string desc) |
Creates a new project in the currently used database_. | |
virtual void | newDatabase (TdkConDescriptor &desc) |
Creates a new database with TerraLib and Tdk model tables. | |
virtual void | connectDatabase (TdkConDescriptor &desc) |
Connects the application to a database: creates a database connection. | |
virtual bool | closeDatabaseConnection () |
Closes the currently open connection (if any). | |
virtual bool | isDatabaseConnected () |
Tells whether there is a currently open connection to any database. | |
virtual void | loadProject (TdkObjectGID &projectGID) |
Loads a project info ("opens" a project) from the currently connected database_. | |
virtual bool | closeProject () |
Closes the currently open project (if any). | |
virtual void | deleteProject () |
Removes a project from its database_. | |
virtual bool | isProjectOpen () |
Tells whether there is a currently open project. | |
virtual void | refresh () |
Refresh the legend and draw the map. | |
virtual bool | isAuthenticationOn () |
virtual bool | setAuthentication (bool valid) |
virtual std::string | getApplicationUser () |
virtual std::string | getApplicationPassword () |
virtual void | setAppName (std::string appName) |
virtual std::string | getAppName () |
virtual void | setAppBuild (std::string appBuild) |
virtual std::string | getAppBuild () |
virtual void | setAppDate (std::string appDate) |
virtual std::string | getAppDate () |
virtual void | setApplicationUser (std::string appUserName) |
virtual void | setApplicationPassword (std::string appUserPassword) |
virtual void | login (std::string appUserName, std::string appUserpassword, TdkConDescriptor &desc) |
Method responsible for user authentication. | |
virtual void | logOut (std::string appUserName, TdkConDescriptor &desc) |
Protected Member Functions | |
void | restoreViewsState (std::vector< bool > &viewStatus) |
TdkApplication (const TdkApplication &) | |
Protected Attributes | |
TeDatabase * | db_ |
A copy of the object cannot be taken. | |
TdkTreeLegend * | legend_ |
TdkInteract * | interact_ |
Associated interact. | |
std::string | DBName_ |
bool | canWriteDB_ |
std::string | app_path_ |
std::string | appUserName_ |
std::string | appUserPassword_ |
bool | authenticationOn_ |
std::string | appBuild_ |
std::string | appDate_ |
std::string | appName_ |
This class is the main application class, it defines the structures of the menus, toolbars, the main window with all the components and everything related to the main tasks in an application (opening databases, projects, search tools, etc.). In order to personalize an iup application, the first thing the programmer should do is to extend this class changing specific methods as needed.
TdkApplication::TdkApplication | ( | ) |
Basic constructor.
TdkApplication::~TdkApplication | ( | ) | [virtual] |
Destructor.
TdkApplication::TdkApplication | ( | const TdkApplication & | ) | [protected] |
void TdkApplication::cleanup | ( | ) | [virtual] |
bool TdkApplication::init | ( | ) | [virtual] |
Reimplemented in TdkSwingApplication.
virtual void* TdkApplication::getMainWinHandle | ( | ) | [pure virtual] |
Implemented in TdkSwingApplication, and TdkFCTApplication.
void TdkApplication::importDatabase | ( | TeDatabase * | db1 | ) | [virtual] |
void TdkApplication::saveLegend | ( | ) | [virtual] |
Saves everything that was modified in the current map.
virtual TeDatabase* TdkApplication::getDatabase | ( | ) | [inline, virtual] |
Returns the database.
virtual bool TdkApplication::getCanWriteDB | ( | ) | [inline, virtual] |
void TdkApplication::setCurrentView | ( | const TdkObjectGID & | viewGID | ) | [virtual] |
Sets the index of the current map (the one that will be worked on).
virtual TdkTreeLegend* TdkApplication::getLegend | ( | ) | [inline, virtual] |
Accessor method to Legend.
Accesses the Legend member
TdkObjectGID TdkApplication::getProjectId | ( | ) | [virtual] |
Accessor method to project identifier.
TdkProject * TdkApplication::getCurrentProject | ( | ) | [virtual] |
Accessor method to Project.
Accesses the Project member
void TdkApplication::setProject | ( | TdkObjectGID & | project_id | ) | [virtual] |
Mutator method to Project.
Sets the Project member
void TdkApplication::createProject | ( | TdkObjectGID & | projectId, | |
std::string | name, | |||
std::string | desc | |||
) | [virtual] |
Creates a new project in the currently used database_.
projectGID | The returned new project global id. | |
name | The project name. | |
desc | The project description. |
void TdkApplication::newDatabase | ( | TdkConDescriptor & | desc | ) | [virtual] |
Creates a new database with TerraLib and Tdk model tables.
desc | The database descriptor. |
void TdkApplication::connectDatabase | ( | TdkConDescriptor & | desc | ) | [virtual] |
Connects the application to a database: creates a database connection.
desc | The database descriptor. |
bool TdkApplication::closeDatabaseConnection | ( | ) | [virtual] |
Closes the currently open connection (if any).
bool TdkApplication::isDatabaseConnected | ( | ) | [virtual] |
Tells whether there is a currently open connection to any database.
void TdkApplication::loadProject | ( | TdkObjectGID & | projectGID | ) | [virtual] |
Loads a project info ("opens" a project) from the currently connected database_.
bool TdkApplication::closeProject | ( | ) | [virtual] |
Closes the currently open project (if any).
void TdkApplication::deleteProject | ( | ) | [virtual] |
Removes a project from its database_.
project_id | The project id. |
bool TdkApplication::isProjectOpen | ( | ) | [virtual] |
Tells whether there is a currently open project.
void TdkApplication::refresh | ( | ) | [virtual] |
Refresh the legend and draw the map.
bool TdkApplication::isAuthenticationOn | ( | ) | [virtual] |
bool TdkApplication::setAuthentication | ( | bool | valid | ) | [virtual] |
std::string TdkApplication::getApplicationUser | ( | ) | [virtual] |
std::string TdkApplication::getApplicationPassword | ( | ) | [virtual] |
virtual void TdkApplication::setAppName | ( | std::string | appName | ) | [inline, virtual] |
virtual std::string TdkApplication::getAppName | ( | ) | [inline, virtual] |
virtual void TdkApplication::setAppBuild | ( | std::string | appBuild | ) | [inline, virtual] |
virtual std::string TdkApplication::getAppBuild | ( | ) | [inline, virtual] |
virtual void TdkApplication::setAppDate | ( | std::string | appDate | ) | [inline, virtual] |
virtual std::string TdkApplication::getAppDate | ( | ) | [inline, virtual] |
void TdkApplication::setApplicationUser | ( | std::string | appUserName | ) | [virtual] |
void TdkApplication::setApplicationPassword | ( | std::string | appUserPassword | ) | [virtual] |
void TdkApplication::login | ( | std::string | appUserName, | |
std::string | appUserpassword, | |||
TdkConDescriptor & | desc | |||
) | [virtual] |
Method responsible for user authentication.
This method should be extended in any application that wishes to authenticate users when connecting to databases.
void TdkApplication::logOut | ( | std::string | appUserName, | |
TdkConDescriptor & | desc | |||
) | [virtual] |
void TdkApplication::restoreViewsState | ( | std::vector< bool > & | viewStatus | ) | [protected] |
TeDatabase* TdkApplication::db_ [protected] |
A copy of the object cannot be taken.
TdkTreeLegend* TdkApplication::legend_ [protected] |
TdkInteract* TdkApplication::interact_ [protected] |
Associated interact.
std::string TdkApplication::DBName_ [protected] |
bool TdkApplication::canWriteDB_ [protected] |
std::string TdkApplication::app_path_ [protected] |
std::string TdkApplication::appUserName_ [protected] |
std::string TdkApplication::appUserPassword_ [protected] |
bool TdkApplication::authenticationOn_ [protected] |
std::string TdkApplication::appBuild_ [protected] |
std::string TdkApplication::appDate_ [protected] |
std::string TdkApplication::appName_ [protected] |