The HistoryDialog class show dialog history. More...
#include <history_dialog.h>
Public Slots | |
| virtual void | DialogAccepted () Q_DECL_OVERRIDE |
| DialogAccepted save data and emit signal about closed dialog. More... | |
| virtual void | DialogApply () Q_DECL_OVERRIDE |
| DialogApply apply data and emit signal about applied dialog. More... | |
| void | cellClicked (int row, int column) |
| cellClicked changed history record More... | |
| void | changedCursor (quint32 id) |
| changedCursor changed cursor of input. Cursor show after which record we will insert new object More... | |
| void | updateHistory () |
| updateHistory update history table More... | |
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 () |
Signals | |
| void | showHistoryTool (quint32 id, bool enable) |
| showHistoryTool signal change color of selected in records tool More... | |
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... | |
Public Member Functions | |
| HistoryDialog (VContainer *data, VPattern *doc, QWidget *parent=nullptr) | |
| HistoryDialog create dialog. More... | |
| virtual | ~HistoryDialog () Q_DECL_OVERRIDE |
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 | |
| virtual void | closeEvent (QCloseEvent *event) Q_DECL_OVERRIDE |
| closeEvent handle when windows is closing More... | |
| virtual void | changeEvent (QEvent *event) Q_DECL_OVERRIDE |
| virtual bool | eventFilter (QObject *object, QEvent *event) Q_DECL_OVERRIDE |
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) |
| virtual void | ShowVisualization () |
| virtual void | SaveData () |
| SaveData Put dialog data in local variables. More... | |
| void | MoveCursorToEnd (QPlainTextEdit *plainTextEdit) const |
| 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 | fillTable () |
| cursorToolRecordRow save number of row selected record More... | |
| RowData | record (const VToolRecord &tool) |
| Record return description for record. More... | |
| void | initializeTable () |
| initializeTable set initial option of table More... | |
| void | showTool () |
| showTool show selected point More... | |
| QString | getPointName (quint32 pointId) |
| HistoryDialog::PointName return point name by id. More... | |
| quint32 | attrUInt (const QDomElement &domElement, const QString &name) |
| void | retranslateUi () |
| int | cursorRow () const |
| void | findText (const QString &text) |
| void | copyToClipboard () |
| copyToClipboard copy dialog selection to clipboard as comma separated values. More... | |
Private Attributes | |
| Ui::HistoryDialog * | ui |
| VPattern * | m_doc |
| ui keeps information about user interface More... | |
| qint32 | m_cursorRow |
| doc dom document container More... | |
| qint32 | m_cursorToolRecordRow |
| cursorRow save number of row where is cursor More... | |
Additional Inherited Members | |
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 HistoryDialog class show dialog history.
Definition at line 78 of file history_dialog.h.
| HistoryDialog::HistoryDialog | ( | VContainer * | data, |
| VPattern * | doc, | ||
| QWidget * | parent = nullptr |
||
| ) |
HistoryDialog create dialog.
| data | container with data |
| doc | dom document container |
| parent | parent widget |
Definition at line 82 of file history_dialog.cpp.
References cellClicked(), changedCursor(), VAbstractPattern::ChangedCursor(), copyToClipboard(), DialogAccepted(), fillTable(), findText(), initializeTable(), m_doc, DialogTool::ok_Button, VAbstractPattern::patternChanged(), qApp, showHistoryTool(), showTool(), VAbstractPattern::ShowTool(), ui, and updateHistory().
|
virtual |
Definition at line 116 of file history_dialog.cpp.
References ui.
|
private |
Definition at line 660 of file history_dialog.cpp.
References VDomDocument::GetParametrUInt(), and m_doc.
|
slot |
cellClicked changed history record
| row | number row in table |
| column | number column in table |
Definition at line 139 of file history_dialog.cpp.
References m_cursorRow, m_cursorToolRecordRow, m_doc, VAbstractPattern::setCursor(), showHistoryTool(), and ui.
Referenced by HistoryDialog(), and retranslateUi().
|
slot |
changedCursor changed cursor of input. Cursor show after which record we will insert new object
| id | id of object |
Definition at line 172 of file history_dialog.cpp.
References m_cursorRow, and ui.
Referenced by HistoryDialog().
|
protectedvirtual |
Definition at line 679 of file history_dialog.cpp.
References retranslateUi(), and ui.
|
protectedvirtual |
closeEvent handle when windows is closing
| event | event |
Reimplemented from DialogTool.
Definition at line 670 of file history_dialog.cpp.
References DialogTool::closeEvent(), m_cursorToolRecordRow, showHistoryTool(), and ui.
|
private |
copyToClipboard copy dialog selection to clipboard as comma separated values.
Definition at line 777 of file history_dialog.cpp.
References ui.
Referenced by HistoryDialog().
|
private |
Definition at line 737 of file history_dialog.cpp.
References VAbstractPattern::getCursor(), m_doc, and ui.
Referenced by fillTable().
|
virtualslot |
DialogAccepted save data and emit signal about closed dialog.
Definition at line 125 of file history_dialog.cpp.
References DialogTool::DialogClosed(), m_cursorToolRecordRow, showHistoryTool(), and ui.
Referenced by HistoryDialog().
|
inlinevirtualslot |
DialogApply apply data and emit signal about applied dialog.
TODO ISSUE 79 : create real function
Definition at line 90 of file history_dialog.h.
|
protectedvirtual |
Reimplemented from DialogTool.
Definition at line 693 of file history_dialog.cpp.
References DialogTool::eventFilter(), and qApp.
|
private |
cursorToolRecordRow save number of row selected record
fillTable fill table
Definition at line 202 of file history_dialog.cpp.
References cursorRow(), VAbstractPattern::getBlockHistory(), RowData::icon, RowData::id, m_cursorRow, m_doc, RowData::name, record(), SCASSERT, RowData::tool, and ui.
Referenced by HistoryDialog(), and updateHistory().
|
private |
Definition at line 757 of file history_dialog.cpp.
References ui, and updateHistory().
Referenced by HistoryDialog().
|
private |
HistoryDialog::PointName return point name by id.
Refacoring what hide ugly string getting point name by id.
| pointId | point if in data. |
Definition at line 654 of file history_dialog.cpp.
References DialogTool::data, and VContainer::GeometricObject().
|
private |
initializeTable set initial option of table
Definition at line 618 of file history_dialog.cpp.
References ui.
Referenced by HistoryDialog(), and updateHistory().
|
private |
Record return description for record.
| tool | record data |
Definition at line 265 of file history_dialog.cpp.
References AbstractSpline, AlongLine, AnchorPoint, Arc, ArcIntersectAxis, ArcWithLength, Arrow, AttrArc, AttrAxisP1, AttrAxisP2, AttrBasePoint, AttrCenter, AttrDartP1, AttrDartP2, AttrFirstPoint, AttrP1Line, AttrP1Line1, AttrP1Line2, AttrP2Line, AttrP2Line1, AttrP2Line2, AttrSecondPoint, VToolCutSpline::AttrSpline, VToolCutSplinePath::AttrSplinePath, AttrSuffix, AttrThirdPoint, BasePoint, Bisector, CubicBezier, CubicBezierPath, CurveIntersectAxis, Cut, CutArc, CutSpline, CutSplinePath, DoublePoint, EllipticalArc, EndLine, VExceptionBadId::ErrorMessage(), Group, Height, RowData::icon, RowData::id, InsertNodes, InternalPath, LAST_ONE_DO_NOT_USE, Line, LineIntersect, LineIntersectAxis, LinePoint, Midpoint, MirrorByAxis, MirrorByLine, Move, RowData::name, NodeArc, NodeElArc, NodePoint, NodeSpline, NodeSplinePath, Normal, Piece, PointFromArcAndTangent, PointFromCircleAndTangent, PointOfContact, PointOfIntersection, PointOfIntersectionArcs, PointOfIntersectionCircles, PointOfIntersectionCurves, Rotation, SCASSERT, ShoulderPoint, SinglePoint, Spline, SplinePath, splPath, RowData::tool, Triangle, TrueDarts, and Union.
Referenced by fillTable().
|
private |
Definition at line 723 of file history_dialog.cpp.
References cellClicked(), m_cursorRow, SCASSERT, ui, and updateHistory().
Referenced by changeEvent().
|
signal |
showHistoryTool signal change color of selected in records tool
| id | id of tool |
| enable | true enable selection, false disable selection |
Referenced by cellClicked(), closeEvent(), DialogAccepted(), HistoryDialog(), and showTool().
|
private |
showTool show selected point
Definition at line 632 of file history_dialog.cpp.
References VAbstractPattern::getHistory(), m_cursorToolRecordRow, m_doc, showHistoryTool(), and ui.
Referenced by HistoryDialog().
|
slot |
updateHistory update history table
Definition at line 192 of file history_dialog.cpp.
References fillTable(), and initializeTable().
Referenced by findText(), HistoryDialog(), and retranslateUi().
|
private |
doc dom document container
Definition at line 113 of file history_dialog.h.
Referenced by cellClicked(), changedCursor(), fillTable(), and retranslateUi().
|
private |
cursorRow save number of row where is cursor
Definition at line 114 of file history_dialog.h.
Referenced by cellClicked(), closeEvent(), DialogAccepted(), and showTool().
|
private |
ui keeps information about user interface
Definition at line 112 of file history_dialog.h.
Referenced by attrUInt(), cellClicked(), cursorRow(), fillTable(), HistoryDialog(), and showTool().
|
private |
Definition at line 111 of file history_dialog.h.
Referenced by cellClicked(), changedCursor(), changeEvent(), closeEvent(), copyToClipboard(), cursorRow(), DialogAccepted(), fillTable(), findText(), HistoryDialog(), initializeTable(), retranslateUi(), showTool(), and ~HistoryDialog().