The DialogEndLine class dialog for ToolEndLine. Help create point and edit option. More...
#include <dialogendline.h>
Public Slots | |
virtual void | ChosenObject (quint32 id, const SceneObject &type) Q_DECL_OVERRIDE |
ChoosedObject gets id and type of selected object. Save right data and ignore wrong. More... | |
void | DeployFormulaTextEdit () |
DeployFormulaTextEdit grow or shrink formula input. More... | |
void | FormulaTextChanged () |
FormulaTextChanged when formula text changes for validation and calc. More... | |
void | EvalAngle () |
EvalAngle calculate value of angle. More... | |
void | AngleTextChanged () |
void | DeployAngleTextEdit () |
void | FXAngle () |
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 | |
DialogEndLine (const VContainer *data, const quint32 &toolId, QWidget *parent=nullptr) | |
DialogEndLine create dialog. More... | |
virtual | ~DialogEndLine () Q_DECL_OVERRIDE |
void | SetPointName (const QString &value) |
SetPointName set name of point. More... | |
QString | getLineColor () const |
getLineColor get the color of line More... | |
void | setLineColor (const QString &value) |
setLineColor set color of the line More... | |
QString | getLineType () const |
getLineType return type of line More... | |
void | setLineType (const QString &value) |
setLineType set type of line More... | |
QString | getLineWeight () const |
getLineWeight return weight of the lines More... | |
void | setLineWeight (const QString &value) |
setLineWeight set weight of the lines More... | |
QString | GetFormula () const |
GetFormula return string of formula. More... | |
void | SetFormula (const QString &value) |
SetFormula set string of formula. More... | |
QString | GetAngle () const |
GetAngle return formula angle of line. More... | |
void | SetAngle (const QString &value) |
SetAngle set angle of line. More... | |
quint32 | GetBasePointId () const |
GetBasePointId return id base point of line. More... | |
void | SetBasePointId (const quint32 &value) |
SetBasePointId set id base point of line. More... | |
virtual void | ShowDialog (bool click) Q_DECL_OVERRIDE |
DialogEndLine::ShowDialog show dialog after finish working with visual part. More... | |
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 | 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 |
virtual void | CheckState () |
CheckState enable, when all is correct, or disable, when something wrong, button ok. More... | |
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 Attributes | |
Ui::DialogEndLine * | ui |
ui keeps information about user interface More... | |
QString | formulaLength |
formula formula More... | |
QString | formulaAngle |
angle angle of line More... | |
int | formulaBaseHeight |
formulaBaseHeight base height defined by dialogui More... | |
int | formulaBaseHeightAngle |
bool | m_firstRelease |
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 |
The DialogEndLine class dialog for ToolEndLine. Help create point and edit option.
Definition at line 72 of file dialogendline.h.
DialogEndLine::DialogEndLine | ( | const VContainer * | data, |
const quint32 & | toolId, | ||
QWidget * | parent = nullptr |
||
) |
DialogEndLine create dialog.
data | container with data |
parent | parent widget |
Definition at line 87 of file dialogendline.cpp.
References AngleTextChanged(), DialogTool::CheckState(), DialogTool::data, DeployAngleTextEdit(), DeployFormulaTextEdit(), EvalAngle(), DialogTool::FillComboBoxPoints(), DialogTool::flagFormula, formulaBaseHeight, formulaBaseHeightAngle, FormulaTextChanged(), FXAngle(), FXLength(), DialogTool::initializeFormulaUi(), DialogTool::initializeOkCancelApply(), DialogTool::labelEditNamePoint, DialogTool::NamePointChanged(), NewLabel, qApp, DialogTool::timerFormula, ui, and DialogTool::vis.
|
virtual |
Definition at line 445 of file dialogendline.cpp.
References ui.
|
slot |
Definition at line 169 of file dialogendline.cpp.
References degreeSymbol, DialogTool::flagError, DialogTool::labelEditFormula, DialogTool::timerFormula, ui, and DialogTool::ValFormulaChanged().
Referenced by DialogEndLine().
|
virtualslot |
ChoosedObject gets id and type of selected object. Save right data and ignore wrong.
id | id of point or detail |
type | type of object |
Definition at line 222 of file dialogendline.cpp.
References Point, DialogTool::prepare, qApp, SCASSERT, DialogTool::SetObject(), VAbstractMainWindow::ShowToolTip(), Visualization::ToolTip(), ui, and DialogTool::vis.
|
protectedvirtual |
closeEvent handle when dialog cloded
event | event |
Reimplemented from DialogTool.
Definition at line 437 of file dialogendline.cpp.
References DialogTool::closeEvent(), and ui.
|
slot |
Definition at line 183 of file dialogendline.cpp.
References DialogTool::DeployFormula(), formulaBaseHeightAngle, and ui.
Referenced by DialogEndLine(), and SetAngle().
|
slot |
DeployFormulaTextEdit grow or shrink formula input.
Definition at line 177 of file dialogendline.cpp.
References DialogTool::DeployFormula(), formulaBaseHeight, and ui.
Referenced by DialogEndLine(), and SetFormula().
|
slot |
EvalAngle calculate value of angle.
Definition at line 155 of file dialogendline.cpp.
References degreeSymbol, DialogTool::Eval(), DialogTool::flagError, DialogTool::labelEditFormula, and ui.
Referenced by DialogEndLine().
|
slot |
FormulaTextChanged when formula text changes for validation and calc.
Definition at line 163 of file dialogendline.cpp.
References DialogTool::FormulaChangedPlainText().
Referenced by DialogEndLine().
|
slot |
Definition at line 189 of file dialogendline.cpp.
References DialogTool::data, degreeSymbol, GetAngle(), EditFormulaDialog::GetFormula(), SetAngle(), EditFormulaDialog::SetFormula(), EditFormulaDialog::setPostfix(), and DialogTool::toolId.
Referenced by DialogEndLine().
|
slot |
Definition at line 203 of file dialogendline.cpp.
References DialogTool::data, EditFormulaDialog::GetFormula(), GetFormula(), qApp, EditFormulaDialog::SetFormula(), SetFormula(), EditFormulaDialog::setPostfix(), DialogTool::toolId, and UnitsToStr().
Referenced by DialogEndLine().
QString DialogEndLine::GetAngle | ( | ) | const |
GetAngle return formula angle of line.
Definition at line 475 of file dialogendline.cpp.
References formulaAngle, and qApp.
Referenced by FXAngle().
quint32 DialogEndLine::GetBasePointId | ( | ) | const |
GetBasePointId return id base point of line.
Definition at line 485 of file dialogendline.cpp.
References DialogTool::getCurrentObjectId(), and ui.
Referenced by SaveData(), and ShowDialog().
QString DialogEndLine::GetFormula | ( | ) | const |
GetFormula return string of formula.
Definition at line 465 of file dialogendline.cpp.
References formulaLength, and qApp.
Referenced by FXLength().
QString DialogEndLine::getLineColor | ( | ) | const |
getLineColor get the color of line
value | type |
Definition at line 349 of file dialogendline.cpp.
References ColorBlack, DialogTool::GetComboBoxCurrentData(), and ui.
QString DialogEndLine::getLineType | ( | ) | const |
getLineType return type of line
Definition at line 455 of file dialogendline.cpp.
References DialogTool::GetComboBoxCurrentData(), LineTypeSolidLine, and ui.
Referenced by SaveData().
QString DialogEndLine::getLineWeight | ( | ) | const |
getLineWeight return weight of the lines
Definition at line 267 of file dialogendline.cpp.
References DialogTool::GetComboBoxCurrentData(), and ui.
Referenced by SaveData().
|
protectedvirtual |
SaveData Put dialog data in local variables.
Reimplemented from DialogTool.
Definition at line 415 of file dialogendline.cpp.
References formulaAngle, formulaLength, GetBasePointId(), getLineType(), getLineWeight(), lineTypeToPenStyle(), DialogTool::pointName, VisToolEndLine::RefreshGeometry(), SCASSERT, VisToolEndLine::SetAngle(), VisToolEndLine::setLength(), Visualization::setLineStyle(), Visualization::setLineWeight(), Visualization::setObject1Id(), ui, and DialogTool::vis.
void DialogEndLine::SetAngle | ( | const QString & | value | ) |
SetAngle set angle of line.
value | angle in degree |
Definition at line 311 of file dialogendline.cpp.
References DeployAngleTextEdit(), formulaAngle, DialogTool::MoveCursorToEnd(), qApp, SCASSERT, VisToolEndLine::SetAngle(), ui, and DialogTool::vis.
Referenced by FXAngle(), and ShowDialog().
void DialogEndLine::SetBasePointId | ( | const quint32 & | value | ) |
SetBasePointId set id base point of line.
value | id |
Definition at line 334 of file dialogendline.cpp.
References SCASSERT, DialogTool::setCurrentPointId(), Visualization::setObject1Id(), ui, and DialogTool::vis.
void DialogEndLine::SetFormula | ( | const QString & | value | ) |
SetFormula set string of formula.
value | formula |
Definition at line 288 of file dialogendline.cpp.
References DeployFormulaTextEdit(), formulaLength, DialogTool::MoveCursorToEnd(), qApp, SCASSERT, VisToolEndLine::setLength(), ui, and DialogTool::vis.
Referenced by FXLength(), and ShowDialog().
void DialogEndLine::setLineColor | ( | const QString & | value | ) |
setLineColor set color of the line
value | type |
Definition at line 359 of file dialogendline.cpp.
References DialogTool::ChangeCurrentData(), and ui.
void DialogEndLine::setLineType | ( | const QString & | value | ) |
setLineType set type of line
value | type |
Definition at line 256 of file dialogendline.cpp.
References DialogTool::ChangeCurrentData(), lineTypeToPenStyle(), ui, and DialogTool::vis.
void DialogEndLine::setLineWeight | ( | const QString & | value | ) |
setLineWeight set weight of the lines
value | type |
Definition at line 277 of file dialogendline.cpp.
References DialogTool::ChangeCurrentData(), ui, and DialogTool::vis.
void DialogEndLine::SetPointName | ( | const QString & | value | ) |
SetPointName set name of point.
value | name |
Definition at line 245 of file dialogendline.cpp.
References DialogTool::pointName, and ui.
|
virtual |
DialogEndLine::ShowDialog show dialog after finish working with visual part.
click | true if need show dialog after click mouse |
Reimplemented from DialogTool.
Definition at line 369 of file dialogendline.cpp.
References VisToolEndLine::Angle(), DialogTool::data, defPointRadiusPixel, VContainer::GeometricObject(), GetBasePointId(), VMainGraphicsScene::getScenePos(), VisToolEndLine::Length(), m_firstRelease, DialogTool::prepare, qApp, SCASSERT, SetAngle(), SetFormula(), DialogTool::timerFormula, DialogTool::ToolTip(), and DialogTool::vis.
|
protectedvirtual |
Reimplemented from DialogTool.
Definition at line 409 of file dialogendline.cpp.
|
private |
angle angle of line
Definition at line 135 of file dialogendline.h.
Referenced by GetAngle(), SaveData(), and SetAngle().
|
private |
formulaBaseHeight base height defined by dialogui
Definition at line 138 of file dialogendline.h.
Referenced by DeployFormulaTextEdit(), and DialogEndLine().
|
private |
Definition at line 139 of file dialogendline.h.
Referenced by DeployAngleTextEdit(), and DialogEndLine().
|
private |
formula formula
Definition at line 132 of file dialogendline.h.
Referenced by GetFormula(), SaveData(), and SetFormula().
|
private |
Definition at line 141 of file dialogendline.h.
Referenced by ShowDialog().
|
private |
ui keeps information about user interface
Definition at line 129 of file dialogendline.h.
Referenced by AngleTextChanged(), ChosenObject(), closeEvent(), DeployAngleTextEdit(), DeployFormulaTextEdit(), DialogEndLine(), EvalAngle(), GetBasePointId(), getLineColor(), getLineType(), getLineWeight(), SaveData(), SetAngle(), SetBasePointId(), SetFormula(), setLineColor(), setLineType(), setLineWeight(), SetPointName(), and ~DialogEndLine().