#include <dialogarcwithlength.h>
Public Slots | |
virtual void | ChosenObject (quint32 id, const SceneObject &type) Q_DECL_OVERRIDE |
void | DeployRadiusTextEdit () |
DeployFormulaTextEdit grow or shrink formula input. More... | |
void | DeployF1TextEdit () |
void | DeployLengthTextEdit () |
void | RadiusChanged () |
void | F1Changed () |
void | LengthChanged () |
void | FXRadius () |
void | FXF1 () |
void | FXLength () |
Public Slots inherited from DialogTool | |
virtual void | ChosenObject (quint32 id, const SceneObject &type) |
ChosenObject gets id and type of selected object. Save right data and ignore wrong. More... | |
virtual void | SelectedObject (bool selected, quint32 object, quint32 tool) |
void | NamePointChanged () |
NamePointChanged check name of point. More... | |
virtual void | DialogAccepted () |
DialogAccepted save data and emit signal about closed dialog. More... | |
virtual void | DialogApply () |
DialogApply save data and emit signal DialogApplied. More... | |
virtual void | DialogRejected () |
DialogRejected emit signal dialog rejected. More... | |
void | FormulaChanged () |
formula check formula More... | |
void | FormulaChangedPlainText () |
FormulaChangedPlainText check formula (plain text editor editor) More... | |
void | ArrowUp () |
ArrowUp set angle value 90 degree. More... | |
void | ArrowDown () |
ArrowDown set angle value 270 degree. More... | |
void | ArrowLeft () |
ArrowLeft set angle value 180 degree. More... | |
void | ArrowRight () |
ArrowRight set angle value 0 degree. More... | |
void | ArrowLeftUp () |
ArrowLeftUp set angle value 135 degree. More... | |
void | ArrowLeftDown () |
ArrowLeftDown set angle value 225 degree. More... | |
void | ArrowRightUp () |
ArrowRightUp set angle value 45 degree. More... | |
void | ArrowRightDown () |
ArrowRightDown set angle value 315 degree. More... | |
virtual void | EvalFormula () |
EvalFormula evaluate formula. More... | |
virtual void | PointNameChanged () |
Public Member Functions | |
DialogArcWithLength (const VContainer *data, const quint32 &toolId, QWidget *parent=nullptr) | |
~DialogArcWithLength () | |
VArc | getArc () const |
void | setArc (const VArc &arc) |
quint32 | GetCenter () const |
void | SetCenter (const quint32 &value) |
QString | GetRadius () const |
void | SetRadius (const QString &value) |
QString | GetF1 () const |
void | SetF1 (const QString &value) |
QString | GetLength () const |
void | SetLength (const QString &value) |
QString | getPenStyle () const |
void | setPenStyle (const QString &value) |
QString | getLineWeight () const |
getLineWeight return weight of the lines More... | |
void | setLineWeight (const QString &value) |
setLineWeight set weight of the lines More... | |
QString | getLineColor () const |
void | setLineColor (const QString &value) |
Public Member Functions inherited from DialogTool | |
DialogTool (const VContainer *data, const quint32 &toolId, QWidget *parent=nullptr) | |
DialogTool create dialog. More... | |
virtual | ~DialogTool () Q_DECL_OVERRIDE |
VAbstractTool * | GetAssociatedTool () |
void | SetAssociatedTool (VAbstractTool *tool) |
virtual void | ShowDialog (bool click) |
virtual void | Build (const Tool &type) |
virtual void | SetPiecesList (const QVector< quint32 > &list) |
quint32 | GetToolId () const |
void | SetToolId (const quint32 &value) |
QString | getPointName () const |
Protected Member Functions | |
void | pointNameChanged () |
virtual void | CheckState () Q_DECL_FINAL |
CheckState enable, when all is correct, or disable, when something wrong, button ok. More... | |
virtual void | ShowVisualization () Q_DECL_OVERRIDE |
virtual void | SaveData () Q_DECL_OVERRIDE |
SaveData Put dialog data in local variables. More... | |
virtual void | closeEvent (QCloseEvent *event) Q_DECL_OVERRIDE |
closeEvent handle when dialog cloded More... | |
Protected Member Functions inherited from DialogTool | |
virtual void | keyPressEvent (QKeyEvent *event) Q_DECL_OVERRIDE |
virtual void | showEvent (QShowEvent *event) Q_DECL_OVERRIDE |
showEvent handle when window show More... | |
void | FillComboBoxPiecesList (QComboBox *box, const QVector< quint32 > &list) |
void | FillComboBoxPoints (QComboBox *box, FillComboBox rule=FillComboBox::Whole, const quint32 &ch1=NULL_ID, const quint32 &ch2=NULL_ID) const |
FillComboBoxPoints fill comboBox list of points. More... | |
void | FillComboBoxArcs (QComboBox *box, FillComboBox rule=FillComboBox::Whole, const quint32 &ch1=NULL_ID, const quint32 &ch2=NULL_ID) const |
void | FillComboBoxSplines (QComboBox *box) const |
void | FillComboBoxSplinesPath (QComboBox *box) const |
void | FillComboBoxCurves (QComboBox *box) const |
void | FillComboBoxTypeLine (QComboBox *box, const QMap< QString, QIcon > &stylesPics) const |
FillComboBoxTypeLine fill comboBox list of type lines. More... | |
void | FillComboBoxLineColors (QComboBox *box) const |
void | FillComboBoxCrossCirclesPoints (QComboBox *box) const |
void | FillComboBoxVCrossCurvesPoint (QComboBox *box) const |
void | FillComboBoxHCrossCurvesPoint (QComboBox *box) const |
QString | GetComboBoxCurrentData (const QComboBox *box, const QString &def) const |
void | ChangeCurrentData (QComboBox *box, const QVariant &value) const |
ChangeCurrentData select item in combobox by id. More... | |
void | ValFormulaChanged (bool &flag, QLineEdit *edit, QTimer *timer, const QString &postfix=QString()) |
ValFormulaChanged handle change formula. More... | |
void | ValFormulaChanged (bool &flag, QPlainTextEdit *edit, QTimer *timer, const QString &postfix=QString()) |
qreal | Eval (const QString &text, bool &flag, QLabel *label, const QString &postfix, bool checkZero=true, bool checkLessThanZero=false) |
Eval evaluate formula and show result. More... | |
qreal | normalize (const qreal value, const qreal start, const qreal end) |
void | setCurrentPointId (QComboBox *box, const quint32 &value, FillComboBox rule=FillComboBox::NoChildren, const quint32 &ch1=NULL_ID, const quint32 &ch2=NULL_ID) const |
void | setCurrentSplineId (QComboBox *box, const quint32 &value) const |
setCurrentSplineId set current spline id in combobox More... | |
void | setCurrentArcId (QComboBox *box, const quint32 &value, FillComboBox rule=FillComboBox::NoChildren, const quint32 &ch1=NULL_ID, const quint32 &ch2=NULL_ID) const |
setCurrentArcId More... | |
void | setCurrentSplinePathId (QComboBox *box, const quint32 &value) const |
setCurrentSplinePathId set current splinePath id in combobox More... | |
void | setCurrentCurveId (QComboBox *box, const quint32 &value) const |
quint32 | getCurrentObjectId (QComboBox *box) const |
getCurrentPointId return current point id stored in combobox More... | |
template<typename T > | |
T | getCurrentCrossPoint (QComboBox *box) const |
bool | SetObject (const quint32 &id, QComboBox *box, const QString &toolTip) |
void | DeployFormula (QPlainTextEdit *formula, QPushButton *buttonGrowLength, int formulaBaseHeight) |
template<typename T > | |
void | initializeOkCancelApply (T *ui) |
initializeOkCancelApply initialize OK / Cancel and Apply buttons More... | |
template<typename T > | |
void | initializeOkCancel (T *ui) |
initializeOkCancel initialize OK and Cancel buttons More... | |
template<typename T > | |
void | initializeFormulaUi (T *ui) |
initializeFormulaUi initialize ui object for the formula field More... | |
template<typename T > | |
void | AddVisualization () |
template<typename T > | |
QVector< T > | GetListInternals (const QListWidget *list) const |
void | ChangeColor (QWidget *widget, const QColor &color) |
void | MoveCursorToEnd (QPlainTextEdit *plainTextEdit) const |
virtual bool | eventFilter (QObject *object, QEvent *event) Q_DECL_OVERRIDE |
quint32 | DNumber (const QString &baseName) const |
NodeInfo | getNodeInfo (const VPieceNode &node, bool showNotch=false) const |
void | newNodeItem (QListWidget *listWidget, const VPieceNode &node, bool nodeExcluded=true, bool isDuplicate=false) |
void | initializeNodeAngles (QComboBox *box) |
Private Member Functions | |
void | Radius () |
void | Length () |
void | EvalF () |
Private Attributes | |
Ui::DialogArcWithLength * | ui |
bool | flagRadius |
flagRadius true if value of radius is correct More... | |
bool | flagF1 |
flagF1 true if value of first angle is correct More... | |
bool | flagLength |
QTimer * | timerRadius |
timerRadius timer of check formula of radius More... | |
QTimer * | timerF1 |
timerF1 timer of check formula of first angle More... | |
QTimer * | timerLength |
QString | radius |
radius formula of radius More... | |
QString | f1 |
f1 formula of first angle More... | |
QString | length |
int | formulaBaseHeightRadius |
formulaBaseHeight base height defined by dialogui More... | |
int | formulaBaseHeightF1 |
int | formulaBaseHeightLength |
qreal | angleF1 |
VArc | m_arc |
qint32 | m_Id |
qint32 | newDuplicate |
Additional Inherited Members | |
Signals inherited from DialogTool | |
void | DialogClosed (int result) |
DialogClosed signal dialog closed. More... | |
void | DialogApplied () |
DialogApplied emit signal dialog apply changes. More... | |
void | ToolTip (const QString &toolTip) |
ToolTip emit tooltipe for tool. More... | |
Static Public Member Functions inherited from DialogTool | |
static void | moveListRowTop (QListWidget *list) |
static void | moveListRowUp (QListWidget *list) |
static void | moveListRowDown (QListWidget *list) |
static void | moveListRowBottom (QListWidget *list) |
Static Protected Member Functions inherited from DialogTool | |
static int | FindNotExcludedNodeDown (QListWidget *listWidget, int candidate) |
static int | FindNotExcludedNodeUp (QListWidget *listWidget, int candidate) |
static bool | isFirstPointSameAsLast (QListWidget *listWidget) |
static bool | doublePointsExist (QListWidget *listWidget) |
static bool | isEachPointNameUnique (QListWidget *listWidget) |
static QString | DialogWarningIcon () |
static QFont | NodeFont (bool nodeExcluded) |
Protected Attributes inherited from DialogTool | |
const VContainer * | data |
data container with data More... | |
bool | isInitialized |
isInitialized true if window is initialized More... | |
bool | flagName |
flagName true if name is correct More... | |
bool | flagFormula |
flagFormula true if formula correct More... | |
bool | flagError |
flagError use this flag if for you do not enought More... | |
QTimer * | timerFormula |
timerFormula timer for check formula More... | |
QPushButton * | ok_Button |
ok_Button button ok More... | |
QPushButton * | apply_Button |
apply_Button button apply More... | |
QDoubleSpinBox * | spinBoxAngle |
spinBoxAngle spinbox for angle More... | |
QPlainTextEdit * | plainTextEditFormula |
plainTextEditFormula formula More... | |
QLabel * | labelResultCalculation |
labelResultCalculation label with result of calculation More... | |
QLabel * | labelEditNamePoint |
labelEditNamePoint label used when need show wrong name of point More... | |
QLabel * | labelEditFormula |
labelEditFormula label used when need show wrong formula More... | |
const QColor | okColor |
const QColor | errorColor |
VAbstractTool * | associatedTool |
associatedTool vdrawtool associated with opened dialog. More... | |
quint32 | toolId |
bool | prepare |
prepare show if we prepare. Show dialog after finish working with visual part of tool More... | |
QString | pointName |
pointName name of point More... | |
qint32 | number |
number number of handled objects More... | |
QPointer< Visualization > | vis |
Definition at line 65 of file dialogarcwithlength.h.
DialogArcWithLength::DialogArcWithLength | ( | const VContainer * | data, |
const quint32 & | toolId, | ||
QWidget * | parent = nullptr |
||
) |
Definition at line 70 of file dialogarcwithlength.cpp.
References CheckState(), DialogTool::data, DeployF1TextEdit(), DeployLengthTextEdit(), DeployRadiusTextEdit(), EvalF(), F1Changed(), DialogTool::FillComboBoxPoints(), formulaBaseHeightF1, formulaBaseHeightLength, FXF1(), FXLength(), FXRadius(), VContainer::getId(), DialogTool::initializeOkCancelApply(), Length(), LengthChanged(), LineTypeNone, m_Id, DialogTool::plainTextEditFormula, pointNameChanged(), qApp, Radius(), RadiusChanged(), timerF1, timerLength, timerRadius, ui, and DialogTool::vis.
DialogArcWithLength::~DialogArcWithLength | ( | ) |
Definition at line 162 of file dialogarcwithlength.cpp.
References ui.
|
protectedvirtual |
CheckState enable, when all is correct, or disable, when something wrong, button ok.
Reimplemented from DialogTool.
Definition at line 446 of file dialogarcwithlength.cpp.
References DialogTool::apply_Button, flagF1, flagLength, flagRadius, DialogTool::ok_Button, and SCASSERT.
Referenced by DialogArcWithLength(), Length(), pointNameChanged(), and Radius().
|
virtualslot |
Definition at line 309 of file dialogarcwithlength.cpp.
References Point, DialogTool::prepare, DialogTool::SetObject(), ui, and DialogTool::vis.
|
protectedvirtual |
closeEvent handle when dialog cloded
event | event |
Reimplemented from DialogTool.
Definition at line 486 of file dialogarcwithlength.cpp.
References DialogTool::closeEvent(), and ui.
|
slot |
Definition at line 333 of file dialogarcwithlength.cpp.
References DialogTool::DeployFormula(), formulaBaseHeightF1, and ui.
Referenced by DialogArcWithLength(), and SetF1().
|
slot |
Definition at line 339 of file dialogarcwithlength.cpp.
References DialogTool::DeployFormula(), formulaBaseHeightLength, and ui.
Referenced by DialogArcWithLength(), and SetLength().
|
slot |
DeployFormulaTextEdit grow or shrink formula input.
Definition at line 327 of file dialogarcwithlength.cpp.
References DialogTool::DeployFormula(), formulaBaseHeightRadius, and ui.
Referenced by DialogArcWithLength(), and SetRadius().
|
private |
Definition at line 531 of file dialogarcwithlength.cpp.
References angleF1, degreeSymbol, DialogTool::Eval(), flagF1, DialogTool::labelEditFormula, and ui.
Referenced by DialogArcWithLength().
|
slot |
Definition at line 354 of file dialogarcwithlength.cpp.
References degreeSymbol, flagF1, DialogTool::labelEditFormula, DialogTool::labelResultCalculation, timerF1, ui, and DialogTool::ValFormulaChanged().
Referenced by DialogArcWithLength().
|
slot |
Definition at line 385 of file dialogarcwithlength.cpp.
References DialogTool::data, degreeSymbol, GetF1(), EditFormulaDialog::GetFormula(), SetF1(), EditFormulaDialog::SetFormula(), EditFormulaDialog::setPostfix(), and DialogTool::toolId.
Referenced by DialogArcWithLength().
|
slot |
Definition at line 399 of file dialogarcwithlength.cpp.
References DialogTool::data, EditFormulaDialog::GetFormula(), GetLength(), qApp, EditFormulaDialog::SetFormula(), SetLength(), EditFormulaDialog::setPostfix(), DialogTool::toolId, and UnitsToStr().
Referenced by DialogArcWithLength().
|
slot |
Definition at line 371 of file dialogarcwithlength.cpp.
References DialogTool::data, EditFormulaDialog::GetFormula(), GetRadius(), qApp, EditFormulaDialog::SetFormula(), EditFormulaDialog::setPostfix(), SetRadius(), DialogTool::toolId, and UnitsToStr().
Referenced by DialogArcWithLength().
VArc DialogArcWithLength::getArc | ( | ) | const |
Definition at line 168 of file dialogarcwithlength.cpp.
References m_arc.
quint32 DialogArcWithLength::GetCenter | ( | ) | const |
Definition at line 181 of file dialogarcwithlength.cpp.
References DialogTool::getCurrentObjectId(), and ui.
Referenced by SaveData().
QString DialogArcWithLength::GetF1 | ( | ) | const |
Definition at line 218 of file dialogarcwithlength.cpp.
Referenced by FXF1(), and pointNameChanged().
QString DialogArcWithLength::GetLength | ( | ) | const |
Definition at line 241 of file dialogarcwithlength.cpp.
Referenced by FXLength(), and pointNameChanged().
QString DialogArcWithLength::getLineColor | ( | ) | const |
Definition at line 297 of file dialogarcwithlength.cpp.
References ColorBlack, DialogTool::GetComboBoxCurrentData(), and ui.
QString DialogArcWithLength::getLineWeight | ( | ) | const |
getLineWeight return weight of the lines
Definition at line 281 of file dialogarcwithlength.cpp.
References DialogTool::GetComboBoxCurrentData(), and ui.
QString DialogArcWithLength::getPenStyle | ( | ) | const |
Definition at line 265 of file dialogarcwithlength.cpp.
References DialogTool::GetComboBoxCurrentData(), LineTypeSolidLine, and ui.
QString DialogArcWithLength::GetRadius | ( | ) | const |
Definition at line 194 of file dialogarcwithlength.cpp.
Referenced by FXRadius(), and pointNameChanged().
|
private |
Definition at line 513 of file dialogarcwithlength.cpp.
References DialogTool::ChangeColor(), CheckState(), DialogTool::Eval(), flagLength, DialogTool::labelEditFormula, length, qApp, ui, and UnitsToStr().
Referenced by DialogArcWithLength().
|
slot |
Definition at line 362 of file dialogarcwithlength.cpp.
References flagLength, DialogTool::labelEditFormula, DialogTool::labelResultCalculation, qApp, timerLength, ui, UnitsToStr(), and DialogTool::ValFormulaChanged().
Referenced by DialogArcWithLength().
|
protected |
Definition at line 413 of file dialogarcwithlength.cpp.
References DialogTool::ChangeColor(), CheckState(), DialogTool::data, DialogTool::DNumber(), DialogTool::flagError, VContainer::GeometricObject(), VAbstractArc::GetCenter(), DialogTool::getCurrentObjectId(), GetF1(), GetLength(), GetRadius(), VGObject::id(), VContainer::IsUnique(), m_arc, m_Id, VGObject::name(), newDuplicate, DialogTool::okColor, qApp, VAbstractCurve::SetDuplicate(), and ui.
Referenced by DialogArcWithLength().
|
private |
Definition at line 495 of file dialogarcwithlength.cpp.
References DialogTool::ChangeColor(), CheckState(), DialogTool::Eval(), flagRadius, DialogTool::labelEditFormula, qApp, radius, ui, and UnitsToStr().
Referenced by DialogArcWithLength().
|
slot |
Definition at line 345 of file dialogarcwithlength.cpp.
References flagRadius, DialogTool::labelEditFormula, DialogTool::labelResultCalculation, qApp, timerRadius, ui, UnitsToStr(), and DialogTool::ValFormulaChanged().
Referenced by DialogArcWithLength().
|
protectedvirtual |
SaveData Put dialog data in local variables.
Reimplemented from DialogTool.
Definition at line 464 of file dialogarcwithlength.cpp.
References f1, GetCenter(), length, radius, VisToolArcWithLength::RefreshGeometry(), SCASSERT, VisToolArcWithLength::setF1(), VisToolArcWithLength::setLength(), Visualization::setObject1Id(), VisToolArcWithLength::setRadius(), ui, and DialogTool::vis.
void DialogArcWithLength::setArc | ( | const VArc & | arc | ) |
Definition at line 174 of file dialogarcwithlength.cpp.
References m_arc, VGObject::name(), qApp, and ui.
void DialogArcWithLength::SetCenter | ( | const quint32 & | value | ) |
Definition at line 187 of file dialogarcwithlength.cpp.
References DialogTool::ChangeCurrentData(), ui, and DialogTool::vis.
void DialogArcWithLength::SetF1 | ( | const QString & | value | ) |
Definition at line 223 of file dialogarcwithlength.cpp.
References DeployF1TextEdit(), f1, DialogTool::MoveCursorToEnd(), qApp, SCASSERT, VisToolArcWithLength::setF1(), ui, and DialogTool::vis.
Referenced by FXF1().
void DialogArcWithLength::SetLength | ( | const QString & | value | ) |
Definition at line 247 of file dialogarcwithlength.cpp.
References DeployLengthTextEdit(), length, DialogTool::MoveCursorToEnd(), qApp, radius, SCASSERT, VisToolArcWithLength::setLength(), ui, and DialogTool::vis.
Referenced by FXLength().
void DialogArcWithLength::setLineColor | ( | const QString & | value | ) |
Definition at line 303 of file dialogarcwithlength.cpp.
References DialogTool::ChangeCurrentData(), and ui.
void DialogArcWithLength::setLineWeight | ( | const QString & | value | ) |
setLineWeight set weight of the lines
value | type |
Definition at line 291 of file dialogarcwithlength.cpp.
References DialogTool::ChangeCurrentData(), and ui.
void DialogArcWithLength::setPenStyle | ( | const QString & | value | ) |
Definition at line 271 of file dialogarcwithlength.cpp.
References DialogTool::ChangeCurrentData(), and ui.
void DialogArcWithLength::SetRadius | ( | const QString & | value | ) |
Definition at line 200 of file dialogarcwithlength.cpp.
References DeployRadiusTextEdit(), DialogTool::MoveCursorToEnd(), qApp, radius, SCASSERT, VisToolArcWithLength::setRadius(), ui, and DialogTool::vis.
Referenced by FXRadius().
|
protectedvirtual |
Reimplemented from DialogTool.
Definition at line 458 of file dialogarcwithlength.cpp.
|
private |
Definition at line 157 of file dialogarcwithlength.h.
Referenced by EvalF().
|
private |
f1 formula of first angle
Definition at line 148 of file dialogarcwithlength.h.
Referenced by GetF1(), SaveData(), and SetF1().
|
private |
flagF1 true if value of first angle is correct
Definition at line 132 of file dialogarcwithlength.h.
Referenced by CheckState(), EvalF(), and F1Changed().
|
private |
Definition at line 134 of file dialogarcwithlength.h.
Referenced by CheckState(), Length(), and LengthChanged().
|
private |
flagRadius true if value of radius is correct
Definition at line 129 of file dialogarcwithlength.h.
Referenced by CheckState(), Radius(), and RadiusChanged().
|
private |
Definition at line 154 of file dialogarcwithlength.h.
Referenced by DeployF1TextEdit(), and DialogArcWithLength().
|
private |
Definition at line 155 of file dialogarcwithlength.h.
Referenced by DeployLengthTextEdit(), and DialogArcWithLength().
|
private |
formulaBaseHeight base height defined by dialogui
Definition at line 153 of file dialogarcwithlength.h.
Referenced by DeployRadiusTextEdit().
|
private |
Definition at line 150 of file dialogarcwithlength.h.
Referenced by GetLength(), Length(), SaveData(), and SetLength().
|
private |
Definition at line 158 of file dialogarcwithlength.h.
Referenced by getArc(), pointNameChanged(), and setArc().
|
private |
Definition at line 159 of file dialogarcwithlength.h.
Referenced by DialogArcWithLength(), and pointNameChanged().
|
private |
Definition at line 160 of file dialogarcwithlength.h.
Referenced by pointNameChanged().
|
private |
radius formula of radius
Definition at line 145 of file dialogarcwithlength.h.
Referenced by GetRadius(), Radius(), SaveData(), SetLength(), and SetRadius().
|
private |
timerF1 timer of check formula of first angle
Definition at line 140 of file dialogarcwithlength.h.
Referenced by DialogArcWithLength(), and F1Changed().
|
private |
Definition at line 142 of file dialogarcwithlength.h.
Referenced by DialogArcWithLength(), and LengthChanged().
|
private |
timerRadius timer of check formula of radius
Definition at line 137 of file dialogarcwithlength.h.
Referenced by DialogArcWithLength(), and RadiusChanged().
|
private |
Definition at line 126 of file dialogarcwithlength.h.
Referenced by ChosenObject(), closeEvent(), DeployF1TextEdit(), DeployLengthTextEdit(), DeployRadiusTextEdit(), DialogArcWithLength(), EvalF(), F1Changed(), GetCenter(), getLineColor(), getLineWeight(), getPenStyle(), Length(), LengthChanged(), pointNameChanged(), Radius(), RadiusChanged(), SaveData(), setArc(), SetCenter(), SetF1(), SetLength(), setLineColor(), setLineWeight(), setPenStyle(), SetRadius(), and ~DialogArcWithLength().