QElectroTech  0.8-dev
exportpropertieswidget.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2020 The QElectroTech Team
3  This file is part of QElectroTech.
4 
5  QElectroTech is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 2 of the License, or
8  (at your option) any later version.
9 
10  QElectroTech is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef EXPORT_PROPERTIES_WIDGET_H
19 #define EXPORT_PROPERTIES_WIDGET_H
20 #include <QtWidgets>
21 #include "exportproperties.h"
22 
27 class ExportPropertiesWidget : public QWidget {
28  Q_OBJECT
29  // constructors, destructor
30  public:
31  ExportPropertiesWidget(QWidget * = nullptr);
32  ExportPropertiesWidget(const ExportProperties &, QWidget * = nullptr);
33  ~ExportPropertiesWidget() override;
34  private:
36 
37  // methods
38  public:
41  void setPrintingMode(bool);
42 
43  public slots:
44  void slot_chooseADirectory();
45 
46  signals:
47  void formatChanged();
49  void optionChanged();
50 
51  private:
52  void build();
53 
54  // attributes
55  private:
56  QLabel *dirpath_label;
57  QLineEdit *dirpath;
58  QPushButton *button_browse;
59  QLabel *format_label;
60  QComboBox *format;
61  QCheckBox *draw_grid;
62  QCheckBox *draw_border;
63  QCheckBox *draw_titleblock;
64  QCheckBox *draw_terminals;
66  QRadioButton *export_border;
67  QRadioButton *export_elements;
68  QButtonGroup *exported_content_choices;
69 };
70 #endif
ExportPropertiesWidget::ExportPropertiesWidget
ExportPropertiesWidget(QWidget *=nullptr)
ExportPropertiesWidget::ExportPropertiesWidget Constructeur.
Definition: exportpropertieswidget.cpp:26
ExportPropertiesWidget
Definition: exportpropertieswidget.h:27
exportpropertieswidget.h
QET::ElementsArea
@ ElementsArea
Export the content of the diagram only.
Definition: qet.h:141
ExportPropertiesWidget::exported_content_choices
QButtonGroup * exported_content_choices
Definition: exportpropertieswidget.h:68
ExportPropertiesWidget::setPrintingMode
void setPrintingMode(bool)
ExportPropertiesWidget::setPrintingMode Puts the widget in Print or Export mode. Print mode does not ...
Definition: exportpropertieswidget.cpp:108
ExportPropertiesWidget::button_browse
QPushButton * button_browse
Definition: exportpropertieswidget.h:58
ExportProperties::draw_colored_conductors
bool draw_colored_conductors
Whether to render conductors colors.
Definition: exportproperties.h:49
ExportPropertiesWidget::draw_grid
QCheckBox * draw_grid
Definition: exportpropertieswidget.h:61
exportproperties.h
ExportPropertiesWidget::formatChanged
void formatChanged()
ExportProperties::format
QString format
Image format of generated files.
Definition: exportproperties.h:44
ExportProperties::draw_border
bool draw_border
Whether to render the border (along with rows/columns headers)
Definition: exportproperties.h:46
ExportPropertiesWidget::export_border
QRadioButton * export_border
Definition: exportpropertieswidget.h:66
ExportProperties::destination_directory
QDir destination_directory
Target directory for generated files.
Definition: exportproperties.h:43
ExportPropertiesWidget::export_elements
QRadioButton * export_elements
Definition: exportpropertieswidget.h:67
ExportProperties::draw_titleblock
bool draw_titleblock
Whether to render the title block.
Definition: exportproperties.h:47
ExportPropertiesWidget::dirpath_label
QLabel * dirpath_label
Definition: exportpropertieswidget.h:56
ExportPropertiesWidget::setExportProperties
void setExportProperties(const ExportProperties &)
ExportPropertiesWidget::setExportProperties.
Definition: exportpropertieswidget.cpp:74
ExportPropertiesWidget::slot_chooseADirectory
void slot_chooseADirectory()
ExportPropertiesWidget::slot_chooseADirectory Slot asking the user to choose a folder / Slot demandan...
Definition: exportpropertieswidget.cpp:123
ExportPropertiesWidget::draw_colored_conductors
QCheckBox * draw_colored_conductors
Definition: exportpropertieswidget.h:65
ExportPropertiesWidget::draw_border
QCheckBox * draw_border
Definition: exportpropertieswidget.h:62
ExportPropertiesWidget::format_label
QLabel * format_label
Definition: exportpropertieswidget.h:59
ExportPropertiesWidget::dirpath
QLineEdit * dirpath
Definition: exportpropertieswidget.h:57
ExportPropertiesWidget::~ExportPropertiesWidget
~ExportPropertiesWidget() override
ExportPropertiesWidget::~ExportPropertiesWidget Destructeur.
Definition: exportpropertieswidget.cpp:48
QET::BorderArea
@ BorderArea
Export the diagram along with its border and title block.
Definition: qet.h:140
ExportPropertiesWidget::draw_terminals
QCheckBox * draw_terminals
Definition: exportpropertieswidget.h:64
ExportProperties::draw_terminals
bool draw_terminals
Whether to render terminals.
Definition: exportproperties.h:48
ExportProperties::exported_area
QET::DiagramArea exported_area
Area of diagrams to be rendered.
Definition: exportproperties.h:50
ExportPropertiesWidget::build
void build()
ExportPropertiesWidget::build Generated the ExportPropertiesWidget ui / Cette methode construit le wi...
Definition: exportpropertieswidget.cpp:139
ExportPropertiesWidget::exportProperties
ExportProperties exportProperties() const
ExportPropertiesWidget::exportProperties.
Definition: exportpropertieswidget.cpp:55
ExportPropertiesWidget::ExportPropertiesWidget
ExportPropertiesWidget(const ExportPropertiesWidget &)
ExportPropertiesWidget::exportedAreaChanged
void exportedAreaChanged()
ExportPropertiesWidget::format
QComboBox * format
Definition: exportpropertieswidget.h:60
ExportProperties
Definition: exportproperties.h:27
ExportPropertiesWidget::draw_titleblock
QCheckBox * draw_titleblock
Definition: exportpropertieswidget.h:63
QET::Icons::tr
QIcon tr
Definition: qeticons.cpp:206
ExportPropertiesWidget::optionChanged
void optionChanged()
ExportProperties::draw_grid
bool draw_grid
Whether to render the diagram grid.
Definition: exportproperties.h:45