VAPOR3 3.9.4
RendererList.h
Go to the documentation of this file.
1#pragma once
2
3#include "VContainer.h"
4#include <QListWidget>
5
6namespace VAPoR{
7class ControlExec;
8class RenderParams;
9}
10using namespace VAPoR;
11using std::string;
12class DisableDatasetClickEventFilter;
14class VHGroup;
15class QToolButton;
16
17class RendererList : public VContainer {
18 Q_OBJECT
19 QListWidget *_lw;
20 QToolButton *_deleteToolButton;
21 ControlExec *_ce;
23
24 struct RendererMetadata {
25 bool supports2D, supports3D, supportsParticle;
26 string description;
27 string iconPath;
28 string imagePath;
29 };
30 static bool AllowInspectDataset;
31 static std::map<string, RendererMetadata> _rendererMetadata;
32 static const int DatasetType = QListWidgetItem::UserType;
33 static const int RendererType = QListWidgetItem::UserType+1;
34
35 class RendererItem : public QListWidgetItem {
36 public:
37 const std::string Id;
38 const std::string Class;
39 const std::string Dataset;
40 RendererItem(const std::string &instName, const std::string &className, const std::string &datasetName)
41 : QListWidgetItem(nullptr, RendererType), Id(instName), Class(className), Dataset(datasetName) {}
42 };
43 class DatasetItem : public QListWidgetItem {
44 public:
45 const std::string Id;
46 DatasetItem(const std::string &name)
47 : QListWidgetItem(nullptr, DatasetType), Id(name) {}
48 };
49
50public:
52 void Update();
53 string getCurrentViz();
54 string getClassName(string instName);
55 void currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous);
56 void inspectRenderer(RendererItem *item);
57 void inspectDataset(DatasetItem *item);
58 void showContextMenu(const QPoint& localPos);
59 void deleteRenderer(string id);
60 static std::vector<string> getHintVariables(RenderParams *rp);
61 void renameRenderer(string inst);
62
63protected:
65 void resizeEvent(QResizeEvent *event);
66
68};
69
70
71
72
void showContextMenu(const QPoint &localPos)
friend class DisableDatasetClickEventFilter
Definition: RendererList.h:67
void resizeEvent(QResizeEvent *event)
string getClassName(string instName)
void deleteRenderer(string id)
void inspectRenderer(RendererItem *item)
void currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous)
RendererList(ControlExec *ce)
void inspectDataset(DatasetItem *item)
VHGroup * _toolbar
Definition: RendererList.h:64
void renameRenderer(string inst)
static std::vector< string > getHintVariables(RenderParams *rp)
string getCurrentViz()
Provides API for VAPOR visualizer User Interfaces (UIs)
A Params subclass for managing parameters used by Renderers.
Definition: RenderParams.h:43
Definition: VGroup.h:21