VAPOR3 3.9.4
TFHistogramWidget.h
Go to the documentation of this file.
1#pragma once
2
3#include <QWidget>
4#include <QFrame>
5#include <vapor/VAssert.h>
6#include <vapor/Histo.h>
7#include "TFMapWidget.h"
8
10
11class TFHistogramMap : public TFMap {
12 Q_OBJECT
13
14 enum ScalingType { Linear = 0, Logarithmic, Boolean, ScalingTypeCount };
15
16public:
17 TFHistogramMap(const std::string &variableNameTag, TFMapWidget *parent = nullptr);
18
19 QSize minimumSizeHint() const;
20 void LostFocus() {}
21 void PopulateSettingsMenu(QMenu *menu) const;
22
23protected:
26 void paintEvent(QPainter &p);
27 void mousePressEvent(QMouseEvent *event);
28 void mouseReleaseEvent(QMouseEvent *event);
29 void mouseMoveEvent(QMouseEvent *event);
30 // void mouseDoubleClickEvent(QMouseEvent *event);
31
32private:
33 Histo _histo;
34 ParamsDropdownMenuItem *_scalingMenu;
35 bool _dynamicScaling = true;
36
37 ScalingType _getScalingType() const;
38
39private slots:
40 void _menuDynamicScalingToggled(bool on);
41
42signals:
44 void UpdateInfo(float value);
45};
46
48 Q_OBJECT
49public:
50 TFHistogramWidget(const std::string &variableNameTag) : TFMapWidget(new TFHistogramMap(variableNameTag, this)) {}
51};
Definition: Histo.h:31
void mousePressEvent(QMouseEvent *event)
void paramsUpdate()
void UpdateInfo(float value)
void mouseMoveEvent(QMouseEvent *event)
void InfoDeselected()
void paintEvent(QPainter &p)
These map to the QWidget counterparts.
TFHistogramMap(const std::string &variableNameTag, TFMapWidget *parent=nullptr)
void PopulateSettingsMenu(QMenu *menu) const
QSize minimumSizeHint() const
TFInfoWidget * createInfoWidget()
void mouseReleaseEvent(QMouseEvent *event)
TFHistogramWidget(const std::string &variableNameTag)