20#ifndef RMATHCOMBOBOX_H_
21#define RMATHCOMBOBOX_H_
41Q_PROPERTY(
bool angle READ isAngle WRITE setAngle);
42Q_PROPERTY(
bool integer READ isInteger WRITE setInteger);
48 QLineEdit* le = lineEdit();
55 return getMathLineEdit()->isAngle();
58 getMathLineEdit()->setAngle(on);
62 return getMathLineEdit()->isScale();
65 getMathLineEdit()->setScale(on);
76 return getMathLineEdit()->isInteger();
79 getMathLineEdit()->setInteger(on);
85 for (
int i=0;
i<count();
i++) {
86 QString text = itemText(
i);
95 getMathLineEdit()->setValue(v, precision);
99 return getMathLineEdit()->getValue();
102 return getMathLineEdit()->getError();
105 getMathLineEdit()->clearError();
109 return getMathLineEdit()->isValid();
113 return getMathLineEdit()->isSane();
118 getMathLineEdit()->slotTextChanged(text);
122 emit valueChanged(value, error);
Q_DECLARE_METATYPE(RMath *)
int i
Copyright (c) 2011-2018 by Andrew Mustun.
Definition autostart.js:32
Copyright (c) 2011-2019 by Andrew Mustun.
Definition RMathComboBox.h:36
void slotTextChanged(const QString &text)
Definition RMathComboBox.h:117
bool isSane()
Definition RMathComboBox.h:112
bool isAngle() const
Definition RMathComboBox.h:54
void setScale(bool on, RS::Unit unit)
Definition RMathComboBox.h:64
RMathLineEdit * getMathLineEdit() const
Definition RMathComboBox.h:47
void clearError()
Definition RMathComboBox.h:104
void setInteger(bool on)
Definition RMathComboBox.h:78
bool isScale() const
Definition RMathComboBox.h:61
bool isInteger() const
Definition RMathComboBox.h:75
double getValue()
Definition RMathComboBox.h:98
QString getError()
Definition RMathComboBox.h:101
void valueChanged(double value, const QString &error)
void slotValueChanged(double value, const QString &error)
Definition RMathComboBox.h:120
void setValue(double v, int precision=6)
Definition RMathComboBox.h:82
bool isValid()
Definition RMathComboBox.h:108
void setAngle(bool on)
Definition RMathComboBox.h:57
static bool fuzzyCompare(double v1, double v2, double tolerance=RS::PointTolerance)
Definition RMath.cpp:922
static double parseScale(const QString &scaleString)
Definition RMath.cpp:943
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RMathLineEdit.h:34
Unit
Enum of supported units (values correspond to DXF spec).
Definition RS.h:425
static QStringList getScaleList(const RS::Unit unit)
Definition RSettings.cpp:1755
#define QCADGUI_EXPORT
Definition gui_global.h:10
#define NULL
Definition opennurbs_system.h:256