Provides access to various parts of the application. More...
#include <controller.h>
Public Member Functions | |
~Controller () | |
void | setContentView (ContentView *contentview) |
ContentView * | getContentView () const |
WelcomeView * | getWelcomeView () |
TextEdit * | getTextEdit () |
RichTextEdit * | getRichTextEdit () |
AbstractDataStore * | getDataStore () |
void | setInfoSidebar (InfoSidebar *infosidebar) |
InfoSidebar * | getInfoSidebar () const |
void | setSearchNodeSidebar (SearchNodeSidebar *searchnodesidebar) |
SearchNodeSidebar * | getSearchNodeSidebar () const |
void | setTreeView (TreeView *treeview) |
TreeView * | getTreeView () const |
void | setStatusBar (StatusBar *statusbar) |
StatusBar * | getStatusBar () const |
void | setNodePropertyWidget (NodePropertyWidget *nodepropertywidget) |
NodePropertyWidget * | getNodePropertyWidget () const |
void | setNavigationSidebar (NavigationSidebar *navigationsidebar) |
NavigationSidebar * | getNavigationSidebar () const |
void | setEditMenu (EditMenu *editmenu) |
EditMenu * | getEditMenu () const |
Static Public Member Functions | |
static Controller * | create () |
Provides access to various parts of the application.
The Controller provides access to objects needed in different parts of the application. It is a Singelton and can be created with the static create() function.
Some classes should have only one instance which is managed by the Controller. These classes are WelcomeView, TextEdit, DataStore and RichTextEdit. To use these classes you can use the get-methods of the Controller.
Controller::~Controller | ( | ) |
The destructor. Destroys the datastore.
Controller * Controller::create | ( | ) | [static] |
This function creates a instance of the Controller if there is not alredy one.
ContentView * Controller::getContentView | ( | ) | const |
Get a pointer of the ContentView.
AbstractDataStore * Controller::getDataStore | ( | ) |
Get a pointer to the datastore. The Controller will manage the datastore, that means it will create and destroy it. The datastore is the backend responsible for persisting the data. The following datastores are availlable: XmlDataStore
EditMenu * Controller::getEditMenu | ( | ) | const |
InfoSidebar * Controller::getInfoSidebar | ( | ) | const |
Get a pointer to the InfoSidebar.
NavigationSidebar * Controller::getNavigationSidebar | ( | ) | const |
Get a pointer to the NavigationSidebar.
NodePropertyWidget * Controller::getNodePropertyWidget | ( | ) | const |
Get a pointer to the NodePropertyWidget.
RichTextEdit * Controller::getRichTextEdit | ( | ) |
Get a pointer to the RichTextEdit. The Controller will manage the RichTextEdit, that means it will create and destroy it.
SearchNodeSidebar * Controller::getSearchNodeSidebar | ( | ) | const |
Get a pointer to the SearchNodeSidebar.
StatusBar * Controller::getStatusBar | ( | ) | const |
TextEdit * Controller::getTextEdit | ( | ) |
Get a pointer to the TextEdit. The Controller will manage the TextEdit, that means it will create and destroy it.
TreeView * Controller::getTreeView | ( | ) | const |
WelcomeView * Controller::getWelcomeView | ( | ) |
Get a pointer to the WelcomeView. The Controller will manage the WelcomeView, that means it will create and destroy it.
void Controller::setContentView | ( | ContentView * | contentview | ) |
This function provides the Controller with a pointer of the ContentView.
contentview | A pointer to the ContentView. |
void Controller::setEditMenu | ( | EditMenu * | editmenu | ) |
This function provides the Controller with a pointer to the EditMenu.
editmenu | A pointer to the EditMenu. |
void Controller::setInfoSidebar | ( | InfoSidebar * | infosidebar | ) |
This function provides the Controller with a pointer to the InfoSidebar.
infosidebar | A pointer to the InfoSidebar |
void Controller::setNavigationSidebar | ( | NavigationSidebar * | navigationsidebar | ) |
This function provides the Controller with a pointer to the NavigationSidebar.
navigationsidebar | A pointer to the NavigationSidebar. |
void Controller::setNodePropertyWidget | ( | NodePropertyWidget * | nodepropertywidget | ) |
This function provides the Controller with a pointer to the NodePropertyWidget.
nodepropertywidget | A pointer to the NodePropertyWidget. |
void Controller::setSearchNodeSidebar | ( | SearchNodeSidebar * | searchnodesidebar | ) |
This function provides the Controller with a pointer to the SearchNodeSidebar.
searchnodesidebar | A pointer to the SearchNodeSidebar. |
void Controller::setStatusBar | ( | StatusBar * | statusbar | ) |
This function provides the Controller with a pointer to the StatusBar.
statusbar | A pointer to the StatusBar. |
void Controller::setTreeView | ( | TreeView * | treeview | ) |
This function provides the Controller with a pointer to the TreeView.
treeview | A pointer to the TreeView. |