QElectroTech  0.70
Public Slots | Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
QETPrintPreviewDialog Class Reference

#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
 
DiagramsChooserdiagramsChooser ()
 
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

QETProjectproject_
 
QPrinter * printer_
 
QHBoxLayout * hlayout0_
 
QVBoxLayout * vlayout0_
 
QVBoxLayout * vlayout1_
 
QVBoxLayout * vlayout2_
 
QToolBar * toolbar_
 
QPrintPreviewWidget * preview_
 
QLabel * diagrams_label_
 
DiagramsChooserdiagrams_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_
 
ExportPropertiesWidgetrender_properties_
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ QETPrintPreviewDialog() [1/2]

QETPrintPreviewDialog::QETPrintPreviewDialog ( QETProject project,
QPrinter *  printer,
QWidget *  widget = nullptr,
Qt::WindowFlags  f = nullptr 
)

Constructeur

Parameters
projectProjet a imprimer
printerImprimante a utiliser pour
widgetWidget parent
fFlags 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.

◆ ~QETPrintPreviewDialog()

QETPrintPreviewDialog::~QETPrintPreviewDialog ( )
override

Destructeur

Definition at line 53 of file qetprintpreviewdialog.cpp.

◆ QETPrintPreviewDialog() [2/2]

QETPrintPreviewDialog::QETPrintPreviewDialog ( const QETPrintPreviewDialog )
private

Member Function Documentation

◆ build()

void QETPrintPreviewDialog::build ( )
private

◆ checkDiagramsCount

void QETPrintPreviewDialog::checkDiagramsCount ( )
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()

DiagramsChooser * QETPrintPreviewDialog::diagramsChooser ( )
Returns
le widget permettant de choisir les schemas a imprimer.

Definition at line 59 of file qetprintpreviewdialog.cpp.

References diagrams_list_.

Referenced by DiagramPrintDialog::exec().

◆ exportProperties()

ExportProperties QETPrintPreviewDialog::exportProperties ( ) const
Returns
les options de rendu definies par l'utilisateur

Definition at line 73 of file qetprintpreviewdialog.cpp.

References render_properties_.

Referenced by DiagramPrintDialog::exec(), and requestPaint().

◆ firstPage

void QETPrintPreviewDialog::firstPage ( )
slot

Passe a la premiere page

Definition at line 80 of file qetprintpreviewdialog.cpp.

References preview_.

Referenced by build().

◆ fitDiagramsToPages()

bool QETPrintPreviewDialog::fitDiagramsToPages ( ) const
Returns
true si l'option "Adapter le schema a la page" est activee

Definition at line 66 of file qetprintpreviewdialog.cpp.

References fit_diagram_to_page_.

Referenced by DiagramPrintDialog::exec().

◆ fitDiagramToPage

void QETPrintPreviewDialog::fitDiagramToPage ( bool  fit_diagram)
slot

Fait tenir ou non chaque schema sur une page

Parameters
fit_diagramtrue pour adapter chaque schema sur une page, false sinon

Definition at line 132 of file qetprintpreviewdialog.cpp.

References preview_, and updateZoomList().

Referenced by build().

◆ lastPage

void QETPrintPreviewDialog::lastPage ( )
slot

Passe a la derniere page

Definition at line 103 of file qetprintpreviewdialog.cpp.

References preview_.

Referenced by build().

◆ nextPage

void QETPrintPreviewDialog::nextPage ( )
slot

Passe a la page suivante

Definition at line 95 of file qetprintpreviewdialog.cpp.

References preview_.

Referenced by build().

◆ pageSetup

void QETPrintPreviewDialog::pageSetup ( )
slot

Copnfigure la mise en page

Definition at line 110 of file qetprintpreviewdialog.cpp.

References preview_, printer_, and updateZoomList().

Referenced by build().

◆ paintRequested

void QETPrintPreviewDialog::paintRequested ( const QList< Diagram *> &  ,
bool  ,
const ExportProperties  ,
QPrinter *   
)
signal

◆ previousPage

void QETPrintPreviewDialog::previousPage ( )
slot

Passe a la page precedente

Definition at line 87 of file qetprintpreviewdialog.cpp.

References preview_.

Referenced by build().

◆ requestPaint

void QETPrintPreviewDialog::requestPaint ( QPrinter *  printer)
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().

◆ selectAllDiagrams

void QETPrintPreviewDialog::selectAllDiagrams ( )
slot

Selectionne tous les schemas

Definition at line 157 of file qetprintpreviewdialog.cpp.

References diagrams_list_.

Referenced by build().

◆ selectNoDiagram

void QETPrintPreviewDialog::selectNoDiagram ( )
slot

Deselectionne tous les schemas

Definition at line 164 of file qetprintpreviewdialog.cpp.

References diagrams_list_.

Referenced by build().

◆ setDiagramsListVisible

void QETPrintPreviewDialog::setDiagramsListVisible ( bool  display)
privateslot

Ce slot prive affiche ou cache la liste des schemas

Parameters
displaytrue 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().

◆ setPrintOptionsVisible

void QETPrintPreviewDialog::setPrintOptionsVisible ( bool  display)
privateslot

Ce slot prive affiche ou cache les options d'impression

Parameters
displaytrue 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().

◆ updatePreviewZoom

void QETPrintPreviewDialog::updatePreviewZoom ( )
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().

◆ updateZoomList

void QETPrintPreviewDialog::updateZoomList ( )
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().

◆ useFullPage

void QETPrintPreviewDialog::useFullPage ( bool  full_page)
slot

Utilise ou non toute la page sans teni compte des marges

Parameters
full_pagetrue pour utiliser toute la page, false sinon

Definition at line 122 of file qetprintpreviewdialog.cpp.

References preview_, printer_, and updateZoomList().

Referenced by build().

◆ zoomIn

void QETPrintPreviewDialog::zoomIn ( )
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().

◆ zoomOut

void QETPrintPreviewDialog::zoomOut ( )
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().

Member Data Documentation

◆ adjust_page_

QAction* QETPrintPreviewDialog::adjust_page_
private

Definition at line 84 of file qetprintpreviewdialog.h.

Referenced by build().

◆ adjust_width_

QAction* QETPrintPreviewDialog::adjust_width_
private

Definition at line 83 of file qetprintpreviewdialog.h.

Referenced by build().

◆ all_pages_view_

QAction* QETPrintPreviewDialog::all_pages_view_
private

Definition at line 94 of file qetprintpreviewdialog.h.

Referenced by build().

◆ buttons_

QDialogButtonBox* QETPrintPreviewDialog::buttons_
private

Definition at line 98 of file qetprintpreviewdialog.h.

Referenced by build(), and checkDiagramsCount().

◆ diagrams_label_

QLabel* QETPrintPreviewDialog::diagrams_label_
private

Definition at line 77 of file qetprintpreviewdialog.h.

Referenced by build(), and setDiagramsListVisible().

◆ diagrams_list_

DiagramsChooser* QETPrintPreviewDialog::diagrams_list_
private

◆ diagrams_select_all_

QPushButton* QETPrintPreviewDialog::diagrams_select_all_
private

Definition at line 79 of file qetprintpreviewdialog.h.

Referenced by build(), and setDiagramsListVisible().

◆ diagrams_select_none_

QPushButton* QETPrintPreviewDialog::diagrams_select_none_
private

Definition at line 80 of file qetprintpreviewdialog.h.

Referenced by build(), and setDiagramsListVisible().

◆ facing_pages_view_

QAction* QETPrintPreviewDialog::facing_pages_view_
private

Definition at line 95 of file qetprintpreviewdialog.h.

Referenced by build().

◆ first_page_

QAction* QETPrintPreviewDialog::first_page_
private

Definition at line 90 of file qetprintpreviewdialog.h.

Referenced by build().

◆ fit_diagram_to_page_

QCheckBox* QETPrintPreviewDialog::fit_diagram_to_page_
private

Definition at line 102 of file qetprintpreviewdialog.h.

Referenced by build(), fitDiagramsToPages(), and requestPaint().

◆ fit_diagram_to_page_label_

QLabel* QETPrintPreviewDialog::fit_diagram_to_page_label_
private

Definition at line 103 of file qetprintpreviewdialog.h.

Referenced by build().

◆ hlayout0_

QHBoxLayout* QETPrintPreviewDialog::hlayout0_
private

Definition at line 71 of file qetprintpreviewdialog.h.

Referenced by build().

◆ landscape_

QAction* QETPrintPreviewDialog::landscape_
private

Definition at line 88 of file qetprintpreviewdialog.h.

Referenced by build().

◆ last_page_

QAction* QETPrintPreviewDialog::last_page_
private

Definition at line 93 of file qetprintpreviewdialog.h.

Referenced by build().

◆ next_page_

QAction* QETPrintPreviewDialog::next_page_
private

Definition at line 92 of file qetprintpreviewdialog.h.

Referenced by build().

◆ page_setup_

QAction* QETPrintPreviewDialog::page_setup_
private

Definition at line 97 of file qetprintpreviewdialog.h.

Referenced by build().

◆ portrait_

QAction* QETPrintPreviewDialog::portrait_
private

Definition at line 89 of file qetprintpreviewdialog.h.

Referenced by build().

◆ preview_

QPrintPreviewWidget* QETPrintPreviewDialog::preview_
private

◆ previous_page_

QAction* QETPrintPreviewDialog::previous_page_
private

Definition at line 91 of file qetprintpreviewdialog.h.

Referenced by build().

◆ print_options_box_

QGroupBox* QETPrintPreviewDialog::print_options_box_
private

Definition at line 99 of file qetprintpreviewdialog.h.

Referenced by build(), and setPrintOptionsVisible().

◆ printer_

QPrinter* QETPrintPreviewDialog::printer_
private

Definition at line 70 of file qetprintpreviewdialog.h.

Referenced by build(), pageSetup(), and useFullPage().

◆ project_

QETProject* QETPrintPreviewDialog::project_
private

Definition at line 69 of file qetprintpreviewdialog.h.

Referenced by build().

◆ render_properties_

ExportPropertiesWidget* QETPrintPreviewDialog::render_properties_
private

◆ single_page_view_

QAction* QETPrintPreviewDialog::single_page_view_
private

Definition at line 96 of file qetprintpreviewdialog.h.

Referenced by build().

◆ toggle_diagrams_list_

QAction* QETPrintPreviewDialog::toggle_diagrams_list_
private

Definition at line 81 of file qetprintpreviewdialog.h.

Referenced by build(), and setDiagramsListVisible().

◆ toggle_print_options_

QAction* QETPrintPreviewDialog::toggle_print_options_
private

Definition at line 82 of file qetprintpreviewdialog.h.

Referenced by build(), and setPrintOptionsVisible().

◆ toolbar_

QToolBar* QETPrintPreviewDialog::toolbar_
private

Definition at line 75 of file qetprintpreviewdialog.h.

Referenced by build().

◆ use_full_page_

QCheckBox* QETPrintPreviewDialog::use_full_page_
private

Definition at line 100 of file qetprintpreviewdialog.h.

Referenced by build().

◆ use_full_page_label_

QLabel* QETPrintPreviewDialog::use_full_page_label_
private

Definition at line 101 of file qetprintpreviewdialog.h.

Referenced by build().

◆ vlayout0_

QVBoxLayout* QETPrintPreviewDialog::vlayout0_
private

Definition at line 72 of file qetprintpreviewdialog.h.

Referenced by build().

◆ vlayout1_

QVBoxLayout* QETPrintPreviewDialog::vlayout1_
private

Definition at line 73 of file qetprintpreviewdialog.h.

Referenced by build().

◆ vlayout2_

QVBoxLayout* QETPrintPreviewDialog::vlayout2_
private

Definition at line 74 of file qetprintpreviewdialog.h.

Referenced by build().

◆ zoom_box_

QComboBox* QETPrintPreviewDialog::zoom_box_
private

Definition at line 86 of file qetprintpreviewdialog.h.

Referenced by build(), updatePreviewZoom(), and updateZoomList().

◆ zoom_in_

QAction* QETPrintPreviewDialog::zoom_in_
private

Definition at line 85 of file qetprintpreviewdialog.h.

Referenced by build().

◆ zoom_out_

QAction* QETPrintPreviewDialog::zoom_out_
private

Definition at line 87 of file qetprintpreviewdialog.h.

Referenced by build().


The documentation for this class was generated from the following files: