Seamly2D
Code documentation
dialogline.h
Go to the documentation of this file.
1 /******************************************************************************
2  * @file dialogline.h
3  ** @author Douglas S Caskey
4  ** @date 21 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 dialogline.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 Valentine project, a pattern making
28  ** program, whose allow create and modeling patterns of clothing.
29  ** Copyright (C) 2013-2015 Seamly2D project
30  ** <https://github.com/fashionfreedom/seamly2d> All Rights Reserved.
31  **
32  ** Seamly2D 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  ** Seamly2D 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 Seamly2D. If not, see <http://www.gnu.org/licenses/>.
44  **
45  *************************************************************************/
46 
47 #ifndef DIALOGLINE_H
48 #define DIALOGLINE_H
49 
50 #include <qcompilerdetection.h>
51 #include <QMetaObject>
52 #include <QObject>
53 #include <QString>
54 #include <QtGlobal>
55 
56 #include "../vmisc/def.h"
57 #include "dialogtool.h"
58 
59 namespace Ui
60 {
61  class DialogLine;
62 }
63 
64 /**
65  * @brief The DialogLine class dialog for ToolLine. Help create line and edit option.
66  */
67 class DialogLine : public DialogTool
68 {
69  Q_OBJECT
70 public:
71  DialogLine(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
72  virtual ~DialogLine() Q_DECL_OVERRIDE;
73 
74  quint32 getFirstPoint() const;
75  void setFirstPoint(const quint32 &value);
76 
77  quint32 getSecondPoint() const;
78  void setSecondPoint(const quint32 &value);
79 
80  void setLineName();
81 
82  QString getLineType() const;
83  void setLineType(const QString &value);
84 
85  QString getLineWeight() const;
86  void setLineWeight(const QString &value);
87 
88  QString getLineColor() const;
89  void setLineColor(const QString &value);
90 
91 public slots:
92  virtual void ChosenObject(quint32 id, const SceneObject &type) Q_DECL_OVERRIDE;
93  virtual void PointNameChanged() Q_DECL_OVERRIDE;
94 
95 protected:
96  virtual void ShowVisualization() Q_DECL_OVERRIDE;
97  /**
98  * @brief SaveData Put dialog data in local variables
99  */
100  virtual void SaveData() Q_DECL_OVERRIDE;
101 
102 private:
103  Q_DISABLE_COPY(DialogLine)
104 
105  /** @brief ui keeps information about user interface */
107 };
108 
109 #endif // DIALOGLINE_H
The DialogLine class dialog for ToolLine. Help create line and edit option.
Definition: dialogline.h:68
virtual void ShowVisualization() Q_DECL_OVERRIDE
Definition: dialogline.cpp:245
virtual void PointNameChanged() Q_DECL_OVERRIDE
Definition: dialogline.cpp:222
virtual ~DialogLine() Q_DECL_OVERRIDE
Definition: dialogline.cpp:123
virtual void SaveData() Q_DECL_OVERRIDE
SaveData Put dialog data in local variables.
Definition: dialogline.cpp:251
QString getLineWeight() const
getLineWeight return weight of the lines
Definition: dialogline.cpp:179
void setFirstPoint(const quint32 &value)
setFirstPoint set id first point
Definition: dialogline.cpp:212
DialogLine(const VContainer *data, const quint32 &toolId, QWidget *parent=nullptr)
DialogLine create dialog.
Definition: dialogline.cpp:78
QString getLineColor() const
Definition: dialogline.cpp:196
quint32 getFirstPoint() const
getFirstPoint return id first point
Definition: dialogline.cpp:310
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.
Definition: dialogline.cpp:269
QString getLineType() const
getLineType return type of line
Definition: dialogline.cpp:158
void setLineName()
setLineName set the name of the line
Definition: dialogline.cpp:147
void setLineType(const QString &value)
setLineType set type of line
Definition: dialogline.cpp:168
Ui::DialogLine * ui
ui keeps information about user interface
Definition: dialogline.h:106
void setLineWeight(const QString &value)
setLineWeight set weight of the lines
Definition: dialogline.cpp:189
void setLineColor(const QString &value)
Definition: dialogline.cpp:202
void setSecondPoint(const quint32 &value)
setSecondPoint set id second point
Definition: dialogline.cpp:133
quint32 getSecondPoint() const
getSecondPoint return id second point
Definition: dialogline.cpp:320
The DialogTool class parent for all dialog of tools.
Definition: dialogtool.h:107
quint32 toolId
Definition: dialogtool.h:225
const VContainer * data
data container with data
Definition: dialogtool.h:177
The VContainer class container of all variables.
Definition: vcontainer.h:141
SceneObject
Definition: def.h:103