ToolMap
Loading...
Searching...
No Matches
ProjectManager Class Reference

Project operations (new, open,...) More...

#include <projectmanager.h>

Inheritance diagram for ProjectManager:

Public Member Functions

 ProjectManager (wxFrame *parent)
 Constructor.
 
 ~ProjectManager ()
 Destructor.
 
bool CreateNewProject ()
 Create a new Toolmap project.
 
void CloseProject ()
 Close the active database.
 
int OpenProject (const wxString &path)
 Open ToolMap project.
 
bool EditProjectObjectDefinition ()
 
bool EditObjectFrequency (int id)
 
bool EditProjectSettings ()
 
bool EditProject (int notebooknumber)
 Edit the project (layers,...)
 
bool BackupProject (const wxString &backup_comment=wxEmptyString)
 
bool MergeProjects (const wxString &slave_project_name, bool beVerbose=true)
 
wxString GetProjectName ()
 Get the actual project name.
 
void SetMenuManager (MenuManager *pMenu)
 
MenuManagerGetMenuManager ()
 
ObjectManagerGetObjectManager ()
 
void SetStatusBar (wxStatusBar *status)
 
void SetAttributionManager (tmAttributionManager *pAManager)
 
void SetQueriesPanel (Queries_PANEL *queriespanel)
 
void SetShortcutPanel (Shortcuts_PANEL *panel)
 
void SetSnappingPanel (Snapping_PANEL *panel)
 
void SetEditManager (tmEditManager *editmanager)
 
DataBaseTMGetDatabase ()
 
void SetToolManager (tmToolManager *tm)
 
void SetStatManager (tmStatsManager *statmanager)
 
void SetLayerManager (tmLayerManager *layermanager)
 
bool IsProjectOpen ()
 
bool LoadProjectDefintion (short int message=0)
 Load project defintion from database to memory.
 
PrjDefMemManageGetMemoryProjectDefinition ()
 Get the project definition.
 

Detailed Description

Project operations (new, open,...)

This is used to implement all project operations such as creating new project, opening existing ToolMap project, closing project,...

Author
Lucien Schreiber (c) CREALP 2007
Date
10 March 2008

Constructor & Destructor Documentation

◆ ProjectManager()

ProjectManager::ProjectManager ( wxFrame *  parent)

Constructor.

Author
Lucien Schreiber (c) CREALP 2007
Date
10 March 2008

◆ ~ProjectManager()

ProjectManager::~ProjectManager ( )

Destructor.

Author
Lucien Schreiber (c) CREALP 2007
Date
10 March 2008

Member Function Documentation

◆ CloseProject()

void ProjectManager::CloseProject ( )

Close the active database.

This function may be called as often as you want, check is made and database is closed only if previously opened.

Note
All internal functions should work event if database is empty
Author
Lucien Schreiber (c) CREALP 2007
Date
11 March 2008

◆ CreateNewProject()

bool ProjectManager::CreateNewProject ( )

Create a new Toolmap project.

This function is called for creating a new embedded database and storing data from project definition

Returns
return TRUE if a new project was created succesfully
Author
Lucien Schreiber (c) CREALP 2007
Date
10 March 2008

◆ EditProject()

bool ProjectManager::EditProject ( int  notebooknumber)

Edit the project (layers,...)

This function may be called for editing the project (layers, fields,...).

Note
do not call this function if no DB is opened.
Returns
TRUE if all went ok during project editing
Author
Lucien Schreiber (c) CREALP 2007
Date
10 April 2008

◆ GetMemoryProjectDefinition()

PrjDefMemManage * ProjectManager::GetMemoryProjectDefinition ( )

Get the project definition.

Returns
a valid PrjDefMemManage object (if project isn't initialized an wxASSERT is issued in debug mode
Author
Lucien Schreiber (c) CREALP 2009
Date
16 March 2009

◆ GetProjectName()

wxString ProjectManager::GetProjectName ( )

Get the actual project name.

Returns
Return a wxString containing the actual project name. This name isn't stored internally but we asked the DataBaseTM class
Author
Lucien Schreiber (c) CREALP 2007
Date
11 March 2008

◆ LoadProjectDefintion()

bool ProjectManager::LoadProjectDefintion ( short int  message = 0)

Load project defintion from database to memory.

Project defintion is used for :

  • Editing project
  • Advanced attribution
    Parameters
    messageMessage displayed during project loading :
  • 0 = No Message
  • 1= Loading project in progress
  • 2 = Cancelling in progress
    Returns
    true if loading project definition succeed false and an assert in debug mode
    Author
    Lucien Schreiber (c) CREALP 2009
    Date
    12 March 2009

◆ OpenProject()

int ProjectManager::OpenProject ( const wxString &  path)

Open ToolMap project.

Try to open a toolmap project

Parameters
pathpath to the project
Returns
one of the #tmPROJECT_OPEN_ERROR. If database version isn't correct, return the not correct number as error code
Author
Lucien Schreiber (c) CREALP 2008
Date
21 October 2008

m_pMManager->SetStatus(MENU_DB_OPENED);


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