Files
qelectrotech-source-mirror/sources/exportpropertieswidget.h
T
ispyisail c3ed2daca8 Add an option to export symbols as DXF blocks (#1339)
With "DXF : symboles en blocs" ticked in the export dialog, or
--dxf-blocks on the command line, each symbol definition a folio uses is
written once as a DXF block and every placed symbol as an INSERT of it.
A CAD program then selects, counts and replaces a symbol as one object.

The block is drawn by the same code as a symbol drawn in full, as if
the symbol sat unturned at the folio's origin, which is DXF (0,
sheetHeight): that is the block's base point, so the INSERT carries the
symbol's position and quarter-turn and nothing else. Blocks have to come
before any entity, so the export collects them first and dxfBegin()
writes them in its BLOCKS section. Entities in a block keep their own
layers. Off by default; with it off the file is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 09:50:18 +13:00

74 lines
2.0 KiB
C++

/*
Copyright 2006-2026 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef EXPORT_PROPERTIES_WIDGET_H
#define EXPORT_PROPERTIES_WIDGET_H
#include <QtWidgets>
#include "exportproperties.h"
/**
This widget enables users to edit the various options available when
exporting a project.
*/
class ExportPropertiesWidget : public QWidget {
Q_OBJECT
// constructors, destructor
public:
ExportPropertiesWidget(QWidget * = nullptr);
ExportPropertiesWidget(const ExportProperties &, QWidget * = nullptr);
~ExportPropertiesWidget() override;
private:
ExportPropertiesWidget(const ExportPropertiesWidget &);
// methods
public:
void setExportProperties(const ExportProperties &);
ExportProperties exportProperties() const;
void setPrintingMode(bool);
public slots:
void slot_chooseADirectory();
signals:
void formatChanged();
void exportedAreaChanged();
void optionChanged();
private:
void build();
// attributes
private:
QLabel *dirpath_label;
QLineEdit *dirpath;
QPushButton *button_browse;
QLabel *format_label;
QComboBox *format;
QCheckBox *draw_grid;
QCheckBox *draw_border;
QCheckBox *draw_titleblock;
QCheckBox *draw_terminals;
QCheckBox *draw_terminal_names;
QCheckBox *draw_bg_transparent;
QCheckBox *draw_colored_conductors;
QCheckBox *dxf_blocks;
QRadioButton *export_border;
QRadioButton *export_elements;
QButtonGroup *exported_content_choices;
};
#endif