All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OutsideFactory.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file OutsideFactory.cpp
22 
23  \brief
24 
25  \ingroup layout
26 */
27 
28 // TerraLib
29 #include "OutsideFactory.h"
30 #include "../../../../core/enum/AbstractType.h"
31 #include "../../../../core/pattern/factory/OutsideParamsCreate.h"
32 #include "../../../outside/ToolbarOutside.h"
33 #include "../../../outside/PropertiesOutside.h"
34 #include "../../../outside/ObjectInspectorOutside.h"
35 #include "../../../outside/GridSettingsOutside.h"
36 #include "../../../outside/PageSetupOutside.h"
37 #include "../../../outside/SystematicScaleOutside.h"
38 #include "../../../outside/EditTemplateOutside.h"
39 #include "../../../outside/TextGridSettingsOutside.h"
40 #include "../../../../core/enum/Enums.h"
41 #include "../../../outside/MapLayerChoiceOutside.h"
42 
44 {
45 
46 }
47 
49 {
50 
51 }
52 
54 {
55  Observer* outside = 0;
56 
58 
59  if(type == enumObj->getToolbar())
60  {
61  ToolbarOutside* toolbar = new ToolbarOutside(params.getController(), params.getModel());
62  toolbar->createToolbar();
63  outside = (Observer*)toolbar;
64  }
65  else if(type == enumObj->getPropertiesWindow())
66  {
67  PropertiesOutside* window = new PropertiesOutside(params.getController(), params.getModel());
68  outside = (Observer*)window;
69  }
70  else if(type == enumObj->getObjectInspectorWindow())
71  {
72  ObjectInspectorOutside* inspector = new ObjectInspectorOutside(params.getController(), params.getModel());
73  outside = (Observer*)inspector;
74  }
75  else if(type == enumObj->getGridSettings())
76  {
77  GridSettingsOutside* gridSettings = new GridSettingsOutside(params.getController(), params.getModel());
78  outside = (Observer*)gridSettings;
79  }
80  else if(type == enumObj->getPageSetup())
81  {
82  PageSetupOutside* pageSetup = new PageSetupOutside(params.getController(), params.getModel());
83  outside = (Observer*)pageSetup;
84  }
85  else if(type == enumObj->getSystematicScale())
86  {
87  SystematicScaleOutside* systematic = new SystematicScaleOutside(params.getController(), params.getModel());
88  outside = (Observer*)systematic;
89  }
90  else if(type == enumObj->getEditTemplate())
91  {
92  EditTemplateOutside* editTemplate = new EditTemplateOutside(params.getController(), params.getModel());
93  outside = (Observer*)editTemplate;
94  }
95  else if(type == enumObj->getTextGridSettings())
96  {
97  TextGridSettingsOutside* textGridSettings = new TextGridSettingsOutside(params.getController(), params.getModel());
98  outside = (Observer*)textGridSettings;
99  }
100  else if(type == enumObj->getMapLayerChoice())
101  {
102  MapLayerChoiceOutside* mapLayerChoice = new MapLayerChoiceOutside(params.getController(), params.getModel());
103  outside = (Observer*)mapLayerChoice;
104  }
105 
106  return outside;
107 }
virtual EnumType * getTextGridSettings() const
Returns value that represents text grid settings (MVC widget) type belonging to enumeration.
Class to represent a graphic object (MVC component) and widget object (MVC widget) type enumeration...
virtual EnumType * getObjectInspectorWindow() const
Returns value that represents object inspector widget (MVC widget) type belonging to enumeration...
virtual EnumType * getGridSettings() const
Returns value that represents GridSettings window (MVC dialog) type belonging to enumeration.
Properties tree for any item, MVC component, using Qt for presentation and editing.
virtual EnumType * getPageSetup() const
Returns value that represents page setup window (MVC dialog) type belonging to enumeration.
OutsideController * getController()
Returns the "Controller" part of the MVC.
virtual EnumObjectType * getEnumObjectType()
Returns graphic object (MVC component) and widget object (MVC widget) type enumeration.
Definition: Enums.cpp:62
Tree of names of all the items entered on the scene, MVC components, using Qt to present the name of ...
Abstract class to represent an observer. "View" part of MVC component.
Definition: Observer.h:48
Parameters to creation new object. Ex.: "Model" and "Controller" of the new object (MVC widget)...
virtual ~OutsideFactory()
Destructor.
static Enums & getInstance()
It returns a reference to the singleton instance.
Window (QDialog) map grid setting (MapItem).
Observable * getModel()
Returns the "Model" part of the MVC.
virtual EnumType * getToolbar() const
Returns value that represents toolbar widget (MVC widget) type belonging to enumeration.
virtual EnumType * getEditTemplate() const
Returns value that represents edit template widget (MVC widget) type belonging to enumeration...
virtual EnumType * getMapLayerChoice() const
Returns value that represents map layer choice (MVC Component) type belonging to enumeration.
virtual EnumType * getSystematicScale() const
Returns value that represents systematic scale window (MVC dialog) type belonging to enumeration...
Class that represents the value of an enumeration. An enumeration is made of "1..n" objects EnumType...
Definition: EnumType.h:48
Standard Toolbar for Layout. Includes Qt components for interaction between the user and the plugin/a...
virtual EnumType * getPropertiesWindow() const
Returns value that represents properties widget (MVC widget) type belonging to enumeration.
virtual Observer * make(EnumType *type, OutsideParamsCreate params=OutsideParamsCreate())
Reimplemented from AbstractItemFactory.
Factory for creating families of related or dependent widgets (MVC widgets).