4 #ifndef pqDoubleLineEdit_h
5 #define pqDoubleLineEdit_h
8 #include <QScopedPointer>
13 #include "pqWidgetsModule.h"
42 Q_PROPERTY(
int precision READ precision WRITE setPrecision)
43 Q_PROPERTY(
bool useGlobalPrecisionAndNotation READ useGlobalPrecisionAndNotation WRITE
44 setUseGlobalPrecisionAndNotation)
66 RealNumberNotation notation()
const;
72 int precision()
const;
79 bool useGlobalPrecisionAndNotation()
const;
87 static void setGlobalPrecisionAndNotation(
int precision, RealNumberNotation notation);
88 static int globalPrecision();
89 static RealNumberNotation globalNotation();
96 QString simplifiedText()
const;
106 "Use `pqDoubleLineEdit::formatDouble(double,pqDoubleLineEdit::RealNumberNotation,int)` instead")
107 static QString formatDouble(
119 int precision,
int fullLowExponent = -6,
int fullHighExponent = 20);
126 static QString formatDoubleUsingGlobalPrecisionAndNotation(
double value);
139 void setPrecision(
int precision);
145 void setUseGlobalPrecisionAndNotation(
bool value);
152 void setAlwaysUseFullPrecision(
bool value);
155 void paintEvent(QPaintEvent* evt) override;
156 void resizeEvent(QResizeEvent* event) override;
161 static
int GlobalPrecision;
165 QScopedPointer<pqInternals> Internals;