Seamly2D
Code documentation
export_layout_dialog.h
Go to the documentation of this file.
1 /************************************************************************
2  **
3  ** @file export_layout_dialog.h
4  ** @author Roman Telezhynskyi <dismine(at)gmail.com>
5  ** @date 22 1, 2015
6  **
7  ** @author Douglas S Caskey
8  ** @date Nov 4, 2022
9  **
10  ** @brief
11  ** @copyright
12  ** This source code is part of the Seamly2D project, a pattern making
13  ** program, whose allow create and modeling patterns of clothing.
14  ** Copyright (C) 2013-2022 Seamly2D project
15  ** <https://github.com/fashionfreedom/seamly2d> All Rights Reserved.
16  **
17  ** Seamly2D is free software: you can redistribute it and/or modify
18  ** it under the terms of the GNU General Public License as published by
19  ** the Free Software Foundation, either version 3 of the License, or
20  ** (at your option) any later version.
21  **
22  ** Seamly2D is distributed in the hope that it will be useful,
23  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
24  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  ** GNU General Public License for more details.
26  **
27  ** You should have received a copy of the GNU General Public License
28  ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
29  **
30  *************************************************************************/
31 
32 #ifndef DIALOGSAVELAYOUT_H
33 #define DIALOGSAVELAYOUT_H
34 
35 #include <QDialog>
36 #include <QMarginsF>
37 
38 #include "../vgeometry/vgeometrydef.h"
39 #include "../vmisc/def.h"
40 #include "vabstractlayoutdialog.h"
41 
42 namespace Ui
43 {
44  class ExportLayoutDialog;
45 }
46 
47 
49 {
50  Q_OBJECT
51 
52 public:
53  explicit ExportLayoutDialog(int count, Draw mode = Draw::Layout, const QString &fileName = QString(),
54  QWidget *parent = nullptr);
55 
56  virtual ~ExportLayoutDialog();
57 
58  QString path() const;
59  QString fileName() const;
60  QString modeString() const;
61 
62  LayoutExportFormat format() const;
63  QString formatText() const;
65 
66  void setBinaryDXFFormat(bool binary);
67  bool isBinaryDXFFormat() const;
68 
69  void setDestinationPath(const QString& cmdDestinationPath);
70 
71  Draw mode() const;
72 
74 
75  bool isTextAsPaths() const;
76  void setTextAsPaths(bool textAsPaths);
77 
78 protected:
79  virtual void showEvent(QShowEvent *event) Q_DECL_OVERRIDE;
80  void initTemplates(QComboBox *templates);
81 
82 private slots:
83  void save();
84  void pathChanged(const QString &text);
85  void showExportFiles();
86 
87 private:
88  Q_DISABLE_COPY(ExportLayoutDialog)
90  int m_count;
93  QPushButton *m_SaveButton;
94 
96 
97  void readSettings();
98  void writeSettings() const;
99 };
100 
101 #endif // DIALOGSAVELAYOUT_H
virtual void showEvent(QShowEvent *event) Q_DECL_OVERRIDE
void setDestinationPath(const QString &cmdDestinationPath)
LayoutExportFormat format() const
void readSettings()
ExportLayoutDialog::readSettings.
void initTemplates(QComboBox *templates)
QString modeString() const
modeString()
void pathChanged(const QString &text)
static QString exportFormatSuffix(LayoutExportFormat format)
QPushButton * m_SaveButton
ExportLayoutDialog(int count, Draw mode=Draw::Layout, const QString &fileName=QString(), QWidget *parent=nullptr)
void setTextAsPaths(bool textAsPaths)
void removeFormatFromList(LayoutExportFormat format)
void setBinaryDXFFormat(bool binary)
Ui::ExportLayoutDialog * ui
void writeSettings() const
ExportLayoutDialog::writeSettings.
void selectFormat(LayoutExportFormat format)
LayoutExportFormat
Definition: def.h:60
Draw
Definition: vgeometrydef.h:55
@ Layout