VAPOR3 3.9.4
EventRouter.h
Go to the documentation of this file.
1//************************************************************************
2// *
3// Copyright (C) 2006 *
4// University Corporation for Atmospheric Research *
5// All Rights Reserved *
6// *
7//************************************************************************/
8//
9// File: EventRouter.h
10//
11// Author: Alan Norton
12// National Center for Atmospheric Research
13// PO 3000, Boulder, Colorado
14//
15// Date: May 2006
16//
17// Description: Definition of EventRouter class
18// This (pure virtual) class manages communication between
19// gui elements, visualizers, and params.
20
21#ifndef EVENTROUTER_H
22#define EVENTROUTER_H
23#include "vapor/VAssert.h"
24#include <QObject>
25#include <QLineEdit>
26#include <QSlider>
31
32#ifdef WIN32
33 // Annoying unreferenced formal parameter warning
34 #pragma warning(disable : 4100)
35#endif
36
37class ColorbarSettings;
38
47
106//
108public:
109 EventRouter(VAPoR::ControlExec *ce, string paramsType);
110
111 virtual ~EventRouter() {}
112
117
128 virtual void hookUpTab() {}
129
135 virtual void GetWebHelp(std::vector<std::pair<string, string>> &help) const {}
136
158 virtual void updateTab();
159
165 virtual void confirmText();
166
175 void SetTextChanged(bool on)
176 {
177#ifdef VAPOR3_0_0_ALPHA
178 if (!_updatingTab) _textChangedFlag = on;
179#endif
180 }
181
191 //
192 virtual void captureMouseUp(){};
193
206 virtual void captureMouseDown(int mouseNum) {}
207
210 virtual void StartCursorMove();
211
214 virtual void EndCursorMove();
215
217 {
218 VAssert(_controlExec != NULL);
220 }
221
223 {
224 VAssert(_controlExec != NULL);
226 }
227
229
231 {
232 AnimationParams *aParams;
234 VAssert(aParams);
235
236 return (aParams->GetCurrentTimestep());
237 }
238
243 virtual string GetType() const = 0;
244
247 virtual void LoadDataNotify(string dataSetName) {}
248
249protected:
251
257 virtual void _initializeTab() {}
258
266 virtual void _updateTab() = 0;
267
277 virtual void _confirmText(){};
278
281
282protected:
284
285private:
286 // paths to params that have been initialized
287 std::vector<string> _initPaths;
288};
289#endif // EVENTROUTER_H
#define VAssert(expr)
Definition: VAssert.h:9
A class that specifies parameters used in animation.
static string GetClassType()
size_t GetCurrentTimestep() const
A pure virtual class specifying the common properties of all the parameter tabs in the VAPOR GUI.
Definition: EventRouter.h:107
virtual string GetType() const =0
AnimationParams * GetAnimationParams() const
Definition: EventRouter.h:222
virtual VAPoR::ParamsBase * GetActiveParams() const
bool _textChangedFlag
Definition: EventRouter.h:280
virtual void captureMouseUp()
Definition: EventRouter.h:192
string _paramsType
Definition: EventRouter.h:283
virtual void StartCursorMove()
virtual void _initializeTab()
Definition: EventRouter.h:257
virtual void EndCursorMove()
virtual void updateTab()
virtual void captureMouseDown(int mouseNum)
Definition: EventRouter.h:206
virtual void _confirmText()
Definition: EventRouter.h:277
virtual void LoadDataNotify(string dataSetName)
Definition: EventRouter.h:247
EventRouter(VAPoR::ControlExec *ce, string paramsType)
VAPoR::ControlExec * _controlExec
Definition: EventRouter.h:279
GUIStateParams * GetStateParams() const
Definition: EventRouter.h:216
size_t GetCurrentTimeStep() const
Definition: EventRouter.h:228
static size_t GetCurrentTimeStep(VAPoR::ControlExec *ce)
Definition: EventRouter.h:230
virtual void confirmText()
virtual ~EventRouter()
Definition: EventRouter.h:111
virtual void GetWebHelp(std::vector< std::pair< string, string > > &help) const
Definition: EventRouter.h:135
virtual void _updateTab()=0
void SetTextChanged(bool on)
Definition: EventRouter.h:175
virtual void hookUpTab()
Definition: EventRouter.h:128
static string GetClassType()
Provides API for VAPOR visualizer User Interfaces (UIs)
ParamsMgr * GetParamsMgr() const
Nodes with state in Xml tree representation.
Definition: ParamsBase.h:50
ParamsBase * GetParams(string classType)
Definition: ParamsMgr.h:371