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