VAPoR  3.0.0
renderholder.h
Go to the documentation of this file.
1 #ifndef RENDERHOLDER_H
2 #define RENDERHOLDER_H
3 
4 #include <qobject.h>
5 #include "qstackedwidget.h"
6 #include "qpushbutton.h"
7 #include "qtableview.h"
8 #include "params.h"
9 #include "eventrouter.h"
10 #include <vapor/MyBase.h>
11 #include "renderselector.h"
12 #include "tabmanager.h"
13 
14 using namespace VetsUtil;
15 QT_USE_NAMESPACE
16 
17 namespace VAPoR {
24 
27 class RenderHolder : public QWidget, public Ui_RenderSelector {
28 
29  Q_OBJECT
30 
31 public:
32 
33  RenderHolder(QWidget* parent);
34 
35  virtual ~RenderHolder() {}
37  if (!_renderHolder) _renderHolder = new RenderHolder(0);
38  return _renderHolder;
39  }
40 
42  void updateTableWidget();
43 
46  static void setCurrentIndex(int indx){
47  _stackedWidget->setCurrentIndex(indx);
48  }
49 
55  static int addWidget(QWidget*, const char* name, string tag);
56 
57 #ifndef DOXYGEN_SKIP_THIS
58 private:
59  static void rebuildCombo();
60  //Convert name to a unique name (among renderer names)
61  static std::string uniqueName(std::string name);
62 
63 private slots:
64  void newRenderer();
65  void deleteRenderer();
66  void changeChecked(int i, int j);
67  void itemTextChange(QTableWidgetItem*);
68  void selectInstance();
69  void copyInstanceTo(int viznum);
70 
71 private:
72 
73  static RenderHolder* _renderHolder;
74  //remember the visualizer indices in the dupCombo
75  static vector<int> _vizDupNums;
76  //Boolean indicates whether will respond to signals
77  bool _signalsOn;
78  static QStackedWidget* _stackedWidget;
79 #endif //DOXYGEN_SKIP_THIS
80  };
81 
82 };
83 
84 #endif //RENDERHOLDER_H
85 
86 
87 
virtual ~RenderHolder()
Definition: renderholder.h:35
A class that manages the display of Renderer parameters.
Definition: renderholder.h:27
static void setCurrentIndex(int indx)
Definition: renderholder.h:46
Definition: DC.h:10
static RenderHolder * getInstance()
Definition: renderholder.h:36