VAPoR  3.0.0
helloeventrouter.h
Go to the documentation of this file.
1 #ifndef HELLOEVENTROUTER_H
2 #define HELLOEVENTROUTER_H
3 
4 
5 #include <qobject.h>
6 #include "params.h"
7 #include "helloparams.h"
8 #include "eventrouter.h"
9 #include <vapor/MyBase.h>
10 
11 #include "tabmanager.h"
12 #include "helloAppearance.h"
13 #include "helloLayout.h"
14 #include "variablesWidget.h"
15 
16 
17 using namespace VetsUtil;
18 QT_USE_NAMESPACE
19 
20 namespace VAPoR {
21 
22 
23 class XmlNode;
24 class ParamNode;
25 class Params;
26 
37 
38 class HelloEventRouter : public QTabWidget, public EventRouter {
39 
40  Q_OBJECT
41 
42 public:
43 
44  HelloEventRouter(QWidget* parent);
45  virtual ~HelloEventRouter();
46 
49  //The TabManager is the parent of all EventRouters:
50  TabManager* tMgr = TabManager::getInstance();
51  QWidget* parent = tMgr->getSubTabWidget(0);
52  return (EventRouter*)(new HelloEventRouter(parent));
53  }
56  virtual void hookUpTab();
57 
58 
59 
60 protected slots:
61 
64  void setHelloTextChanged(const QString& qs);
65 
68  void helloReturnPressed();
69 
72  void selectColor();
73 
74 protected:
77  virtual void _confirmText(Params* p);
78 
80  virtual void _updateTab(Params* p);
81 
84  virtual void _reinitTab(bool doOverride);
85 private:
86  //Internal classes for sub-widgets:
89  class HelloAppearanceGUI : public QWidget, public Ui_helloAppearance {
90  public:
91  HelloAppearanceGUI(QWidget* parent): QWidget(parent), Ui_helloAppearance(){
92  //This GUI is a Qt Designer Widget, so call setupUi() to convert the
93  //Ui_helloAppearance object into a Widget.
94  setupUi(this);
95  }
96  };
99  class HelloLayoutGUI : public QWidget, public Ui_helloLayout {
100  public:
101  HelloLayoutGUI(QWidget* parent): QWidget(parent), Ui_helloLayout(){
102  //This GUI is a Qt Designer Widget, so call setupUi() to convert the
103  //Ui_helloAppearance object into a Widget.
104  setupUi(this);
105  }
106  };
107 
112  virtual void wheelEvent(QWheelEvent*) {}
113 
115  VariablesWidget *_variables;
116 
118  HelloAppearanceGUI * _appearance;
119 
121  HelloLayoutGUI * _layout;
122 
124  static const char* _webHelpText[];
125 
127  static const char* _webHelpURL[];
128 
129  };
130 
131 };
132 
133 #endif //HELLOEVENTROUTER_H
134 
135 
136 
A pure virtual class for managing parameters used in visualization.
Definition: params.h:129
A pure virtual class specifying the common properties of all the parameter tabs in the VAPOR GUI...
Definition: eventrouter.h:101
static EventRouter * CreateTab()
Static (required) Create method, just invokes constructor.
QWidget * getSubTabWidget(int widType)
Definition: tabmanager.h:78
Definition: DC.h:10
An EventRouter subclass that handles the Hello tab in the GUI.
A class that manages the contents of the parameter tabs in VAPOR GUI.
Definition: tabmanager.h:60