VAPOR3 3.9.4
VNumericLineEdit.h
Go to the documentation of this file.
1#pragma once
2
3#include <QLineEdit>
4
5#include "vapor/VAssert.h"
6
7#include "VHBoxWidget.h"
8#include "VStringLineEdit.h"
9
11class VCheckBoxAction;
12class VSpinBoxAction;
13
20
22 Q_OBJECT
23
24protected:
25 explicit VNumericLineEdit(int decimals = 5);
26
27public:
29 int GetNumDigits() const;
30
32 void SetNumDigits(int digits);
33
35 bool GetSciNotation() const;
36
38 void SetSciNotation(bool sciNotation);
39
40protected slots:
41
44 virtual void _valueChanged() = 0;
45
47 virtual void _showMenu(const QPoint &pos);
48
49protected:
51
54
55signals:
56
57 // Required to propogate changes from the menus
58 // up to Params, via PWidgets
59 void DecimalDigitsChanged(int decimalDigits);
60 void SciNotationChanged(bool sciNotation);
61};
A menu item represented by a VLabel and VCheckBox, wrapped in a VLineItem.
Definition: VActions.h:64
A menu that allows users to specify how a number is displayed in a line edit, in regard to how many d...
VNumericLineEdit(int decimals=5)
void SciNotationChanged(bool sciNotation)
void DecimalDigitsChanged(int decimalDigits)
void SetSciNotation(bool sciNotation)
If the line edit is numeric, set whether the display is in scientific notation.
VNumericFormatMenu * _menu
void SetNumDigits(int digits)
If the line edit is numeric, set the number of digits of the number being displayed.
bool GetSciNotation() const
If the line edit is numeric, get whether the display is in scientific notation.
virtual void _showMenu(const QPoint &pos)
Show a custom context menu.
virtual void _valueChanged()=0
int GetNumDigits() const
If the line edit is numeric, get the number of digits of the number being displayed.
A menu item represented by a VLabel and VSpinBox, wrapped in a VLineItem selection tab in any rendere...
Definition: VActions.h:33
A wrapper for a QLineEdit that handles user input of type string, and provides Vapor's standard sette...