QElectroTech
0.70
|
#include <qetprintpreviewdialog.h>
Public Slots | |
void | firstPage () |
void | previousPage () |
void | nextPage () |
void | lastPage () |
void | pageSetup () |
void | useFullPage (bool) |
void | fitDiagramToPage (bool) |
void | zoomIn () |
void | zoomOut () |
void | selectAllDiagrams () |
void | selectNoDiagram () |
Signals | |
void | paintRequested (const QList< Diagram *> &, bool, const ExportProperties, QPrinter *) |
Public Member Functions | |
QETPrintPreviewDialog (QETProject *, QPrinter *, QWidget *=nullptr, Qt::WindowFlags=nullptr) | |
~QETPrintPreviewDialog () override | |
DiagramsChooser * | diagramsChooser () |
bool | fitDiagramsToPages () const |
ExportProperties | exportProperties () const |
Private Slots | |
void | requestPaint (QPrinter *) |
void | checkDiagramsCount () |
void | setDiagramsListVisible (bool) |
void | setPrintOptionsVisible (bool) |
void | updateZoomList () |
void | updatePreviewZoom () |
Private Member Functions | |
QETPrintPreviewDialog (const QETPrintPreviewDialog &) | |
void | build () |
Private Attributes | |
QETProject * | project_ |
QPrinter * | printer_ |
QHBoxLayout * | hlayout0_ |
QVBoxLayout * | vlayout0_ |
QVBoxLayout * | vlayout1_ |
QVBoxLayout * | vlayout2_ |
QToolBar * | toolbar_ |
QPrintPreviewWidget * | preview_ |
QLabel * | diagrams_label_ |
DiagramsChooser * | diagrams_list_ |
QPushButton * | diagrams_select_all_ |
QPushButton * | diagrams_select_none_ |
QAction * | toggle_diagrams_list_ |
QAction * | toggle_print_options_ |
QAction * | adjust_width_ |
QAction * | adjust_page_ |
QAction * | zoom_in_ |
QComboBox * | zoom_box_ |
QAction * | zoom_out_ |
QAction * | landscape_ |
QAction * | portrait_ |
QAction * | first_page_ |
QAction * | previous_page_ |
QAction * | next_page_ |
QAction * | last_page_ |
QAction * | all_pages_view_ |
QAction * | facing_pages_view_ |
QAction * | single_page_view_ |
QAction * | page_setup_ |
QDialogButtonBox * | buttons_ |
QGroupBox * | print_options_box_ |
QCheckBox * | use_full_page_ |
QLabel * | use_full_page_label_ |
QCheckBox * | fit_diagram_to_page_ |
QLabel * | fit_diagram_to_page_label_ |
ExportPropertiesWidget * | render_properties_ |
This class provides a dialog for users to refine printing options for a particular project by relying on a visual print preview.
Definition at line 34 of file qetprintpreviewdialog.h.
QETPrintPreviewDialog::QETPrintPreviewDialog | ( | QETProject * | project, |
QPrinter * | printer, | ||
QWidget * | widget = nullptr , |
||
Qt::WindowFlags | f = nullptr |
||
) |
Constructeur
project | Projet a imprimer |
printer | Imprimante a utiliser pour |
widget | Widget parent |
f | Flags passes au constructeur de QDialog puis QWidget |
Definition at line 35 of file qetprintpreviewdialog.cpp.
References build(), checkDiagramsCount(), diagrams_list_, paintRequested(), preview_, requestPaint(), and QET::Icons::tr.
|
override |
Destructeur
Definition at line 53 of file qetprintpreviewdialog.cpp.
|
private |
|
private |
Met en place le dialogue
Definition at line 171 of file qetprintpreviewdialog.cpp.
References adjust_page_, adjust_width_, all_pages_view_, QET::Icons::ArrowLeft, QET::Icons::ArrowLeftDouble, QET::Icons::ArrowRight, QET::Icons::ArrowRightDouble, buttons_, QET::Icons::Cancel, QET::Icons::Configure, ExportProperties::defaultPrintProperties(), QET::Icons::Diagram, diagrams_label_, diagrams_list_, diagrams_select_all_, diagrams_select_none_, QET::Icons::DocumentPrint, QET::Icons::DocumentPrintFrame, facing_pages_view_, first_page_, firstPage(), fit_diagram_to_page_, fit_diagram_to_page_label_, fitDiagramToPage(), hlayout0_, landscape_, last_page_, lastPage(), next_page_, nextPage(), page_setup_, pageSetup(), portrait_, preview_, previous_page_, previousPage(), print_options_box_, QET::Icons::PrintAllPages, printer_, QET::Icons::PrintLandscape, QET::Icons::PrintPortrait, QET::Icons::PrintTwoPages, project_, render_properties_, selectAllDiagrams(), selectNoDiagram(), setDiagramsListVisible(), setPrintOptionsVisible(), single_page_view_, QET::Icons::SinglePage, toggle_diagrams_list_, toggle_print_options_, toolbar_, QET::Icons::tr, updatePreviewZoom(), updateZoomList(), use_full_page_, use_full_page_label_, useFullPage(), QET::Icons::ViewFitWidth, QET::Icons::ViewFitWindow, vlayout0_, vlayout1_, vlayout2_, zoom_box_, zoom_in_, zoom_out_, zoomIn(), QET::Icons::ZoomIn, zoomOut(), and QET::Icons::ZoomOut.
Referenced by QETPrintPreviewDialog().
|
privateslot |
Ce slot prive verifie que le nombre de schemas a imprimer est bien superieur a 0 et active ou desactive le bouton "Imprimer" en consequence.
Definition at line 348 of file qetprintpreviewdialog.cpp.
References buttons_, and diagrams_list_.
Referenced by QETPrintPreviewDialog().
DiagramsChooser * QETPrintPreviewDialog::diagramsChooser | ( | ) |
Definition at line 59 of file qetprintpreviewdialog.cpp.
References diagrams_list_.
Referenced by DiagramPrintDialog::exec().
ExportProperties QETPrintPreviewDialog::exportProperties | ( | ) | const |
Definition at line 73 of file qetprintpreviewdialog.cpp.
References render_properties_.
Referenced by DiagramPrintDialog::exec(), and requestPaint().
|
slot |
Passe a la premiere page
Definition at line 80 of file qetprintpreviewdialog.cpp.
References preview_.
Referenced by build().
bool QETPrintPreviewDialog::fitDiagramsToPages | ( | ) | const |
Definition at line 66 of file qetprintpreviewdialog.cpp.
References fit_diagram_to_page_.
Referenced by DiagramPrintDialog::exec().
|
slot |
Fait tenir ou non chaque schema sur une page
fit_diagram | true pour adapter chaque schema sur une page, false sinon |
Definition at line 132 of file qetprintpreviewdialog.cpp.
References preview_, and updateZoomList().
Referenced by build().
|
slot |
Passe a la derniere page
Definition at line 103 of file qetprintpreviewdialog.cpp.
References preview_.
Referenced by build().
|
slot |
Passe a la page suivante
Definition at line 95 of file qetprintpreviewdialog.cpp.
References preview_.
Referenced by build().
|
slot |
Copnfigure la mise en page
Definition at line 110 of file qetprintpreviewdialog.cpp.
References preview_, printer_, and updateZoomList().
Referenced by build().
|
signal |
Referenced by QETPrintPreviewDialog(), and requestPaint().
|
slot |
Passe a la page precedente
Definition at line 87 of file qetprintpreviewdialog.cpp.
References preview_.
Referenced by build().
|
privateslot |
Ce slot prive emet le signal paintRequested avec : la liste des schemas a imprimer / selectionnes un booleen indiquant s'il faut adapter les schemas aux pages ou non l'imprimante a utiliser
Definition at line 333 of file qetprintpreviewdialog.cpp.
References diagrams_list_, exportProperties(), fit_diagram_to_page_, paintRequested(), and render_properties_.
Referenced by QETPrintPreviewDialog().
|
slot |
Selectionne tous les schemas
Definition at line 157 of file qetprintpreviewdialog.cpp.
References diagrams_list_.
Referenced by build().
|
slot |
Deselectionne tous les schemas
Definition at line 164 of file qetprintpreviewdialog.cpp.
References diagrams_list_.
Referenced by build().
|
privateslot |
Ce slot prive affiche ou cache la liste des schemas
display | true pour affiche la liste des schemas, false pour la cacher |
Definition at line 360 of file qetprintpreviewdialog.cpp.
References diagrams_label_, diagrams_list_, diagrams_select_all_, diagrams_select_none_, toggle_diagrams_list_, and QET::Icons::tr.
Referenced by build().
|
privateslot |
Ce slot prive affiche ou cache les options d'impression
display | true pour affiche les options d'impression, false pour les cacher |
Definition at line 378 of file qetprintpreviewdialog.cpp.
References print_options_box_, render_properties_, toggle_print_options_, and QET::Icons::tr.
Referenced by build().
|
privateslot |
Change le zoom de l'apercu en fonctiopn du contenu du zoom selectionne
Definition at line 422 of file qetprintpreviewdialog.cpp.
References preview_, updateZoomList(), and zoom_box_.
Referenced by build().
|
privateslot |
Met a jour la liste des zooms disponibles
Definition at line 392 of file qetprintpreviewdialog.cpp.
References preview_, QET::Icons::tr, and zoom_box_.
Referenced by build(), fitDiagramToPage(), pageSetup(), updatePreviewZoom(), useFullPage(), zoomIn(), and zoomOut().
|
slot |
Utilise ou non toute la page sans teni compte des marges
full_page | true pour utiliser toute la page, false sinon |
Definition at line 122 of file qetprintpreviewdialog.cpp.
References preview_, printer_, and updateZoomList().
Referenced by build().
|
slot |
Effectue l'action "zoom avant" sur l'apercu avant impression
Definition at line 141 of file qetprintpreviewdialog.cpp.
References preview_, and updateZoomList().
Referenced by build().
|
slot |
Effectue l'action "zoom arriere" sur l'apercu avant impression
Definition at line 149 of file qetprintpreviewdialog.cpp.
References preview_, and updateZoomList().
Referenced by build().
|
private |
Definition at line 84 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 83 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 94 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 98 of file qetprintpreviewdialog.h.
Referenced by build(), and checkDiagramsCount().
|
private |
Definition at line 77 of file qetprintpreviewdialog.h.
Referenced by build(), and setDiagramsListVisible().
|
private |
Definition at line 78 of file qetprintpreviewdialog.h.
Referenced by build(), checkDiagramsCount(), diagramsChooser(), QETPrintPreviewDialog(), requestPaint(), selectAllDiagrams(), selectNoDiagram(), and setDiagramsListVisible().
|
private |
Definition at line 79 of file qetprintpreviewdialog.h.
Referenced by build(), and setDiagramsListVisible().
|
private |
Definition at line 80 of file qetprintpreviewdialog.h.
Referenced by build(), and setDiagramsListVisible().
|
private |
Definition at line 95 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 90 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 102 of file qetprintpreviewdialog.h.
Referenced by build(), fitDiagramsToPages(), and requestPaint().
|
private |
Definition at line 103 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 71 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 88 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 93 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 92 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 97 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 89 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 76 of file qetprintpreviewdialog.h.
Referenced by build(), firstPage(), fitDiagramToPage(), lastPage(), nextPage(), pageSetup(), previousPage(), QETPrintPreviewDialog(), updatePreviewZoom(), updateZoomList(), useFullPage(), zoomIn(), and zoomOut().
|
private |
Definition at line 91 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 99 of file qetprintpreviewdialog.h.
Referenced by build(), and setPrintOptionsVisible().
|
private |
Definition at line 70 of file qetprintpreviewdialog.h.
Referenced by build(), pageSetup(), and useFullPage().
|
private |
Definition at line 69 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 104 of file qetprintpreviewdialog.h.
Referenced by build(), exportProperties(), requestPaint(), and setPrintOptionsVisible().
|
private |
Definition at line 96 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 81 of file qetprintpreviewdialog.h.
Referenced by build(), and setDiagramsListVisible().
|
private |
Definition at line 82 of file qetprintpreviewdialog.h.
Referenced by build(), and setPrintOptionsVisible().
|
private |
Definition at line 75 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 100 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 101 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 72 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 73 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 74 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 86 of file qetprintpreviewdialog.h.
Referenced by build(), updatePreviewZoom(), and updateZoomList().
|
private |
Definition at line 85 of file qetprintpreviewdialog.h.
Referenced by build().
|
private |
Definition at line 87 of file qetprintpreviewdialog.h.
Referenced by build().