VAPOR3 3.9.4
FidelityWidget.h
Go to the documentation of this file.
1#ifndef FIDELITYWIDGET_H
2#define FIDELITYWIDGET_H
3
4#include <QObject>
5#include "vapor/MyBase.h"
6#include "ui_FidelityWidgetGUI.h"
7#include "Flags.h"
8
9QT_USE_NAMESPACE
10
11namespace VAPoR {
12class RenderParams;
13class ParamsMgr;
14class DataMgr;
15} // namespace VAPoR
16
18
27
28class FidelityWidget : public QWidget, public Ui_FidelityWidgetGUI {
29 Q_OBJECT
30
31public:
32 FidelityWidget(QWidget *parent);
33
34 void Reinit(VariableFlags variableFlags) { _variableFlags = variableFlags; }
35
36 virtual void Update(const VAPoR::DataMgr *dataMgr, VAPoR::ParamsMgr *paramsMgr, VAPoR::RenderParams *rParams);
37
38 QButtonGroup * GetFidelityButtons();
39 std::vector<int> GetFidelityLodIdx() const;
40
41 std::string GetCurrentLodString() const;
42 std::string GetCurrentMultiresString() const;
43
44protected slots:
46 void setNumRefinements(int num);
47
49 void setCompRatio(int num);
50
52 void setFidelity(int buttonID);
53
57
58private:
59 VariableFlags _variableFlags;
60 const VAPoR::DataMgr *_dataMgr;
61 VAPoR::ParamsMgr * _paramsMgr;
62 VAPoR::RenderParams * _rParams;
63
64 // Get the compression rates as a fraction for both the LOD and
65 // Refinment parameters. Also format these factors into a displayable
66 // string
67 //
68 void getCmpFactors(string varname, vector<float> &lodCF, vector<string> &lodStr, vector<float> &multiresCF, vector<string> &multiresStr) const;
69
70 void uncheckFidelity();
71
72 void setupFidelity(VAPoR::RenderParams *dParams);
73
74 QButtonGroup *_fidelityButtons;
75
76 // Support for fidelity settings
77 //
78 std::vector<int> _fidelityLodIdx;
79 std::vector<int> _fidelityMultiresIdx;
80 std::vector<string> _fidelityLodStrs;
81 std::vector<string> _fidelityMultiresStrs;
82 std::string _currentLodStr;
83 std::string _currentMultiresStr;
84};
85
86#endif // FIDELITYWIDGET_H
VariableFlags
Definition: Flags.h:14
A Widget that can be reused to provide fidelity selection in any renderer EventRouter class.
virtual void Update(const VAPoR::DataMgr *dataMgr, VAPoR::ParamsMgr *paramsMgr, VAPoR::RenderParams *rParams)
void setCompRatio(int num)
Connected to the compression ratio selector, setting the lod index.
void SetFidelityDefault()
void setNumRefinements(int num)
Connected to the image file text editor.
std::string GetCurrentLodString() const
std::vector< int > GetFidelityLodIdx() const
std::string GetCurrentMultiresString() const
QButtonGroup * GetFidelityButtons()
FidelityWidget(QWidget *parent)
void setFidelity(int buttonID)
Connected to the fidelity button selector, setting the fidelity index.
void Reinit(VariableFlags variableFlags)
A pure virtual class specifying the common properties of all the renderer parameter tabs in the VAPOR...
A cache based data reader.
Definition: DataMgr.h:110
A singleton class for managing Params instances.
Definition: ParamsMgr.h:53
A Params subclass for managing parameters used by Renderers.
Definition: RenderParams.h:43