controller.h

00001 /*
00002  * Silence
00003  *
00004  * Copyright (C) 2009 Manuel Unglaub
00005  *
00006  * This file is part of Silence.
00007  *
00008  * Silence is free software: you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation, version GPLv2 only of the License.
00011  *
00012  * Silence is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016 
00017  * You should have received a copy of the GNU General Public License
00018  * along with Silence.  If not, see <http://www.gnu.org/licenses/>.
00019  */
00020 
00021 #ifndef CONTROLLER_H
00022 #define CONTROLLER_H
00023 
00024 #include "src/gui/menu/editmenu.h"
00025 #include "src/gui/sidebar/infosidebar.h"
00026 #include "src/gui/sidebar/navigationsidebar.h"
00027 #include "src/gui/sidebar/nodepropertywidget.h"
00028 #include "src/gui/sidebar/searchnodesidebar.h"
00029 #include "src/gui/sidebar/treeview.h"
00030 #include "src/gui/statusbar.h"
00031 #include "src/gui/view/contentview.h"
00032 #include "src/gui/view/richtextedit.h"
00033 #include "src/gui/view/textedit.h"
00034 #include "src/gui/view/welcomeview.h"
00035 #include "src/persistence/abstractdatastore.h"
00036 #include "src/persistence/xmldatastore.h"
00037 
00038 
00053 class Controller
00054 {
00055     public:
00059         ~Controller();
00060 
00065         static Controller* create();
00066 
00071         void setContentView(ContentView* contentview);
00076         ContentView* getContentView() const;
00077 
00083         WelcomeView* getWelcomeView();
00090         TextEdit* getTextEdit();
00091 
00097         RichTextEdit* getRichTextEdit();
00098 
00104         AbstractDataStore* getDataStore();
00105 
00110         void setInfoSidebar(InfoSidebar* infosidebar);
00111 
00116         InfoSidebar* getInfoSidebar() const;
00117 
00122         void setSearchNodeSidebar(SearchNodeSidebar* searchnodesidebar);
00123 
00128         SearchNodeSidebar* getSearchNodeSidebar() const;
00129 
00134         void setTreeView(TreeView* treeview);
00135 
00140         TreeView* getTreeView() const;
00141         
00146         void setStatusBar(StatusBar* statusbar);
00147 
00152         StatusBar* getStatusBar() const;
00153 
00158         void setNodePropertyWidget(NodePropertyWidget *nodepropertywidget);
00159 
00164         NodePropertyWidget* getNodePropertyWidget() const;
00165 
00170         void setNavigationSidebar(NavigationSidebar *navigationsidebar);
00171 
00176         NavigationSidebar* getNavigationSidebar() const;
00177 
00182         void setEditMenu(EditMenu *editmenu);
00183 
00188         EditMenu* getEditMenu() const;
00189 
00190 
00191     protected:
00192         Controller();
00193 
00194     private:
00195         static Controller *controller;
00196         
00197         ContentView *contentview;
00198         WelcomeView *welcomeview;
00199         TextEdit *textedit;
00200         RichTextEdit *richtextedit;
00201         InfoSidebar *infosidebar;
00202         SearchNodeSidebar *searchsidebar;
00203         TreeView *treeview;
00204         StatusBar *statusbar;
00205         NodePropertyWidget *nodepropertywidget;
00206         NavigationSidebar *navigationsidebar;
00207         EditMenu *editmenu;
00208 
00209         AbstractDataStore *datastore;
00210 };
00211 
00212 #endif // CONTROLLER_H
00213 
Generated on Fri May 14 19:12:50 2010 for Silence by  doxygen 1.6.3