Seamly2D
Code documentation
mainwindow.h
Go to the documentation of this file.
1 /******************************************************************************
2  * @file mainwindow.h
3  ** @author Douglas S Caskey
4  ** @date 29 Mar, 2023
5  **
6  ** @brief
7  ** @copyright
8  ** This source code is part of the Seamly2D project, a pattern making
9  ** program to create and model patterns of clothing.
10  ** Copyright (C) 2017-2023 Seamly2D project
11  ** <https://github.com/fashionfreedom/seamly2d> All Rights Reserved.
12  **
13  ** Seamly2D is free software: you can redistribute it and/or modify
14  ** You should have received a copy of the GNU General Public License
15  ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
16  **
17  *****************************************************************************/
18 
19 /************************************************************************
20  **
21  ** @file mainwindow.h
22  ** @author Roman Telezhynskyi <dismine(at)gmail.com>
23  ** @date November 15, 2013
24  **
25  ** @brief
26  ** @copyright
27  ** This source code is part of the Valentina project, a pattern making
28  ** program, whose allow create and modeling patterns of clothing.
29  ** Copyright (C) 2013 Valentina project
30  ** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
31  **
32  ** Valentina is free software: you can redistribute it and/or modify
33  ** it under the terms of the GNU General Public License as published by
34  ** the Free Software Foundation, either version 3 of the License, or
35  ** (at your option) any later version.
36  **
37  ** Valentina is distributed in the hope that it will be useful,
38  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
39  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40  ** GNU General Public License for more details.
41  **
42  ** You should have received a copy of the GNU General Public License
43  ** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
44  **
45  *************************************************************************/
46 
47 #ifndef MAINWINDOW_H
48 #define MAINWINDOW_H
49 
50 #include "mainwindowsnogui.h"
51 #include "core/vcmdexport.h"
52 #include "../vmisc/vlockguard.h"
53 
54 #include <QPointer>
55 
56 namespace Ui
57 {
58  class MainWindow;
59 }
60 
62 class VMeasurements;
63 class QFileSystemWatcher;
64 class QLabel;
65 class DialogVariables;
66 class DialogTool;
67 class HistoryDialog;
68 class CalculatorDialog;
69 class DecimalChartDialog;
70 class ShowInfoDialog;
71 class ShortcutsDialog;
72 class GroupsWidget;
73 class PiecesWidget;
74 class DraftToolBox;
75 class PieceToolBox;
76 class LayoutToolBox;
77 class QToolButton;
78 class QDoubleSpinBox;
79 class QFontComboBox;
80 class MouseCoordinates;
81 class PenToolBar;
82 
83 /**
84  * @brief The MainWindow class main windows.
85  */
87 {
88  Q_OBJECT
89 public:
90  explicit MainWindow(QWidget *parent = nullptr);
91  virtual ~MainWindow() Q_DECL_OVERRIDE;
92 
93  bool LoadPattern(const QString &fileName, const QString &customMeasureFile = QString());
94 
95 public slots:
96  void ProcessCMD();
97  void penChanged(Pen pen);
98 
99  virtual void ShowToolTip(const QString &toolTip) Q_DECL_OVERRIDE;
100  virtual void updateGroups() Q_DECL_OVERRIDE;
101  virtual void zoomToSelected() Q_DECL_OVERRIDE;
102  void showAllGroups();
103  void hideAllGroups();
104  void lockAllGroups();
105  void unlockAllGroups();
106  void addGroupToList();
107  void deleteGroupFromList();
108  void editGroup();
110 
111 signals:
113  void EnableItemMove(bool move);
114  void ItemsSelection(SelectionType type) const;
115 
116  void EnableLabelSelection(bool enable) const;
117  void EnablePointSelection(bool enable) const;
118  void EnableLineSelection(bool enable) const;
119  void EnableArcSelection(bool enable) const;
120  void EnableElArcSelection(bool enable) const;
121  void EnableSplineSelection(bool enable) const;
122  void EnableSplinePathSelection(bool enable) const;
123  void EnableNodeLabelSelection(bool enable) const;
124  void EnableNodePointSelection(bool enable) const;
125  void enablePieceSelection(bool enable) const;
126 
127  void EnableLabelHover(bool enable) const;
128  void EnablePointHover(bool enable) const;
129  void EnableLineHover(bool enable) const;
130  void EnableArcHover(bool enable) const;
131  void EnableElArcHover(bool enable) const;
132  void EnableSplineHover(bool enable) const;
133  void EnableSplinePathHover(bool enable) const;
134  void EnableNodeLabelHover(bool enable) const;
135  void EnableNodePointHover(bool enable) const;
136  void enablePieceHover(bool enable) const;
137 
138  void signalZoomToAreaActive(bool enable) const;
139  void signalZoomPanActive(bool enable) const;
140 
141 protected:
142  virtual void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
143  virtual void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
144  virtual void showEvent(QShowEvent *event) Q_DECL_OVERRIDE;
145  virtual void changeEvent(QEvent* event) Q_DECL_OVERRIDE;
146  virtual void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
147  virtual void customEvent(QEvent * event) Q_DECL_OVERRIDE;
148  virtual void CleanLayout() Q_DECL_OVERRIDE;
149  virtual void PrepareSceneList() Q_DECL_OVERRIDE;
150  virtual void exportToCSVData(const QString &fileName, const DialogExportToCSV &dialog) Q_DECL_FINAL;
151  void handleExportToCSV();
152 
153 private slots:
154  void zoomScaleChanged(qreal scale);
155  void MouseMove(const QPointF &scenePos);
156  void Clear();
157  void PatternChangesWereSaved(bool saved);
158  void LastUsedTool();
159  void FullParseFile();
160  void SetEnabledGUI(bool enabled);
161  void GlobalchangeDraftBlock(const QString &patternPiece);
162  void ToolBarStyles();
163  void resetOrigins();
164  void showLayoutPages(int index);
165  void Preferences();
166 #if defined(Q_OS_MAC)
167  void CreateMeasurements();
168 #endif
169  void exportLayoutAs();
170  void exportPiecesAs();
171  void exportDraftBlocksAs();
172 
173  void handleArrowTool(bool checked);
174  void handlePointAtDistanceAngleTool(bool checked);
175  void handleAlongLineTool(bool checked);
176  void handleMidpointTool(bool checked);
177  void handleShoulderPointTool(bool checked);
178  void handleNormalTool(bool checked);
179  void handleBisectorTool(bool checked);
180  void handleHeightTool(bool checked);
181  void handleTriangleTool(bool checked);
182  void handleLineIntersectAxisTool(bool checked);
183  void handlePointOfContactTool(bool checked);
184  void handlePointIntersectXYTool(bool checked);
185 
186  void handleLineTool(bool checked);
187  void handleLineIntersectTool(bool checked);
188 
189  void handleCurveTool(bool checked);
190  void handleSplineTool(bool checked);
191  void handleCurveWithControlPointsTool(bool checked);
192  void handleSplineWithControlPointsTool(bool checked);
193  void handlePointAlongCurveTool(bool checked);
194  void handlePointAlongSplineTool(bool checked);
195  void handleCurveIntersectCurveTool(bool checked);
196  void handleCurveIntersectAxisTool(bool checked);
197 
198  void handleArcTool(bool checked);
199  void handlePointAlongArcTool(bool checked);
200  void handlePointFromArcAndTangentTool(bool checked);
201  void handleArcWithLengthTool(bool checked);
202  void handleArcIntersectAxisTool(bool checked);
203  void handlePointOfIntersectionArcsTool(bool checked);
204  void handlePointOfIntersectionCirclesTool(bool checked);
205  void handlePointFromCircleAndTangentTool(bool checked);
206 
207  void handleEllipticalArcTool(bool checked);
208 
209  void handleGroupTool(bool checked);
210  void handleRotationTool(bool checked);
211  void handleMirrorByLineTool(bool checked);
212  void handleMirrorByAxisTool(bool checked);
213  void handleMoveTool(bool checked);
214  void handleTrueDartTool(bool checked);
215 
216  void handleInternalPathTool(bool checked);
217  void handleAnchorPointTool(bool checked);
218  void handleInsertNodesTool(bool checked);
219 
220  void handlePatternPieceTool(bool checked);
221  void handleUnionTool(bool checked);
222 
223  void handleNewLayout(bool checked);
224 
225  void showDraftMode(bool checked);
226  void showPieceMode(bool checked);
227  void showLayoutMode(bool checked);
228 
229  void New();
230  bool SaveAs();
231  bool Save();
232  void Open();
233 
234  void closeUnionDialog(int result);
235  void ClosedEditGroupDialog(int result);
236  void ClosedDialogInternalPath(int result);
237  void ClosedDialogAnchorPoint(int result);
238  void ClosedInsertNodesDialog(int result);
239 
240  void zoomToPrevious();
241  void zoomToArea(bool checked);
242  void zoomPan(bool checked);
243 
244  void zoomToPoint(const QString& pointName);
245  void showZoomToPointDialog();
246 
247  void LoadIndividual();
248  void LoadMultisize();
249  void UnloadMeasurements();
250  void ShowMeasurements();
251  void MeasurementsChanged(const QString &path);
252  void SyncMeasurements();
253 #if defined(Q_OS_MAC)
254  void OpenAt(QAction *where);
255 #endif //defined(Q_OS_MAC)
256 
257  void ChangedSize(int index);
258  void ChangedHeight(int index);
259 
260 private:
261  Q_DISABLE_COPY(MainWindow)
262  /** @brief ui keeps information about user interface */
264 
265  QFileSystemWatcher *watcher;
266 
267  /** @brief tool current tool */
269 
270  /** @brief tool last used tool */
272 
273  /** @brief draftScene draft block scene. */
275 
276  /** @brief pieceScene pattern piece scene. */
278 
279  /** @brief mouseCoordinates pointer to label who show mouse coordinate. */
281 
282  QPointer<QToolButton> infoToolButton;
283 
284  /** @brief helpLabel help show tooltip. */
285  QLabel *helpLabel;
286 
287  /** @brief isInitialized true after first show window. */
289 
290  /** @brief mChanges true if measurement file was changed. */
291  bool mChanges;
293 
295 
299 
300  QFontComboBox *fontComboBox;
301  QComboBox *fontSizeComboBox;
302  QComboBox *draftBlockComboBox; /** @brief draftBlockComboBox stores names of draft blocks.*/
304  Draw mode; /** @brief mode stores current draw mode. */
305  qint32 currentBlockIndex; /** @brief currentBlockIndex current selected draft block.*/
306  qint32 currentToolBoxIndex; /** @brief currentToolBoxIndex current set of tools. */
311  bool drawMode; /** @brief drawMode true if draft scene active. */
312 
313  enum { MaxRecentFiles = 5 };
315  QAction *separatorAct;
316 
317  QLabel *leftGoToStage;
318  QLabel *rightGoToStage;
319  QTimer *autoSaveTimer;
321  QPointer<QComboBox> gradationHeights;
322  QPointer<QComboBox> gradationSizes;
323  QPointer<QLabel> gradationHeightsLabel;
324  QPointer<QLabel> gradationSizesLabel;
328  std::shared_ptr<VLockGuard<char>> lock;
329 
330  QDoubleSpinBox *zoomScaleSpinBox;
331  PenToolBar *m_penToolBar; //!< for selecting the current pen
334 
335  void SetDefaultHeight();
336  void SetDefaultSize();
337 
338  void initStatusBar();
339  void initModesToolBar();
340  void initDraftToolBar();
341  void initPointNameToolBar();
342  void initToolsToolBar();
343  void initToolBarVisibility();
344  void initPenToolBar();
346  void setToolBarVisibility(QToolBar *toolbar, bool visible);
347  void InitToolButtons();
348 
349  void handlePointsMenu();
350  void handleLinesMenu();
351  void handleArcsMenu();
352  void handleCurvesMenu();
353  void handleCirclesMenu();
354  void handleOperationsMenu();
356  void handlePieceMenu();
357  void handleLayoutMenu();
359 
360  void CancelTool();
361 
362  void SetEnableWidgets(bool enable);
363  void setEnableTools(bool enable);
364  void SetLayoutModeActions();
365 
366  void SaveCurrentScene();
367  void RestoreCurrentScene();
368  void MinimumScrollBar();
369 
370  template <typename Dialog, typename Func>
371  void SetToolButton(bool checked, Tool t, const QString &cursor, const QString &toolTip,
372  Func closeDialogSlot);
373  template <typename Dialog, typename Func, typename Func2>
374  void SetToolButtonWithApply(bool checked, Tool t, const QString &cursor, const QString &toolTip,
375  Func closeDialogSlot, Func2 applyDialogSlot);
376  template <typename DrawTool>
377  void ClosedDialog(int result);
378 
379  template <typename DrawTool>
380  void ClosedDialogWithApply(int result, VMainGraphicsScene *scene);
381  template <typename DrawTool>
382  void ApplyDialog(VMainGraphicsScene *scene);
383  template <typename DrawTool>
384  void ClosedDrawDialogWithApply(int result);
385  template <typename DrawTool>
386  void ApplyDrawDialog();
387  template <typename DrawTool>
388  void ClosedPiecesDialogWithApply(int result);
389  template <typename DrawTool>
390  void applyPiecesDialog();
391 
392  bool SavePattern(const QString &fileName, QString &error);
393  void AutoSavePattern();
394  void setCurrentFile(const QString &fileName);
395 
396  void ReadSettings();
397  void WriteSettings();
398 
399  bool MaybeSave();
401  void CreateMenus();
402  void CreateActions();
403  void InitAutoSave();
404  QString createDraftBlockName(const QString &text);
405  QString CheckPathToMeasurements(const QString &patternPath, const QString &path);
406  QComboBox *SetGradationList(QLabel *label, const QStringList &list);
407  void changeDraftBlock(int index, bool zoomBestFit = true);
408  /**
409  * @brief EndVisualization try show dialog after and working with tool visualization.
410  */
411  void EndVisualization(bool click = false);
412  void zoomFirstShow();
413  void UpdateHeightsList(const QStringList &list);
414  void UpdateSizesList(const QStringList &list);
415 
416  void AddDocks();
417  void InitDocksContain();
418  bool OpenNewSeamly2D(const QString &fileName = QString())const;
419  void FileClosedCorrect();
420  QStringList GetUnlokedRestoreFileList()const;
421 
422  void addDraftBlock(const QString &blockName);
423  QPointF draftBlockStartPosition() const;
424 
425  void InitScenes();
426 
428  bool LoadMeasurements(const QString &path);
429  bool UpdateMeasurements(const QString &path, int size, int height);
431 
432  void ReopenFilesAfterCrash(QStringList &args);
433  void DoExport(const VCommandLinePtr& expParams);
434 
435  bool SetSize(const QString &text);
436  bool SetHeight(const QString & text);
437 
438  QString GetPatternFileName();
439  QString GetMeasurementFileName();
440 
441  void UpdateWindowTitle();
442  void upDateScenes();
443  void updateViewToolbar();
444  void resetPanShortcuts();
445 
446  QStringList draftPointNamesList();
447 
448  void updateZoomToPointComboBox(QStringList namesList);
449 
450  bool IgnoreLocking(int error, const QString &path);
451 
452  void ToolSelectPoint() const;
453  void ToolSelectPointByPress() const;
454  void ToolSelectPointByRelease() const;
455  void ToolSelectSpline() const;
456  void ToolSelectSplinePath() const;
457  void ToolSelectArc() const;
458  void ToolSelectPointArc() const;
459  void ToolSelectCurve() const;
460  void selectAllDraftObjectsTool() const;
461  void ToolSelectOperationObjects() const;
462  void ToolSelectGroupObjects() const;
463  void selectPieceTool() const;
464 };
465 
466 #endif // MAINWINDOW_H
The DialogTool class parent for all dialog of tools.
Definition: dialogtool.h:107
The DialogVariables class show dialog increments. Tables of all variables in program will be here.
The HistoryDialog class show dialog history.
The MainWindow class main windows.
Definition: mainwindow.h:87
void handlePointFromArcAndTangentTool(bool checked)
void handlePointOfIntersectionArcsTool(bool checked)
void selectPieceTool() const
void updateToolBarVisibility()
void EnableLabelSelection(bool enable) const
void EnableElArcSelection(bool enable) const
void ReopenFilesAfterCrash(QStringList &args)
QSharedPointer< VMeasurements > OpenMeasurementFile(const QString &path)
Definition: mainwindow.cpp:428
void handleImagesMenu()
void ToolSelectSplinePath() const
void handleAlongLineTool(bool checked)
handleAlongLineTool handler for point along Line tools.
Definition: mainwindow.cpp:877
void handlePointsMenu()
void ToolSelectPointArc() const
QLabel * rightGoToStage
Definition: mainwindow.h:318
void initToolBarVisibility()
void enablePieceSelection(bool enable) const
void handleExportToCSV()
void zoomScaleChanged(qreal scale)
void zoomFirstShow()
zoomFirstShow Fit scene size to best size for first show
QPointer< QComboBox > gradationSizes
Definition: mainwindow.h:322
void EnableElArcHover(bool enable) const
void SetDefaultSize()
QPointer< MouseCoordinates > mouseCoordinates
mouseCoordinates pointer to label who show mouse coordinate.
Definition: mainwindow.h:280
@ MaxRecentFiles
Definition: mainwindow.h:313
void handleTriangleTool(bool checked)
handleTriangleTool handler Point - Intersect Axis and Triangle.
Definition: mainwindow.cpp:971
void FileClosedCorrect()
virtual void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE
closeEvent handle after close window.
void EnableNodeLabelHover(bool enable) const
void handleUnionTool(bool checked)
handleUnionTool handler for Union tool.
QPointer< HistoryDialog > historyDialog
Definition: mainwindow.h:298
void changeDraftBlock(int index, bool zoomBestFit=true)
void signalZoomToAreaActive(bool enable) const
void LoadMultisize()
void ProcessCMD()
bool UpdateMeasurements(const QString &path, int size, int height)
Definition: mainwindow.cpp:550
void updateZoomToPointComboBox(QStringList namesList)
updateZoomToPointComboBox updates the list of points included in the toolbar combobox.
virtual void ShowToolTip(const QString &toolTip) Q_DECL_OVERRIDE
ShowTool highlight tool.Tip show tools tooltip.
void showDraftMode(bool checked)
showDraftMode show draw scene.
void hideAllGroups()
void handleArcWithLengthTool(bool checked)
void EnableSplinePathHover(bool enable) const
QLabel * helpLabel
helpLabel help show tooltip.
Definition: mainwindow.h:285
void AddDocks()
void ClosedDrawDialogWithApply(int result)
Definition: mainwindow.cpp:801
bool isInitialized
isInitialized true after first show window.
Definition: mainwindow.h:288
void setToolBarVisibility(QToolBar *toolbar, bool visible)
bool patternReadOnly
Definition: mainwindow.h:294
QPointF draftBlockStartPosition() const
Definition: mainwindow.cpp:350
void UnloadMeasurements()
void exportPiecesAs()
bool SetHeight(const QString &text)
void addSelectedItemsToGroup()
void initPenToolBar()
initPenToolBar enable default color, line wight & type toolbar.
void InitAutoSave()
void AutoSavePattern()
AutoSavePattern start safe saving.
bool Save()
Save save pattern file.
void ClosedDialogInternalPath(int result)
void UpdateWindowTitle()
void EnableLineSelection(bool enable) const
void handleTrueDartTool(bool checked)
void handleShoulderPointTool(bool checked)
handleShoulderPointTool handler for shoulderPoint tool.
Definition: mainwindow.cpp:934
virtual void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE
keyPressEvent handle key press events.
bool mChangesAsked
Definition: mainwindow.h:292
virtual void customEvent(QEvent *event) Q_DECL_OVERRIDE
Ui::MainWindow * ui
ui keeps information about user interface
Definition: mainwindow.h:263
bool SavePattern(const QString &fileName, QString &error)
SavePattern save pattern file.
QTimer * autoSaveTimer
Definition: mainwindow.h:319
void EnablePointSelection(bool enable) const
void setCurrentFile(const QString &fileName)
setCurrentFile the function is called to reset the state of a few variables when a file is loaded or ...
void SetToolButtonWithApply(bool checked, Tool t, const QString &cursor, const QString &toolTip, Func closeDialogSlot, Func2 applyDialogSlot)
SetToolButtonWithApply set tool and show dialog.
Definition: mainwindow.cpp:703
void ToolSelectPoint() const
QComboBox * fontSizeComboBox
Definition: mainwindow.h:301
void zoomPan(bool checked)
void addDraftBlock(const QString &blockName)
Definition: mainwindow.cpp:298
bool drawMode
Definition: mainwindow.h:311
void CreateMenus()
void showAllGroups()
QAction * recentFileActs[MaxRecentFiles]
Definition: mainwindow.h:314
void handleInternalPathTool(bool checked)
VMainGraphicsScene * draftScene
draftScene draft block scene.
Definition: mainwindow.h:274
void ToolSelectCurve() const
void ApplyDrawDialog()
Definition: mainwindow.cpp:808
void handleCurveIntersectCurveTool(bool checked)
void handlePointAtDistanceAngleTool(bool checked)
handlePointAtDistanceAngleTool handler for handlePointAtDistanceAngle tool.
Definition: mainwindow.cpp:858
void handleSplineWithControlPointsTool(bool checked)
QFontComboBox * fontComboBox
Definition: mainwindow.h:300
void penChanged(Pen pen)
void UpdateHeightsList(const QStringList &list)
void ReadSettings()
ReadSettings read setting for app.
QAction * separatorAct
Definition: mainwindow.h:315
void EnablePointHover(bool enable) const
void New()
NewPattern create new empty pattern.
void enablePieceHover(bool enable) const
void showZoomToPointDialog()
zoomToPoint show dialog for choosing a point and update the graphics view to focus on it.
QPointer< QLabel > gradationSizesLabel
Definition: mainwindow.h:324
void EnableItemMove(bool move)
void handleMirrorByLineTool(bool checked)
void handleRotationTool(bool checked)
virtual void changeEvent(QEvent *event) Q_DECL_OVERRIDE
void ClosedInsertNodesDialog(int result)
void WriteSettings()
WriteSettings save setting for app.
void ChangedHeight(int index)
ChangedGrowth change new height value.
void EnableLineHover(bool enable) const
QString createDraftBlockName(const QString &text)
void resetPanShortcuts()
void ClosedDialogAnchorPoint(int result)
bool SaveAs()
SaveAs save as pattern file.
VToolOptionsPropertyBrowser * toolProperties
Definition: mainwindow.h:325
void handlePieceMenu()
bool isLayoutsDockVisible
Definition: mainwindow.h:309
void handleLineIntersectTool(bool checked)
handleLineIntersectTool handler for lineIntersect tool.
virtual void CleanLayout() Q_DECL_OVERRIDE
void ClosedEditGroupDialog(int result)
void handleNewLayout(bool checked)
handleNewLayout handler for New Layout tool.
QLabel * leftGoToStage
Definition: mainwindow.h:317
void handleCurveWithControlPointsTool(bool checked)
void handleEllipticalArcTool(bool checked)
handleEllipticalArcTool handler for EllipticalArc tool.
void MouseMove(const QPointF &scenePos)
mouseMove save mouse position and show user.
void handleSplineTool(bool checked)
handleSplineTool handler for spline tool.
void Open()
Open ask user select pattern file.
void exportDraftBlocksAs()
void zoomToPoint(const QString &pointName)
zoomToPoint show dialog for choosing a point and update the graphics view to focus on it.
void SetLayoutModeActions()
virtual void showEvent(QShowEvent *event) Q_DECL_OVERRIDE
showEvent handle after show window.
void ToolSelectOperationObjects() const
void ClosedDialogWithApply(int result, VMainGraphicsScene *scene)
ClosedDialogWithApply handle close dialog that has apply button.
Definition: mainwindow.cpp:747
Tool lastUsedTool
tool last used tool
Definition: mainwindow.h:271
void resetOrigins()
void showLayoutMode(bool checked)
showLayoutMode show layout scene.
PenToolBar * m_penToolBar
for selecting the current pen
Definition: mainwindow.h:331
virtual void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE
keyReleaseEvent handle key press events.
PiecesWidget * patternPiecesWidget
Definition: mainwindow.h:327
void deleteGroupFromList()
void ToolBarStyles()
GroupsWidget * groupsWidget
Definition: mainwindow.h:326
void RestoreCurrentScene()
RestoreCurrentScene restore scene options after change.
void handleGroupTool(bool checked)
void EnableSplineSelection(bool enable) const
void handleArrowTool(bool checked)
handleArrowTool enable arrow tool.
void handleNormalTool(bool checked)
handleNormalTool handler point on perpendicular tool.
Definition: mainwindow.cpp:896
void zoomToPrevious()
virtual ~MainWindow() Q_DECL_OVERRIDE
void handleArcTool(bool checked)
handleArcTool handler for arc tool.
void handleArcIntersectAxisTool(bool checked)
void zoomToArea(bool checked)
QFileSystemWatcher * watcher
Definition: mainwindow.h:265
void lockAllGroups()
virtual void exportToCSVData(const QString &fileName, const DialogExportToCSV &dialog) Q_DECL_FINAL
QComboBox * m_zoomToPointComboBox
Definition: mainwindow.h:333
void ItemsSelection(SelectionType type) const
bool LoadMeasurements(const QString &path)
Definition: mainwindow.cpp:498
void addGroupToList()
void MeasurementsChanged(const QString &path)
void EnableSplinePathSelection(bool enable) const
QPointer< DialogVariables > dialogTable
Definition: mainwindow.h:296
void handleBisectorTool(bool checked)
handleBisectorTool handler for bisector tool.
Definition: mainwindow.cpp:915
bool SetSize(const QString &text)
void InitScenes()
Definition: mainwindow.cpp:374
bool IgnoreLocking(int error, const QString &path)
bool isToolboxDockVisible
Definition: mainwindow.h:310
bool OpenNewSeamly2D(const QString &fileName=QString()) const
PenToolBar * m_penReset
Definition: mainwindow.h:332
MainWindow(QWidget *parent=nullptr)
MainWindow constructor.
Definition: mainwindow.cpp:134
void ToolSelectPointByRelease() const
void EnableArcSelection(bool enable) const
void handleLineTool(bool checked)
handleLineTool handler for line tool.
void ChangedSize(int index)
ChangedSize change new size value.
bool LoadPattern(const QString &fileName, const QString &customMeasureFile=QString())
LoadPattern open pattern file.
void selectAllDraftObjectsTool() const
Tool currentTool
tool current tool
Definition: mainwindow.h:268
VMainGraphicsScene * pieceScene
pieceScene pattern piece scene.
Definition: mainwindow.h:277
void handleLineIntersectAxisTool(bool checked)
void EnableNodeLabelSelection(bool enable) const
void SaveCurrentScene()
SaveCurrentScene save scene options before set another.
void setEnableTools(bool enable)
setEnableTools enable button.
void handleMoveTool(bool checked)
void handleLinesMenu()
QString CheckPathToMeasurements(const QString &patternPath, const QString &path)
void ToolSelectPointByPress() const
void handlePointOfIntersectionCirclesTool(bool checked)
void RefreshHistory()
void handleMirrorByAxisTool(bool checked)
void handlePointOfContactTool(bool checked)
handlePointOfContactTool handler for pointOfContact tool.
Definition: mainwindow.cpp:953
void PatternChangesWereSaved(bool saved)
haveChange enable action save if we have unsaved change.
void handleMidpointTool(bool checked)
Definition: mainwindow.cpp:838
void EndVisualization(bool click=false)
EndVisualization try show dialog after and working with tool visualization.
QPointer< QComboBox > gradationHeights
Definition: mainwindow.h:321
QStringList GetUnlokedRestoreFileList() const
void initToolsToolBar()
void unlockAllGroups()
void applyPiecesDialog()
Definition: mainwindow.cpp:831
void handlePointAlongArcTool(bool checked)
handlePointAlongArcTool handler for PointAlongArc tool.
void SetDefaultHeight()
void initStatusBar()
initStatusBar initialize horizontal bar for presenting status information
void ToolSelectGroupObjects() const
void showLayoutPages(int index)
void handleLayoutMenu()
QString GetPatternFileName()
void SetToolButton(bool checked, Tool t, const QString &cursor, const QString &toolTip, Func closeDialogSlot)
SetToolButton set tool and show dialog.
Definition: mainwindow.cpp:632
void closeUnionDialog(int result)
closeUnionDialog actions after closing Union tool dialog.
void EnableSplineHover(bool enable) const
void LastUsedTool()
void signalZoomPanActive(bool enable) const
void initDraftToolBar()
initDraftToolBar enable draw toolbar.
bool guiEnabled
Definition: mainwindow.h:320
virtual void updateGroups() Q_DECL_OVERRIDE
triggers the update of the groups
void ToolSelectArc() const
void handlePointAlongCurveTool(bool checked)
handlePointAlongCurveTool handler for point along curve tool.
void showPieceMode(bool checked)
showPieceMode show Piece scene.
QDoubleSpinBox * zoomScaleSpinBox
Definition: mainwindow.h:330
void handlePatternPiecesMenu()
void CreateActions()
void FullParseFile()
void Clear()
Clear reset to default window.
QComboBox * SetGradationList(QLabel *label, const QStringList &list)
void GlobalchangeDraftBlock(const QString &patternPiece)
void handleCurvesMenu()
qint32 currentBlockIndex
mode stores current draw mode.
Definition: mainwindow.h:305
void handleCirclesMenu()
std::shared_ptr< VLockGuard< char > > lock
Definition: mainwindow.h:328
void ShowMeasurements()
void handlePointAlongSplineTool(bool checked)
handlePointAlongSplineTool handler for point along spline tool.
void InitToolButtons()
void updateViewToolbar()
void ToolSelectSpline() const
bool MaybeSave()
MaybeSave The function is called to save pending changes.
void UpdateSizesList(const QStringList &list)
void handlePatternPieceTool(bool checked)
handlePatternPieceTool handler for pattern piece tool.
bool mChanges
mChanges true if measurement file was changed.
Definition: mainwindow.h:291
void initModesToolBar()
qint32 currentToolBoxIndex
currentBlockIndex current selected draft block.
Definition: mainwindow.h:306
void LoadIndividual()
void SetEnableWidgets(bool enable)
SetEnableWidgets enable action button.
virtual void zoomToSelected() Q_DECL_OVERRIDE
void EnableArcHover(bool enable) const
void ApplyDialog(VMainGraphicsScene *scene)
ApplyDialog handle apply in dialog.
Definition: mainwindow.cpp:780
void EnableNodePointSelection(bool enable) const
QString GetMeasurementFileName()
void handleAnchorPointTool(bool checked)
void handleOperationsMenu()
void InitDocksContain()
bool isGroupsDockVisible
Definition: mainwindow.h:308
void editGroup()
void SyncMeasurements()
void handleCurveIntersectAxisTool(bool checked)
void UpdateRecentFileActions()
QPointer< QToolButton > infoToolButton
Definition: mainwindow.h:282
void MinimumScrollBar()
MinimumScrollBar set scroll bar to minimum.
void handlePointFromCircleAndTangentTool(bool checked)
QComboBox * draftBlockComboBox
Definition: mainwindow.h:302
QLabel * draftBlockLabel
draftBlockComboBox stores names of draft blocks.
Definition: mainwindow.h:303
void ClosedDialog(int result)
ClosedDialog handle close dialog.
Definition: mainwindow.cpp:726
void DoExport(const VCommandLinePtr &expParams)
void EnableNodePointHover(bool enable) const
QSharedPointer< DialogTool > dialogTool
Definition: mainwindow.h:297
virtual void PrepareSceneList() Q_DECL_OVERRIDE
void CancelTool()
CancelTool cancel tool.
void handleHeightTool(bool checked)
handleHeightTool handler tool height.
void EnableLabelHover(bool enable) const
void upDateScenes()
void exportLayoutAs()
QPointer< QLabel > gradationHeightsLabel
Definition: mainwindow.h:323
void ClosedPiecesDialogWithApply(int result)
Definition: mainwindow.cpp:815
void initPointNameToolBar()
initPointNameToolBar enable Point Name toolbar.
void handleCurveTool(bool checked)
handleCurveTool handler for curve tool.
QStringList draftPointNamesList()
draftPointNamesList gets the list of points in draft mode.
void Preferences()
void handlePointIntersectXYTool(bool checked)
handlePointIntersectXYTool handler for pointOfIntersection tool.
Definition: mainwindow.cpp:990
bool isToolOptionsDockVisible
currentToolBoxIndex current set of tools.
Definition: mainwindow.h:307
void handleInsertNodesTool(bool checked)
void SetEnabledGUI(bool enabled)
void CheckRequiredMeasurements(const VMeasurements *m)
Definition: mainwindow.cpp:602
void handleArcsMenu()
Definition: pen.h:37
The VMainGraphicsScene class main scene.
Tool
Definition: def.h:161
SelectionType
Definition: def.h:108
std::shared_ptr< VCommandLine > VCommandLinePtr
Definition: vcmdexport.h:41
Draw
Definition: vgeometrydef.h:55