TerraViewController Class Reference

The API for controller of TerraView application. More...

#include <TerraViewController.h>

Inheritance diagram for TerraViewController:
QObject

Public Member Functions

const QString & getAppProjectExtension () const
 Returns the application project extension. More...
 
QString getExtensionFilter ()
 Returns the project extension filter . More...
 
QString getMostRecentProject () const
 Returns the most recent project. More...
 
virtual void initializeProjectMenus ()
 Initializes the menus for the most recent open projects. More...
 
 TerraViewController (te::qt::af::ApplicationController *app, std::string appConfigFile)
 Constructor. 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 ~TerraViewController ()
 Destructor. More...
 

Protected Attributes

te::qt::af::ApplicationControllerm_app
 
QString m_appProjectExtension
 Application project extension. More...
 
QStringList m_recentProjs
 List of the recent projects. More...
 
QStringList m_recentProjsTitles
 List of the titles of the recent projects. More...
 

Detailed Description

The API for controller of TerraView application.

Definition at line 59 of file TerraViewController.h.

Constructor & Destructor Documentation

TerraViewController::TerraViewController ( te::qt::af::ApplicationController app,
std::string  appConfigFile 
)

Constructor.

Parameters
parentThe parent object.

Definition at line 55 of file TerraViewController.cpp.

References te::common::Singleton< T >::getInstance(), and m_appProjectExtension.

TerraViewController::~TerraViewController ( )
virtual

Destructor.

Definition at line 64 of file TerraViewController.cpp.

References m_appProjectExtension, m_recentProjs, and m_recentProjsTitles.

Member Function Documentation

const QString & TerraViewController::getAppProjectExtension ( ) const

Returns the application project extension.

Returns
Application project extension.

Definition at line 193 of file TerraViewController.cpp.

References m_appProjectExtension.

Referenced by TerraView::onSaveProjectTriggered().

QString TerraViewController::getExtensionFilter ( )

Returns the project extension filter .

Returns
Filter string.

Definition at line 204 of file TerraViewController.cpp.

References te::qt::af::ApplicationController::getAppName(), m_app, and m_appProjectExtension.

Referenced by TerraView::onOpenProjectTriggered().

QString TerraViewController::getMostRecentProject ( ) const

Returns the most recent project.

Returns
Application most recent opened project.

Definition at line 199 of file TerraViewController.cpp.

References m_recentProjs.

void TerraViewController::initializeProjectMenus ( )
virtual
void TerraViewController::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.

Parameters
prj_fileComplete file name for the project file.
prj_titleTitle of the project.

Definition at line 133 of file TerraViewController.cpp.

References te::qt::af::ApplicationController::findAction(), te::qt::af::ApplicationController::getMenu(), GetProjectInformationsFromSettings(), m_app, m_recentProjs, and m_recentProjsTitles.

Referenced by TerraView::onSaveProjectTriggered().

Member Data Documentation

te::qt::af::ApplicationController* TerraViewController::m_app
protected
QString TerraViewController::m_appProjectExtension
protected

Application project extension.

Definition at line 117 of file TerraViewController.h.

Referenced by getAppProjectExtension(), getExtensionFilter(), TerraViewController(), and ~TerraViewController().

QStringList TerraViewController::m_recentProjs
protected

List of the recent projects.

Definition at line 118 of file TerraViewController.h.

Referenced by getMostRecentProject(), initializeProjectMenus(), updateRecentProjects(), and ~TerraViewController().

QStringList TerraViewController::m_recentProjsTitles
protected

List of the titles of the recent projects.

Definition at line 119 of file TerraViewController.h.

Referenced by initializeProjectMenus(), updateRecentProjects(), and ~TerraViewController().


The documentation for this class was generated from the following files: