VAPOR3 3.9.4
PTFEditor.h
Go to the documentation of this file.
1#pragma once
2
3#include "PWidget.h"
4#include <set>
5
6class TFMap;
7class TFColorMap;
8class TFOpacityMap;
10class TFIsoValueMap;
11class TFMapWidget;
12class TFColorWidget;
13class TFOpacityWidget;
16
20
21template<typename T> class PTFMapWidget : public PWidget {
22 TFMapWidget *_tfWidget;
23
24public:
25 PTFMapWidget(const std::string &tag);
26
27protected:
28 virtual void updateGUI() const override;
29 virtual bool requireParamsMgr() const override { return true; }
30 virtual bool requireDataMgr() const override { return true; }
31};
32
37
38class VSection;
42class PStringDisplay;
43
47
48class PTFEditor : public PWidget {
49 Q_OBJECT;
50
51 VSection * _section;
52 TFMapGroupWidget * _maps;
53 TFMapInfoGroupWidget * _mapsInfo;
54 TFHistogramMap * _histogram;
55 TFOpacityMap * _opacityMap;
56 TFColorMap * _colorMap;
57 TFIsoValueMap * _isoMap;
59
60 std::vector<QAction *> _colorMapActions;
61 std::vector<QAction *> _opacityMapActions;
62 std::vector<QAction *> _histogramActions;
63
64 bool _showOpacityBasedOnParam = false;
65 std::string _showOpacityBasedOnParamTag;
66 int _showOpacityBasedOnParamValue;
67 bool _showColormapBasedOnParam = false;
68 std::string _showColormapBasedOnParamTag;
69 bool _showColormapBasedOnParamValue;
70
71public:
73
75 PTFEditor(const std::string &tag, const std::set<Element> elements = {Default}, const std::string &label = "Transfer Function");
78 PTFEditor *ShowOpacityBasedOnParam(const std::string &tag, int value);
81 PTFEditor *ShowColormapBasedOnParam(const std::string &tag, int value);
82
83protected:
84 void updateGUI() const override;
85};
86
88public:
90};
PTFMapWidget< TFOpacityWidget > PTFOpacityWidget
Definition: PTFEditor.h:34
PTFMapWidget< TFHistogramWidget > PTFHistogramWidget
Definition: PTFEditor.h:35
PTFMapWidget< TFIsoValueWidget > PTFIsoValueWidget
Definition: PTFEditor.h:36
PTFMapWidget< TFColorWidget > PTFColorWidget
Definition: PTFEditor.h:33
@ RegularIsoArray
Definition: PTFEditor.h:72
@ IsoValues
Definition: PTFEditor.h:72
@ Histogram
Definition: PTFEditor.h:72
@ Colormap
Definition: PTFEditor.h:72
PTFEditor * ShowOpacityBasedOnParam(const std::string &tag, int value)
PTFEditor * ShowColormapBasedOnParam(const std::string &tag, int value)
void updateGUI() const override
PTFEditor(const std::string &tag, const std::set< Element > elements={Default}, const std::string &label="Transfer Function")
PTFMapWidget(const std::string &tag)
virtual bool requireParamsMgr() const override
Definition: PTFEditor.h:29
virtual bool requireDataMgr() const override
Definition: PTFEditor.h:30
virtual void updateGUI() const override