Seamly2D
Code documentation
export_format_combobox.h
Go to the documentation of this file.
1 /******************************************************************************
2  * @file export_format_combobox.h
3  ** @author DS Caskey
4  ** @date Mar 15, 2022
5  **
6  ** @brief
7  ** @copyright
8  **
9  ** Seamly2D is free software: you can redistribute it and/or modify
10  ** it under the terms of the GNU General Public License as published by
11  ** the Free Software Foundation, either version 3 of the License, or
12  ** (at your option) any later version.
13  **
14  ** Seamly2D is distributed in the hope that it will be useful,
15  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  ** GNU General Public License for more details.
18  **
19  ** You should have received a copy of the GNU General Public License
20  ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
21  **
22  *****************************************************************************/
23 
24 
25 #ifndef LINEWEIGHT_COMBOBOX_H
26 #define LINEWEIGHT_COMBOBOX_H
27 
28 #include <QComboBox>
29 #include <QWidget>
30 
31 #include "../vmisc/def.h"
32 #include "../ifc/xml/vabstractpattern.h"
33 
34 /**
35  * A comboBox for choosing an export format type.
36  */
37 class ExportFormatCombobox: public QComboBox
38 {
39  Q_OBJECT
40 
41 public:
42  ExportFormatCombobox(QWidget *parent = nullptr, const char *name = nullptr);
43  virtual ~ExportFormatCombobox();
44 
45  void init();
46 
48  void setExportFormat(LayoutExportFormat &format);
49  static QString exportFormatDescription(LayoutExportFormat format);
50  static QString makeHelpFormatList();
51  void setCurrentToDefault();
52 
53 private slots:
54  void updateExportFormat(int index);
55 
56 signals:
58 
59 private:
61  static bool supportPSTest();
62  static bool testPdf();
63  static bool havePdf;
64  static bool tested;
66 };
67 
68 #endif
static QVector< std::pair< QString, LayoutExportFormat > > initFormats()
ExportFormatCombobox(QWidget *parent=nullptr, const char *name=nullptr)
static QString exportFormatDescription(LayoutExportFormat format)
void exportFormatChanged(const LayoutExportFormat &format)
LayoutExportFormat getExportFormat() const
LayoutExportFormat m_currentFormat
void setExportFormat(LayoutExportFormat &format)
static QString makeHelpFormatList()
LayoutExportFormat
Definition: def.h:60