From 801d1acaaaa2a56a2df305f8f2a186f634f33a8c Mon Sep 17 00:00:00 2001 From: xavierqet Date: Sun, 24 Feb 2008 20:13:45 +0000 Subject: [PATCH] Amelioration du support de l'impression git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@301 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- diagramprintdialog.cpp | 300 +++++++++++++++++++++++++++++++++++++++++ diagramprintdialog.h | 71 ++++++++++ diagramview.cpp | 36 ++--- lang/qet_en.qm | Bin 53947 -> 54555 bytes lang/qet_en.ts | 79 ++++++++--- qelectrotech.pro | 2 + 6 files changed, 445 insertions(+), 43 deletions(-) create mode 100644 diagramprintdialog.cpp create mode 100644 diagramprintdialog.h diff --git a/diagramprintdialog.cpp b/diagramprintdialog.cpp new file mode 100644 index 000000000..a7b0737d4 --- /dev/null +++ b/diagramprintdialog.cpp @@ -0,0 +1,300 @@ +/* + Copyright 2006-2007 Xavier Guerrin + 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 . +*/ +#include "diagramprintdialog.h" +#include + +/** + Constructeur + @param dia Schema a imprimer + @param printer Imprimante a utiliser + @param parent Widget parent du dialogue +*/ +DiagramPrintDialog::DiagramPrintDialog(Diagram *dia, QWidget *parent) : + QWidget(parent), + diagram(dia), + dialog(0) +{ + // initialise l'imprimante + printer = new QPrinter(); +} + +/** + Destructeur +*/ +DiagramPrintDialog::~DiagramPrintDialog() { + delete dialog; + delete printer; +} + +/** + Definit le nom du PDF si l'utilisateur choisit une sortie vers un PDF +*/ +void DiagramPrintDialog::setPDFName(const QString &name) { + pdf_name = name; +} + +/** + @return le nom du PDF +*/ +QString DiagramPrintDialog::PDFName() const { + return(pdf_name); +} + +/** + Execute le dialogue d'impression +*/ +void DiagramPrintDialog::exec() { + + // affichage du dialogue d'impression standard + QPrintDialog print_dialog(printer); + print_dialog.setEnabledOptions(QAbstractPrintDialog::PrintToFile); + if (!pdf_name.isEmpty()) printer -> setOutputFileName(pdf_name); + if (print_dialog.exec() == QDialog::Rejected) return; + + /* + Apres l'execution de ce premier dialogue, on connait le format papier a + utiliser, son orientation et on est sur que tout cela est supporte par + l'imprimante. + On peut donc en deduire le nombre de pages a imprimer + */ + + // affichage d'un second dialogue, non standard, pour connaitre les pages a imprimer + buildDialog(); + if (dialog -> exec() == QDialog::Rejected) return; + + // effectue l'impression en elle-meme + print(); +} + +/** + @param fullPage true pour utiliser toute la feuille dans le calcul + @return Le nombre de pages necessaires pour imprimer le schema + avec l'orientation et le format papier utilise dans l'imprimante en cours. +*/ +int DiagramPrintDialog::pagesCount(bool fullpage) const { + return(horizontalPagesCount(fullpage) * verticalPagesCount(fullpage)); +} + +/** + @param fullPage true pour utiliser toute la feuille dans le calcul + @return La largeur du "poster" en nombre de pages pour imprimer le schema + avec l'orientation et le format papier utilise dans l'imprimante en cours. +*/ +int DiagramPrintDialog::horizontalPagesCount(bool fullpage) const { + // note : pageRect et Paper Rect tiennent compte de l'orientation du papier + QRect printable_area = fullpage ? printer -> paperRect() : printer -> pageRect(); + QRect diagram_rect = diagram -> border().toRect(); + + int h_pages_count = ceil(qreal(diagram_rect.width()) / qreal(printable_area.width())); + return(h_pages_count); +} + +/** + @param fullPage true pour utiliser toute la feuille dans le calcul + @return La largeur du "poster" en nombre de pages pour imprimer le schema + avec l'orientation et le format papier utilise dans l'imprimante en cours. +*/ +int DiagramPrintDialog::verticalPagesCount(bool fullpage) const { + // note : pageRect et Paper Rect tiennent compte de l'orientation du papier + QRect printable_area = fullpage ? printer -> paperRect() : printer -> pageRect(); + QRect diagram_rect = diagram -> border().toRect(); + + int v_pages_count = ceil(qreal(diagram_rect.height()) / qreal(printable_area.height())); + return(v_pages_count); +} + +/** + Construit un dialogue non standard pour demander les pages a imprimer a l'utilisateur +*/ +void DiagramPrintDialog::buildDialog() { + dialog = new QDialog(); + dialog -> setWindowTitle(tr("Options d'impression")); + options_label = new QLabel(); + use_full_page = new QCheckBox(tr("Utiliser toute la feuille")); + fit_diagram_to_page = new QCheckBox(tr("Adapter le sch\351ma \340 la page")); + range_from_label = new QLabel(tr("Plage de ")); + start_page = new QSpinBox(); + to_label = new QLabel(tr(" \340 ")); + end_page = new QSpinBox(); + buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); + + QHBoxLayout *pages_layout = new QHBoxLayout(); + pages_layout -> addWidget(range_from_label); + pages_layout -> addWidget(start_page); + pages_layout -> addWidget(to_label); + pages_layout -> addWidget(end_page); + + QVBoxLayout *dialog_layout = new QVBoxLayout(dialog); + dialog_layout -> addWidget(options_label); + dialog_layout -> addWidget(use_full_page); + dialog_layout -> addWidget(fit_diagram_to_page); + dialog_layout -> addLayout(pages_layout); + dialog_layout -> addStretch(); + dialog_layout -> addWidget(buttons); + + connect(use_full_page, SIGNAL(stateChanged(int)), this, SLOT(updateDialog())); + connect(fit_diagram_to_page, SIGNAL(stateChanged(int)), this, SLOT(updateDialog())); + connect(start_page, SIGNAL(valueChanged(int)), this, SLOT(checkStartPage())); + connect(end_page, SIGNAL(valueChanged(int)), this, SLOT(checkEndPage())); + connect(buttons, SIGNAL(accepted()), dialog, SLOT(accept())); + connect(buttons, SIGNAL(rejected()), dialog, SLOT(reject())); + + updateDialog(); +} + +/** + Assure la coherence du dialogue +*/ +void DiagramPrintDialog::updateDialog() { + int pages_count; + // si on adapte le schema a la page, alors il n'y a qu'une page a imprimer + if (fit_diagram_to_page -> isChecked()) { + pages_count = 1; + } else { + pages_count = pagesCount(use_full_page -> isChecked()); + } + options_label -> setText(tr("Nombre total de pages : ") + QString("%1").arg(pages_count)); + setPagesRangeVisible(pages_count > 1); + start_page -> setRange(1, pages_count); + end_page -> setRange(1, pages_count); + end_page -> setValue(pages_count); +} + +/** + S'assure que la premiere page ne soit pas superieure a la derniere page +*/ +void DiagramPrintDialog::checkStartPage() { + if (start_page -> value() > end_page -> value()) { + start_page -> blockSignals(true); + start_page -> setValue(end_page -> value()); + start_page -> blockSignals(false); + } +} + +/** + S'assure que la derniere page ne soit pas inferieure a la premiere page +*/ +void DiagramPrintDialog::checkEndPage() { + if (end_page -> value() < start_page -> value()) { + end_page -> blockSignals(true); + end_page -> setValue(start_page -> value()); + end_page -> blockSignals(false); + } +} + +/** + @param visible true pour afficher les pages, false sinon +*/ +void DiagramPrintDialog::setPagesRangeVisible(bool visible) { + range_from_label -> setVisible(visible); + start_page -> setVisible(visible); + to_label -> setVisible(visible); + end_page -> setVisible(visible); +} + +/** + Effectue l'impression elle-meme +*/ +void DiagramPrintDialog::print() { + // recupere les informations collectees dans le second dialogue + bool full_page = use_full_page -> isChecked(); + bool fit_page = fit_diagram_to_page -> isChecked(); + int first_page = start_page -> value(); + int last_page = end_page -> value(); + + // parametre l'imprimante + printer -> setFullPage(full_page); + + // QPainter utiliser pour effectuer le rendu + QPainter qp(printer); + + // impression physique (!= fichier PDF) + if (printer -> outputFileName().isEmpty()) { + // lorsqu'on imprime en paysage sur imprimante reelle, il faut pivoter soi-meme le rendu + if (printer -> orientation() == QPrinter::Landscape) { + qp.rotate(90.0); + qp.translate(0.0, -printer -> pageRect().height()); + } + } + + diagram -> setDisplayGrid(false); + diagram -> setDrawTerminals(false); + + if (fit_page) { + // impression adaptee sur une seule page + diagram -> render(&qp, QRectF(), diagram -> border(), Qt::KeepAspectRatio); + } else { + // impression sur une ou plusieurs pages + QRect diagram_rect = diagram -> border().toRect(); + QRect printed_area = full_page ? printer -> paperRect() : printer -> pageRect(); + int used_width = printed_area.width(); + int used_height = printed_area.height(); + int h_pages_count = horizontalPagesCount(full_page); + int v_pages_count = verticalPagesCount(full_page); + + QVector< QVector< QRect > > pages_grid; + // le schema est imprime sur une matrice de feuilles + // parcourt les lignes de la matrice + int y_offset = 0; + for (int i = 0 ; i < v_pages_count ; ++ i) { + pages_grid << QVector< QRect >(); + + // parcourt les feuilles de la ligne + int x_offset = 0; + for (int j = 0 ; j < h_pages_count ; ++ j) { + pages_grid.last() << QRect( + QPoint(x_offset, y_offset), + QSize( + qMin(used_width, diagram_rect.width() - x_offset), + qMin(used_height, diagram_rect.height() - y_offset) + ) + ); + x_offset += used_width; + } + + y_offset += used_height; + } + + // ne retient que les pages a imprimer + QVector pages_to_print; + for (int i = 0 ; i < v_pages_count ; ++ i) { + for (int j = 0 ; j < h_pages_count ; ++ j) { + int page_number = (i * h_pages_count) + j + 1; + if (page_number >= first_page && page_number <= last_page) { + pages_to_print << pages_grid.at(i).at(j); + } + } + } + + // parcourt les pages pour impression + for (int i = 0 ; i < pages_to_print.count() ; ++ i) { + QRect current_rect(pages_to_print.at(i)); + diagram -> render( + &qp, + QRect(QPoint(0,0), current_rect.size()), + current_rect.translated(diagram_rect.topLeft()), + Qt::KeepAspectRatio + ); + if (i != pages_to_print.count() - 1) { + printer -> newPage(); + } + } + } + diagram -> setDrawTerminals(true); + diagram -> setDisplayGrid(true); +} diff --git a/diagramprintdialog.h b/diagramprintdialog.h new file mode 100644 index 000000000..bbc7bb127 --- /dev/null +++ b/diagramprintdialog.h @@ -0,0 +1,71 @@ +/* + Copyright 2006-2007 Xavier Guerrin + 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 . + +*/ +#ifndef DIAGRAM_PRINT_DIALOG_H +#define DIAGRAM_PRINT_DIALOG_H +#include +#include "diagram.h" +/** + Cette classe represente le dialogue de configuration de l'impression d'un + schema electrique. + Elle se charge egalement de l'impression elle-meme +*/ +class DiagramPrintDialog : public QWidget { + Q_OBJECT + // Constructeurs, destructeur + public: + DiagramPrintDialog(Diagram *, QWidget * = 0); + virtual ~DiagramPrintDialog(); + private: + DiagramPrintDialog(const DiagramPrintDialog &); + + // methodes + public: + void setPDFName(const QString &); + QString PDFName() const; + int pagesCount(bool = false) const; + int horizontalPagesCount(bool = false) const; + int verticalPagesCount(bool = false) const; + void exec(); + + private: + void buildDialog(); + void print(); + + private slots: + void updateDialog(); + void checkStartPage(); + void checkEndPage(); + void setPagesRangeVisible(bool); + + // attributs + private: + Diagram *diagram; + QPrinter *printer; + QString pdf_name; + QDialog *dialog; + QLabel *options_label; + QLabel *range_from_label; + QLabel *to_label; + QCheckBox *use_full_page; + QCheckBox *fit_diagram_to_page; + QSpinBox *start_page; + QSpinBox *end_page; + QDialogButtonBox *buttons; +}; +#endif diff --git a/diagramview.cpp b/diagramview.cpp index 0c6479f0d..2fd71a8b6 100644 --- a/diagramview.cpp +++ b/diagramview.cpp @@ -19,6 +19,7 @@ #include "diagram.h" #include "customelement.h" #include "exportdialog.h" +#include "diagramprintdialog.h" #include "conductor.h" #include "diagramcommands.h" #include "conductorpropertieswidget.h" @@ -530,31 +531,20 @@ void DiagramView::dialogExport() { Imprime le schema. */ void DiagramView::dialogPrint() { - // initialise l'acces a l'imprimante - QPrinter qprin; -#ifndef Q_OS_WIN32 - qprin.setOutputFormat(QPrinter::PdfFormat); -#endif - qprin.setOrientation(QPrinter::Landscape); - qprin.setPageSize(QPrinter::A4); - QPrintDialog qpd(&qprin, this); - if (qpd.exec() == QDialog::Accepted) { - QPainter qp(&qprin); - // impression physique (!= fichier PDF) - if (qprin.outputFileName().isEmpty()) { - // lorsqu'on imprime en paysage sur imprimante reelle, il faut pivoter soi-meme le rendu - if (qprin.orientation() == QPrinter::Landscape) { - qp.rotate(90.0); - qp.translate(0.0, -qprin.pageRect().height()); - } - } - scene -> setDisplayGrid(false); - scene -> setDrawTerminals(false); - scene -> render(&qp, QRectF(), scene -> border(), Qt::KeepAspectRatio); - scene -> setDrawTerminals(true); - scene -> setDisplayGrid(true); + // determine un nom possible pour le pdf + QString pdf_file_name; + if (!file_name.isEmpty()) { + pdf_file_name = file_name; + pdf_file_name.replace(QRegExp("\\.qet$", Qt::CaseInsensitive), ""); + } else { + pdf_file_name = QDir::homePath() + tr("schema"); } + pdf_file_name += ".pdf"; + + DiagramPrintDialog print_dialog(scene, this); + print_dialog.setPDFName(pdf_file_name); + print_dialog.exec(); } /** diff --git a/lang/qet_en.qm b/lang/qet_en.qm index 8f757a4b5bafdd1e8271aeaf680850bad759b3ad..36242c39ff97546f87e4dc4b1a9fd7b8ada69c60 100644 GIT binary patch delta 4898 zcmZ|T2T)Yk8VB(ImV58^wSkHyi#^7MB^tznsL=!w3n*9-5l{rA8A)VOK?N1XjRkCA z7XeY!haJI&y+osVwpgA$8jVpjlJ{Tt&YR4eaUAD&zBBip^PTUUbJua-2Gxo@m6J!w z_&O(_uUvA*wf>>8xd(3a0;*TbbV{_gu>eYUz0uJ%JE&L328dN~O{oq@K4@v5SlWa3pZBEC9BN$AZ|^}s6NvsTyyzVC4`*VU-SFPX z#c3X3aOG=2`x*Soo6@83&+J5BS{)7D5cuzB1$5gGxSKENZc(mYUl)PLW2ld862g2q zfW8pn_6hX=c4(-Mm@3AGUb4|hc({ad77{B`=@lfN+W;7yWW8jq5prWWQifjT0~J_W zFcdHi$ErcM=}~OF&C;5`mYsv<^K zOjY$$ndo&@zXSu&cA4x$mCx>bK)Y@#e^(yjb``4OgSeG$9;z{q%7FG0RAZjlU8PF5 zrg5P5r&KFD)TeJ9b{MGIeBKx6kf+MCm%3wuYI_AU?D(r{|3Nj-$zAo-(Q4ziJM^mBB-H@AbW}U3189M|>7q5jSEAbO3di{>QQaqphx4n`YHPq7 z4(MJ-9h%J3?;fg7_=W?zm#P!CGsCX6)YC+}zUtZM`C`{O>IK8&>3;RrjN5>RQML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;vM2XX!j_o)#Q85>p!wl4_P+F_W`pty(NSwnd;q5RM93)+oxGX z`ktB>lh?t;nsVH_Pf06Ld7^gUtr0{OlSQ{`9nN6|6&JNG zFA-4XOs(sgn=n=MU+vhvnBb?`+HqU9z;^AV2l)NeWbKSkPOwGmbE1>zbT923FT4>? z|Dg@4L7-K0v_ZP-ax_}CK?cuQYQqjl;XG~FovtuVyTK9xp1Gop=HC!i@6^URBarGp zv~j^1L^a=Ow|}yNRoV + AboutQET @@ -45,7 +46,7 @@ © 2006-2008 Les développeurs de QElectroTech - © 2006-2008 QElectroTech developers + © 2006-2008 QElectroTech developers @@ -218,103 +219,141 @@ Configure QElectroTech + + DiagramPrintDialog + + + Options d'impression + Print options + + + + Utiliser toute la feuille + Use full page + + + + Adapter le schéma à la page + Fit diagram to page + + + + Plage de + Range from + + + + à + to + + + + Nombre total de pages : + Total pages count: + + DiagramView - + ? ? - + Enregistrer le schéma en cours ? Save the current diagram ? - + Enregistrer sous Save as - + Erreur Error - + Impossible d'ecrire dans ce fichier Can't write to the file - + Schéma QElectroTech (*.qet) QElectroTech Diagram (*.qet) - + Voulez-vous enregistrer le schéma Do you wish to save the diagram - + nouveau schéma new diagram - + Éditer les propriétés d'un conducteur Edit conductor properties - + Propriétés du schéma Diagram properties - + Dimensions du schéma Diagram size - + Colonnes : Columns: - + × × - + px px - + Hauteur : Height: - + Éditer les propriétés par défaut des conducteurs Edit conductors default properties - + Coller ici Paste Here - + Avertissement Warning - + Ce document semble avoir été enregistré avec une version ultérieure de QElectroTech. Il est possible que l'ouverture de tout ou partie de ce document échoue. This document seems to have been saved by a more recent version of QElectroTech. The opening of the document may fail totally or partially. + + + schema + diagram + ElementDeleter diff --git a/qelectrotech.pro b/qelectrotech.pro index 09a5a7e0b..fc9a3bf08 100644 --- a/qelectrotech.pro +++ b/qelectrotech.pro @@ -50,6 +50,7 @@ HEADERS += aboutqet.h \ diagram.h \ diagramcommands.h \ diagramcontent.h \ + diagramprintdialog.h \ diagramview.h \ diagramtextitem.h \ element.h \ @@ -114,6 +115,7 @@ SOURCES += aboutqet.cpp \ diagram.cpp \ diagramcommands.cpp \ diagramcontent.cpp \ + diagramprintdialog.cpp \ diagramtextitem.cpp \ diagramview.cpp \ element.cpp \