QElectroTech
0.70
|
#include <exportdialog.h>
Classes | |
class | ExportDiagramLine |
Public Slots | |
void | slot_correctWidth (int) |
void | slot_correctHeight (int) |
void | slot_keepRatioChanged (int) |
void | slot_resetSize (int) |
void | slot_export () |
void | slot_changeUseBorder () |
void | slot_checkDiagramsCount () |
void | slot_changeFilesExtension (bool=false) |
void | slot_previewDiagram (int) |
void | slot_exportToClipBoard (int) |
void | slot_selectAllClicked () |
void | slot_deSelectAllClicked () |
Public Member Functions | |
ExportDialog (QETProject *, QWidget *=nullptr) | |
~ExportDialog () override | |
int | diagramsToExportCount () const |
Static Public Member Functions | |
static QPointF | rotation_transformed (qreal, qreal, qreal, qreal, qreal) |
Private Member Functions | |
ExportDialog (const ExportDialog &) | |
QWidget * | initDiagramsListPart () |
void | saveReloadDiagramParameters (Diagram *, bool=true) |
void | generateSvg (Diagram *, int, int, bool, QIODevice &) |
void | generateDxf (Diagram *, int, int, bool, QString &) |
void | fillRow (const QString &, const QRectF &, QString, const QString &, QString, QString) |
QImage | generateImage (Diagram *, int, int, bool) |
void | exportDiagram (ExportDiagramLine *) |
qreal | diagramRatio (Diagram *) |
QSize | diagramSize (Diagram *) |
Private Attributes | |
QHash< int, ExportDialog::ExportDiagramLine * > | diagram_lines_ |
QGridLayout * | diagrams_list_layout_ |
ExportPropertiesWidget * | epw |
QDialogButtonBox * | buttons |
QPushButton * | selectAll |
QPushButton * | deSelectAll |
QSignalMapper * | preview_mapper_ |
QSignalMapper * | width_mapper_ |
QSignalMapper * | height_mapper_ |
QSignalMapper * | ratio_mapper_ |
QSignalMapper * | reset_mapper_ |
QSignalMapper * | clipboard_mapper_ |
QETProject * | project_ |
This class provides a dialog enabling users to export 1 to n diagrams from a project as image files, with features like preview, copy to clipboard, resize, etc.
Definition at line 30 of file exportdialog.h.
ExportDialog::ExportDialog | ( | QETProject * | project, |
QWidget * | parent = nullptr |
||
) |
Constructeur
project | Le projet a exporter |
parent | Le Widget parent de ce dialogue |
Definition at line 46 of file exportdialog.cpp.
References buttons, QET::Icons::Cancel, ExportProperties::defaultExportProperties(), deSelectAll, ExportProperties::destination_directory, epw, QET::Horizontal, initDiagramsListPart(), project_, selectAll, slot_changeFilesExtension(), slot_changeUseBorder(), slot_deSelectAllClicked(), slot_export(), slot_selectAllClicked(), and QET::Icons::tr.
|
override |
Destructeur - ne fait rien
Definition at line 108 of file exportdialog.cpp.
|
private |
|
private |
diagram | Un schema |
Definition at line 207 of file exportdialog.cpp.
References diagramSize().
Referenced by slot_correctHeight(), and slot_correctWidth().
|
private |
diagram | Un schema |
Definition at line 218 of file exportdialog.cpp.
References QET::BorderArea, and epw.
Referenced by diagramRatio(), initDiagramsListPart(), and slot_resetSize().
int ExportDialog::diagramsToExportCount | ( | ) | const |
Definition at line 114 of file exportdialog.cpp.
References diagram_lines_.
Referenced by slot_checkDiagramsCount().
|
private |
Exporte un schema
diagram_line | La ligne decrivant le schema a exporter et la maniere de l'exporter |
Definition at line 810 of file exportdialog.cpp.
References QET::QetMessageBox::critical(), ExportProperties::destination_directory, epw, ExportProperties::format, generateDxf(), generateImage(), generateSvg(), and QET::Icons::tr.
Referenced by slot_export().
|
private |
Definition at line 693 of file exportdialog.cpp.
References DiagramFolioList::colWidths, Createdxf::drawTextAligned(), Createdxf::sheetHeight, QET::Icons::tr, Createdxf::xScale, and Createdxf::yScale.
Referenced by generateDxf().
|
private |
Exporte le schema en DXF
diagram | Schema a exporter en DXF |
width | Largeur de l'export DXF |
height | Hauteur de l'export DXF |
keep_aspect_ratio | True pour conserver le ratio, false sinon |
io_device | Peripherique de sortie pour le code DXF (souvent : un fichier) |
Definition at line 403 of file exportdialog.cpp.
References Createdxf::drawArcEllipse(), Createdxf::drawCircle(), Createdxf::drawLine(), Createdxf::drawRectangle(), Createdxf::drawText(), Createdxf::dxfBegin(), Createdxf::dxfEnd(), epw, fillRow(), ElementPictureFactory::getPrimitives(), ElementPictureFactory::instance(), Element::location(), Diagram::margin, QetShapeItem::pen, rotation_transformed(), saveReloadDiagramParameters(), Createdxf::sheetHeight, Createdxf::sheetWidth, QetShapeItem::toDXF(), QET::Icons::tr, Createdxf::xScale, and Createdxf::yScale.
Referenced by exportDiagram().
|
private |
Genere l'image a exporter
diagram | Schema a exporter en SVG |
width | Largeur de l'export |
height | Hauteur de l'export |
keep_aspect_ratio | True pour conserver le ratio, false sinon |
Definition at line 331 of file exportdialog.cpp.
References saveReloadDiagramParameters().
Referenced by exportDiagram(), slot_exportToClipBoard(), and slot_previewDiagram().
|
private |
Exporte le schema en SVG
diagram | Schema a exporter en SVG |
width | Largeur de l'export SVG |
height | Hauteur de l'export SVG |
keep_aspect_ratio | True pour conserver le ratio, false sinon |
io_device | Peripherique de sortie pour le code SVG (souvent : un fichier) |
Definition at line 373 of file exportdialog.cpp.
References saveReloadDiagramParameters().
Referenced by exportDiagram(), and slot_exportToClipBoard().
|
private |
Met en place la liste des schemas
Definition at line 126 of file exportdialog.cpp.
References clipboard_mapper_, diagram_lines_, diagrams_list_layout_, diagramSize(), height_mapper_, preview_mapper_, project_, ratio_mapper_, reset_mapper_, slot_checkDiagramsCount(), slot_correctHeight(), slot_correctWidth(), slot_exportToClipBoard(), slot_keepRatioChanged(), slot_previewDiagram(), slot_resetSize(), QET::Icons::tr, and width_mapper_.
Referenced by ExportDialog().
|
static |
Definition at line 730 of file exportdialog.cpp.
Referenced by Createdxf::drawArcEllipse(), and generateDxf().
|
private |
Sauve ou restaure les parametres du schema
diagram | Schema dont on sauve ou restaure les parametres |
save | true pour memoriser les parametres du schema et appliquer ceux definis par le formulaire, false pour restaurer les parametres |
Definition at line 353 of file exportdialog.cpp.
References epw.
Referenced by generateDxf(), generateImage(), and generateSvg().
|
slot |
Modifie les extensions des fichiers en fonction du format selectionne
force_extension | true pour ajouter l'extension si elle n'est pas presente, false pour se contenter de la modifier si elle est incorrecte. |
Definition at line 908 of file exportdialog.cpp.
References diagram_lines_, epw, and ExportPropertiesWidget::format.
Referenced by ExportDialog().
|
slot |
Slot appele lorsque l'utilisateur change la zone du schema qui doit etre exportee. Il faut alors ajuster les dimensions des schemas.
Definition at line 880 of file exportdialog.cpp.
References diagram_lines_, and slot_correctHeight().
Referenced by ExportDialog().
|
slot |
Ce slot est appele quand un schema a ete coche ou decoche. Il active ou desactive le bouton "Exporter" en fonction du nombre de schemas coches, et il garde au plus un schema coche si on exporte vers le presse-papier.
Definition at line 898 of file exportdialog.cpp.
References buttons, and diagramsToExportCount().
Referenced by initDiagramsListPart().
|
slot |
Cette methode ajuste la hauteur d'un des schemas a exporter en fonction de sa largeur si et seulement si l'option "Conserver les proportions" est activee pour ce schema.
diagram_id | numero du schema concerne |
Definition at line 261 of file exportdialog.cpp.
References diagram_lines_, and diagramRatio().
Referenced by initDiagramsListPart(), slot_changeUseBorder(), and slot_keepRatioChanged().
|
slot |
Cette methode ajuste la largeur d'un des schemas a exporter en fonction de sa hauteur si et seulement si l'option "Conserver les proportions" est activee pour ce schema.
diagram_id | numero du schema concerne |
Definition at line 238 of file exportdialog.cpp.
References diagram_lines_, and diagramRatio().
Referenced by initDiagramsListPart().
|
slot |
Definition at line 195 of file exportdialog.cpp.
References diagram_lines_.
Referenced by ExportDialog().
|
slot |
Slot effectuant les exports apres la validation du dialogue.
Definition at line 753 of file exportdialog.cpp.
References diagram_lines_, epw, exportDiagram(), QET::Icons::tr, and QET::QetMessageBox::warning().
Referenced by ExportDialog().
|
slot |
Cette methode exporte un schema vers le presse-papier
diagram_id | numero du schema a previsualiser |
Definition at line 991 of file exportdialog.cpp.
References diagram_lines_, epw, ExportPropertiesWidget::format, generateImage(), and generateSvg().
Referenced by initDiagramsListPart().
|
slot |
Prend en compte le fait qu'il faut desormais conserver ou non les proportions d'un des schemas
diagram_id | numero du schema concerne |
Definition at line 283 of file exportdialog.cpp.
References diagram_lines_, QET::Icons::ObjectLocked, QET::Icons::ObjectUnlocked, and slot_correctHeight().
Referenced by initDiagramsListPart().
|
slot |
Cette methode fait apparaitre un dialogue permettant de previsualiser un des schemas a exporter
diagram_id | numero du schema a previsualiser |
Definition at line 942 of file exportdialog.cpp.
References buttons, diagram_lines_, generateImage(), and QET::Icons::tr.
Referenced by initDiagramsListPart().
|
slot |
Reinitialise les dimensions d'un des schemas
diagram_id | numero du schema concerne |
Definition at line 306 of file exportdialog.cpp.
References diagram_lines_, and diagramSize().
Referenced by initDiagramsListPart().
|
slot |
Definition at line 189 of file exportdialog.cpp.
References diagram_lines_.
Referenced by ExportDialog().
|
private |
Definition at line 71 of file exportdialog.h.
Referenced by ExportDialog(), slot_checkDiagramsCount(), and slot_previewDiagram().
|
private |
Definition at line 82 of file exportdialog.h.
Referenced by initDiagramsListPart().
|
private |
Definition at line 74 of file exportdialog.h.
Referenced by ExportDialog().
|
private |
Definition at line 67 of file exportdialog.h.
Referenced by diagramsToExportCount(), initDiagramsListPart(), slot_changeFilesExtension(), slot_changeUseBorder(), slot_correctHeight(), slot_correctWidth(), slot_deSelectAllClicked(), slot_export(), slot_exportToClipBoard(), slot_keepRatioChanged(), slot_previewDiagram(), slot_resetSize(), and slot_selectAllClicked().
|
private |
Definition at line 69 of file exportdialog.h.
Referenced by initDiagramsListPart().
|
private |
Definition at line 70 of file exportdialog.h.
Referenced by diagramSize(), exportDiagram(), ExportDialog(), generateDxf(), saveReloadDiagramParameters(), slot_changeFilesExtension(), slot_export(), and slot_exportToClipBoard().
|
private |
Definition at line 79 of file exportdialog.h.
Referenced by initDiagramsListPart().
|
private |
Definition at line 77 of file exportdialog.h.
Referenced by initDiagramsListPart().
|
private |
Definition at line 85 of file exportdialog.h.
Referenced by ExportDialog(), and initDiagramsListPart().
|
private |
Definition at line 80 of file exportdialog.h.
Referenced by initDiagramsListPart().
|
private |
Definition at line 81 of file exportdialog.h.
Referenced by initDiagramsListPart().
|
private |
Definition at line 73 of file exportdialog.h.
Referenced by ExportDialog().
|
private |
Definition at line 78 of file exportdialog.h.
Referenced by initDiagramsListPart().