42 #ifndef smtk_extension_qtDoubleLineEdit_h
43 #define smtk_extension_qtDoubleLineEdit_h
45 #include "smtk/extension/qt/Exports.h"
46 #include "smtk/extension/qt/qtLineEdit.h"
49 #include <QScopedPointer>
50 #include <QTextStream>
80 Q_PROPERTY(
int precision READ precision WRITE setPrecision)
81 Q_PROPERTY(
bool useGlobalPrecisionAndNotation READ useGlobalPrecisionAndNotation WRITE
82 setUseGlobalPrecisionAndNotation)
103 RealNumberNotation notation()
const;
109 int precision()
const;
116 bool useGlobalPrecisionAndNotation()
const;
124 static void setGlobalPrecisionAndNotation(
int precision, RealNumberNotation notation);
125 static int globalPrecision();
126 static RealNumberNotation globalNotation();
133 QString simplifiedText()
const;
141 formatDouble(
double value, QTextStream::RealNumberNotation notation,
int precision);
151 static QString formatDoubleUsingGlobalPrecisionAndNotation(
double value);
159 void setNotation(RealNumberNotation _notation);
165 void setPrecision(
int precision);
171 void setUseGlobalPrecisionAndNotation(
bool value);
174 void paintEvent(QPaintEvent* evt)
override;
175 void resizeEvent(QResizeEvent* event)
override;
180 static int GlobalPrecision;
181 static RealNumberNotation GlobalNotation;
184 QScopedPointer<qtInternals> Internals;