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) 2014-2014 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 "AbstractType.h"
31 #include "OutsideParamsCreate.h"
32 #include "ToolbarOutside.h"
33 #include "PropertiesOutside.h"
34 #include "DisplayOutside.h"
35 #include "ObjectInspectorOutside.h"
36 #include "GridSettingsOutside.h"
37 #include "PageSetupOutside.h"
38 
40 {
41 
42 }
43 
45 {
46 
47 }
48 
50 {
51  Observer* outside = 0;
52 
53  switch (type)
54  {
55 
56  case TPToolbar:
57  {
58  ToolbarOutside* toolbar = new ToolbarOutside(params.getController(), params.getModel());
59  outside = (Observer*)toolbar;
60  return outside;
61  break;
62  }
63  case TPPropertiesWindow:
64  {
65  PropertiesOutside* window = new PropertiesOutside(params.getController(), params.getModel());
66  outside = (Observer*)window;
67  return outside;
68  break;
69  }
71  {
72  ObjectInspectorOutside* inspector = new ObjectInspectorOutside(params.getController(), params.getModel());
73  outside = (Observer*)inspector;
74  return outside;
75  break;
76  }
77  case TPDisplayWindow:
78  {
79  DisplayOutside* displayWindow = new DisplayOutside(params.getController(), params.getModel());
80  outside = (Observer*)displayWindow;
81  return outside;
82  break;
83  }
84 
85  case TPGridSettings:
86  {
87  GridSettingsOutside* gridSettings = new GridSettingsOutside(params.getController(), params.getModel());
88  outside = (Observer*)gridSettings;
89  return outside;
90  break;
91  }
92  case TPPageSetup:
93  {
94  PageSetupOutside* pageSetup = new PageSetupOutside(params.getController(), params.getModel());
95  outside = (Observer*)pageSetup;
96  return outside;
97  break;
98  }
99  }
100 
101  return 0;
102 }
OutsideController * getController()
LayoutAbstractObjectType
Enum TdkAbstractComponentType. This is the enumeration of the components types.
Definition: AbstractType.h:38
virtual Observer * make(LayoutAbstractObjectType type, OutsideParamsCreate params=OutsideParamsCreate())