VAPOR3 3.9.4
VDoubleSliderEdit.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include "VHBoxWidget.h"
6
7class QMenu;
10
17
19 Q_OBJECT
20
21public:
22 VDoubleSliderEdit(double min = 0, double max = 10, double value = 3, bool rangeChangable = false);
23
25 void SetMinimum(double min);
26
28 void SetMaximum(double max);
29
30 void AllowUserRange(bool allowed = true);
31 void AllowDynamicUpdate() const;
32
34 double GetValue() const;
35
37 double GetMinimum() const;
38
40 double GetMaximum() const;
41
43 virtual int GetNumDigits() const;
44
46 virtual bool GetSciNotation() const;
47
48public slots:
50 void SetValue(double value);
51
53 virtual void SetNumDigits(int numDigits);
54
56 virtual void SetSciNotation(bool sciNotation);
57
59 virtual void SetDynamicUpdate(bool enabled);
60
62 virtual void ShowContextMenu(const QPoint &pos);
63
64protected:
65 virtual void _makeContextMenu();
66 void _sliderChanged(double value);
67 void _sliderChangedIntermediate(double value);
68
69 double _value;
71
74
75signals:
76 void ValueChanged(double value);
77 void ValueChangedIntermediate(double value);
78 void MinimumChanged(double min);
79 void MaximumChanged(double max);
80 void DynamicUpdateChanged(bool enabled);
81};
A wrapper for a QLineEdit that handles user input of type double, and provides Vapor's standard sette...
A menu for VDoubleSliderEdit that allows for setting a min/max range, numeric formatting controls,...
A wrapper for a VSlider and a VDoubleLineEdit, that provides synchronization between the two widgets,...
virtual void SetDynamicUpdate(bool enabled)
Set the dynamic update menu item's toggle state.
void MinimumChanged(double min)
virtual void SetNumDigits(int numDigits)
Set the number of digits displayed by the VDoubleLineEdit.
void AllowUserRange(bool allowed=true)
double GetMinimum() const
Get the minimum allowable value for the VSlider and VDoubleLineEdit.
VDoubleSliderEditMenu * _menu
void SetMinimum(double min)
Set the minimum allowable value for the VSlider and VDoubleLineEdit.
void ValueChanged(double value)
double GetMaximum() const
Get the maximum allowable value for the VSlider and VDoubleLineEdit.
void SetValue(double value)
Set the current value displayed by the slider and line edit.
void SetMaximum(double max)
Set the maximum allowable value for the VSlider and VDoubleLineEdit.
virtual void SetSciNotation(bool sciNotation)
Set whether the VDoubleLineEdit is being displayed with scientific notation.
void _sliderChanged(double value)
void AllowDynamicUpdate() const
Retrieve whether dynamic updates are toggled.
virtual void _makeContextMenu()
void ValueChangedIntermediate(double value)
virtual int GetNumDigits() const
Get the number of digits displayed by the VDoubleLineEdit.
void _sliderChangedIntermediate(double value)
void DynamicUpdateChanged(bool enabled)
double GetValue() const
Get the value associated with the VSlider and VDoubleLineEdit.
void MaximumChanged(double max)
virtual void ShowContextMenu(const QPoint &pos)
Show the context menu options for the entire widget, triggered on right-click.
virtual bool GetSciNotation() const
Get whether the VDoubleLineEdit is being displayed with scientific notation.
VDoubleLineEdit * _lineEdit
VDoubleSliderEdit(double min=0, double max=10, double value=3, bool rangeChangable=false)
An interface class that needs to be reimplemented to support the synchronization of a VSlider and a n...