#include <dialogmove.h>
Public Slots | |
| virtual void | ChosenObject (quint32 id, const SceneObject &type) Q_DECL_OVERRIDE |
| virtual void | SelectedObject (bool selected, quint32 id, quint32 tool) Q_DECL_OVERRIDE |
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 | |
| DialogMove (const VContainer *data, quint32 toolId, QWidget *parent=nullptr) | |
| virtual | ~DialogMove () |
| QString | GetAngle () const |
| void | SetAngle (const QString &value) |
| QString | GetLength () const |
| void | SetLength (const QString &value) |
| QString | getRotation () const |
| void | setRotation (const QString &value) |
| QString | getSuffix () const |
| void | setSuffix (const QString &value) |
| quint32 | getOriginPointId () const |
| void | setOriginPointId (const quint32 &value) |
| virtual void | ShowDialog (bool click) Q_DECL_OVERRIDE |
| QVector< SourceItem > | getSourceObjects () const |
| void | setSourceObjects (const QVector< SourceItem > &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 | 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 | |
| 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 Slots | |
| void | angleChanged () |
| void | lengthChanged () |
| void | rotationChanged () |
| void | editAngleFormula () |
| void | editLengthFormula () |
| void | editRotationFormula () |
| void | suffixChanged () |
| void | originChanged (const QString &text) |
Private Member Functions | |
| void | evaluateAngle () |
| void | evaluateLength () |
| void | evaluateRotation () |
Private Attributes | |
| Ui::DialogMove * | ui |
| bool | angleFlag |
| QString | angleFormula |
| angleFlag true if value of angle is correct */ More... | |
| QTimer * | angleTimer |
| angle formula of angle */ More... | |
| bool | lengthFlag |
| angleTimer timer of check formula of angle */ More... | |
| QString | lengthFormula |
| lengthFlag true if value of length is correct */ More... | |
| QTimer * | lengthTimer |
| length formula of length */ More... | |
| bool | rotationFlag |
| lengthTimer timer of check formula of length */ More... | |
| QString | rotationFormula |
| rotationFlag true if value of length is correct */ More... | |
| QTimer * | rotationTimer |
| rotationFormula of rotation */ More... | |
| QVector< SourceItem > | m_objects |
| rotationTimer timer of check formula of rotation */ More... | |
| bool | stage1 |
| bool | stage2 |
| QString | m_suffix |
| bool | useOriginPoint |
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 72 of file dialogmove.h.
|
explicit |
Definition at line 90 of file dialogmove.cpp.
References angleChanged(), angleTimer, CheckState(), DialogTool::data, editAngleFormula(), editLengthFormula(), editRotationFormula(), evaluateAngle(), evaluateLength(), evaluateRotation(), DialogTool::FillComboBoxPoints(), DialogTool::flagName, DialogTool::initializeOkCancelApply(), lengthChanged(), lengthTimer, NULL_ID, originChanged(), qApp, rotationChanged(), rotationTimer, setOriginPointId(), suffixChanged(), ui, and DialogTool::vis.
|
virtual |
Definition at line 153 of file dialogmove.cpp.
References ui.
|
privateslot |
Definition at line 377 of file dialogmove.cpp.
References angleFlag, angleTimer, degreeSymbol, DialogTool::labelEditFormula, DialogTool::labelResultCalculation, ui, and DialogTool::ValFormulaChanged().
Referenced by DialogMove().
|
protectedvirtual |
CheckState enable, when all is correct, or disable, when something wrong, button ok.
Reimplemented from DialogTool.
Definition at line 501 of file dialogmove.cpp.
References angleFlag, DialogTool::apply_Button, DialogTool::flagName, lengthFlag, DialogTool::ok_Button, rotationFlag, and SCASSERT.
Referenced by DialogMove(), and suffixChanged().
|
virtualslot |
Definition at line 329 of file dialogmove.cpp.
References Point, DialogTool::prepare, VisToolMove::RefreshGeometry(), SCASSERT, DialogTool::SetObject(), VisToolMove::setOriginPointId(), stage1, stage2, ui, useOriginPoint, and DialogTool::vis.
|
protectedvirtual |
closeEvent handle when dialog cloded
| event | event |
Reimplemented from DialogTool.
Definition at line 541 of file dialogmove.cpp.
References DialogTool::closeEvent(), and ui.
|
privateslot |
Definition at line 401 of file dialogmove.cpp.
References DialogTool::data, degreeSymbol, GetAngle(), EditFormulaDialog::GetFormula(), SetAngle(), EditFormulaDialog::SetFormula(), EditFormulaDialog::setPostfix(), and DialogTool::toolId.
Referenced by DialogMove().
|
privateslot |
Definition at line 415 of file dialogmove.cpp.
References DialogTool::data, EditFormulaDialog::GetFormula(), GetLength(), qApp, EditFormulaDialog::SetFormula(), SetLength(), EditFormulaDialog::setPostfix(), DialogTool::toolId, and UnitsToStr().
Referenced by DialogMove().
|
privateslot |
Definition at line 429 of file dialogmove.cpp.
References DialogTool::data, degreeSymbol, EditFormulaDialog::GetFormula(), getRotation(), EditFormulaDialog::SetFormula(), EditFormulaDialog::setPostfix(), setRotation(), and DialogTool::toolId.
Referenced by DialogMove().
|
private |
Definition at line 566 of file dialogmove.cpp.
References angleFlag, degreeSymbol, DialogTool::Eval(), DialogTool::labelEditFormula, and ui.
Referenced by DialogMove().
|
private |
Definition at line 573 of file dialogmove.cpp.
References DialogTool::Eval(), DialogTool::labelEditFormula, lengthFlag, qApp, ui, and UnitsToStr().
Referenced by DialogMove().
|
private |
Definition at line 581 of file dialogmove.cpp.
References degreeSymbol, DialogTool::Eval(), DialogTool::labelEditFormula, rotationFlag, and ui.
Referenced by DialogMove().
| QString DialogMove::GetAngle | ( | ) | const |
Definition at line 159 of file dialogmove.cpp.
References angleFormula, and qApp.
Referenced by editAngleFormula().
| QString DialogMove::GetLength | ( | ) | const |
Definition at line 178 of file dialogmove.cpp.
References lengthFormula, and qApp.
Referenced by editLengthFormula().
| quint32 DialogMove::getOriginPointId | ( | ) | const |
Definition at line 229 of file dialogmove.cpp.
References DialogTool::getCurrentObjectId(), and ui.
Referenced by SaveData().
| QString DialogMove::getRotation | ( | ) | const |
Definition at line 197 of file dialogmove.cpp.
References qApp, and rotationFormula.
Referenced by editRotationFormula().
| QVector< SourceItem > DialogMove::getSourceObjects | ( | ) | const |
Definition at line 550 of file dialogmove.cpp.
References m_objects.
| QString DialogMove::getSuffix | ( | ) | const |
Definition at line 216 of file dialogmove.cpp.
References m_suffix.
|
privateslot |
Definition at line 385 of file dialogmove.cpp.
References degreeSymbol, DialogTool::labelEditFormula, DialogTool::labelResultCalculation, lengthFlag, lengthTimer, ui, and DialogTool::ValFormulaChanged().
Referenced by DialogMove().
|
privateslot |
Definition at line 483 of file dialogmove.cpp.
References DialogTool::getCurrentObjectId(), NULL_ID, VisToolMove::RefreshGeometry(), SCASSERT, VisToolMove::setOriginPointId(), ui, useOriginPoint, and DialogTool::vis.
Referenced by DialogMove().
|
privateslot |
Definition at line 393 of file dialogmove.cpp.
References degreeSymbol, DialogTool::labelEditFormula, DialogTool::labelResultCalculation, rotationFlag, rotationTimer, ui, and DialogTool::ValFormulaChanged().
Referenced by DialogMove().
|
protectedvirtual |
SaveData Put dialog data in local variables.
Reimplemented from DialogTool.
Definition at line 516 of file dialogmove.cpp.
References angleFormula, getOriginPointId(), lengthFormula, m_objects, m_suffix, VisToolMove::RefreshGeometry(), rotationFormula, SCASSERT, VisToolMove::SetAngle(), VisToolMove::SetLength(), VisOperation::setObjects(), VisToolMove::setOriginPointId(), VisToolMove::setRotation(), sourceToObjects(), ui, and DialogTool::vis.
|
virtualslot |
Definition at line 349 of file dialogmove.cpp.
References SourceItem::id, m_objects, and stage1.
| void DialogMove::SetAngle | ( | const QString & | value | ) |
Definition at line 165 of file dialogmove.cpp.
References angleFormula, DialogTool::MoveCursorToEnd(), qApp, SCASSERT, VisToolMove::SetAngle(), ui, and DialogTool::vis.
Referenced by editAngleFormula(), and ShowDialog().
| void DialogMove::SetLength | ( | const QString & | value | ) |
Definition at line 184 of file dialogmove.cpp.
References lengthFormula, DialogTool::MoveCursorToEnd(), qApp, SCASSERT, VisToolMove::SetLength(), ui, and DialogTool::vis.
Referenced by editLengthFormula(), and ShowDialog().
| void DialogMove::setOriginPointId | ( | const quint32 & | value | ) |
Definition at line 235 of file dialogmove.cpp.
References DialogTool::ChangeCurrentData(), SCASSERT, VisToolMove::setOriginPointId(), ui, and DialogTool::vis.
Referenced by DialogMove().
| void DialogMove::setRotation | ( | const QString & | value | ) |
Definition at line 203 of file dialogmove.cpp.
References DialogTool::MoveCursorToEnd(), qApp, rotationFormula, SCASSERT, VisToolMove::setRotation(), ui, and DialogTool::vis.
Referenced by editRotationFormula(), and ShowDialog().
| void DialogMove::setSourceObjects | ( | const QVector< SourceItem > & | value | ) |
Definition at line 556 of file dialogmove.cpp.
References m_objects, SCASSERT, VisOperation::setObjects(), sourceToObjects(), and DialogTool::vis.
| void DialogMove::setSuffix | ( | const QString & | value | ) |
Definition at line 222 of file dialogmove.cpp.
|
virtual |
Reimplemented from DialogTool.
Definition at line 244 of file dialogmove.cpp.
References VisToolMove::Angle(), angleFormula, angleTimer, Visualization::CurrentToolTip(), VisToolMove::Length(), lengthFormula, lengthTimer, VisToolMove::LengthValue(), m_objects, NULL_ID, DialogTool::prepare, qApp, VisToolMove::RefreshGeometry(), VisToolMove::Rotation(), rotationTimer, SCASSERT, VisToolMove::SetAngle(), SetAngle(), VisToolMove::SetLength(), SetLength(), DialogTool::SetObject(), VisOperation::setObjects(), VisToolMove::setOriginPointId(), setRotation(), VAbstractMainWindow::ShowToolTip(), sourceToObjects(), stage1, stage2, VMainGraphicsScene::ToggleArcHover(), VMainGraphicsScene::ToggleArcSelection(), VMainGraphicsScene::ToggleElArcHover(), VMainGraphicsScene::ToggleElArcSelection(), VMainGraphicsScene::ToggleSplineHover(), VMainGraphicsScene::ToggleSplinePathHover(), VMainGraphicsScene::ToggleSplinePathSelection(), VMainGraphicsScene::ToggleSplineSelection(), DialogTool::ToolTip(), Visualization::ToolTip(), ui, useOriginPoint, DialogTool::vis, and VisOperation::VisualMode().
|
protectedvirtual |
Reimplemented from DialogTool.
Definition at line 510 of file dialogmove.cpp.
|
privateslot |
Definition at line 443 of file dialogmove.cpp.
References VContainer::AllUniqueNames(), DialogTool::ChangeColor(), CheckState(), DialogTool::data, DialogTool::flagName, VContainer::IsUnique(), m_suffix, NameRegExp(), DialogTool::okColor, and ui.
Referenced by DialogMove().
|
private |
Definition at line 127 of file dialogmove.h.
Referenced by angleChanged(), CheckState(), and evaluateAngle().
|
private |
angleFlag true if value of angle is correct */
Definition at line 128 of file dialogmove.h.
Referenced by GetAngle(), SaveData(), SetAngle(), and ShowDialog().
|
private |
angle formula of angle */
Definition at line 129 of file dialogmove.h.
Referenced by angleChanged(), DialogMove(), and ShowDialog().
|
private |
angleTimer timer of check formula of angle */
Definition at line 130 of file dialogmove.h.
Referenced by CheckState(), evaluateLength(), and lengthChanged().
|
private |
lengthFlag true if value of length is correct */
Definition at line 131 of file dialogmove.h.
Referenced by GetLength(), SaveData(), SetLength(), and ShowDialog().
|
private |
length formula of length */
Definition at line 132 of file dialogmove.h.
Referenced by DialogMove(), lengthChanged(), and ShowDialog().
|
private |
rotationTimer timer of check formula of rotation */
Definition at line 136 of file dialogmove.h.
Referenced by getSourceObjects(), SaveData(), SelectedObject(), setSourceObjects(), and ShowDialog().
|
private |
Definition at line 139 of file dialogmove.h.
Referenced by getSuffix(), SaveData(), setSuffix(), and suffixChanged().
|
private |
lengthTimer timer of check formula of length */
Definition at line 133 of file dialogmove.h.
Referenced by CheckState(), evaluateRotation(), and rotationChanged().
|
private |
rotationFlag true if value of length is correct */
Definition at line 134 of file dialogmove.h.
Referenced by getRotation(), SaveData(), and setRotation().
|
private |
rotationFormula of rotation */
Definition at line 135 of file dialogmove.h.
Referenced by DialogMove(), rotationChanged(), and ShowDialog().
|
private |
Definition at line 137 of file dialogmove.h.
Referenced by ChosenObject(), SelectedObject(), and ShowDialog().
|
private |
Definition at line 138 of file dialogmove.h.
Referenced by ChosenObject(), and ShowDialog().
|
private |
Definition at line 126 of file dialogmove.h.
Referenced by angleChanged(), ChosenObject(), closeEvent(), DialogMove(), evaluateAngle(), evaluateLength(), evaluateRotation(), getOriginPointId(), lengthChanged(), originChanged(), rotationChanged(), SaveData(), SetAngle(), SetLength(), setOriginPointId(), setRotation(), setSuffix(), ShowDialog(), suffixChanged(), and ~DialogMove().
|
private |
Definition at line 140 of file dialogmove.h.
Referenced by ChosenObject(), originChanged(), and ShowDialog().