mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-07 20:34:14 +02:00
9699b314b0
With symbols as blocks and the new "DXF : textes des symboles en attributs" option (--dxf-attributes on the command line), a symbol's own texts (its label, function, comment...) are attributes of its INSERT instead of loose texts, so a CAD program moves them with the symbol and can list or edit them. Each is written exactly where, and as, the text was. A text showing an information field is tagged with its name (LABEL, FUNCTION...), a typed text TEXT1, TEXT2...; a text's second line gets _2. The block defines each tag once, placed where the first symbol has it. Its own option, off by default, because LibreCAD (2.2.1.5) does not show attributes: the labels would vanish there. AutoCAD shows them. The text geometry moves into textLines(), shared with the text loop, so the attributes and the plain texts cannot drift apart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
58 lines
2.3 KiB
C++
58 lines
2.3 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_H
|
|
#define EXPORT_PROPERTIES_H
|
|
#include <QtCore>
|
|
#include "qet.h"
|
|
|
|
/**
|
|
This class is a container for various options used when printing or
|
|
exporting a diagram as an image file.
|
|
*/
|
|
class ExportProperties {
|
|
// constructeur, destructeur
|
|
public:
|
|
ExportProperties();
|
|
virtual ~ExportProperties();
|
|
|
|
// methods
|
|
public:
|
|
void toSettings (QSettings &, const QString & = QString()) const;
|
|
void fromSettings(QSettings &, const QString & = QString());
|
|
|
|
static ExportProperties defaultExportProperties ();
|
|
static ExportProperties defaultPrintProperties ();
|
|
|
|
// attributes
|
|
public:
|
|
QDir destination_directory; ///< Target directory for generated files
|
|
QString format; ///< Image format of generated files
|
|
bool draw_grid; ///< Whether to render the diagram grid
|
|
bool draw_guides; ///< Whether to render the diagram guides
|
|
bool draw_border; ///< Whether to render the border (along with rows/columns headers)
|
|
bool draw_titleblock; ///< Whether to render the title block
|
|
bool draw_terminals; ///< Whether to render terminals
|
|
bool draw_terminal_names; ///< Whether to render terminal names/labels
|
|
bool draw_bg_transparent; ///< Whether to use transparency for SVG-Export
|
|
bool draw_colored_conductors; ///< Whether to render conductors colors
|
|
bool dxf_blocks; ///< DXF: each symbol as a block, placed with an INSERT
|
|
bool dxf_attributes; ///< DXF, with dxf_blocks: a symbol's texts as attributes of its INSERT
|
|
QET::DiagramArea exported_area; ///< Area of diagrams to be rendered
|
|
};
|
|
#endif
|