mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 22:00:35 +01:00
Ajout de boutons "Cocher tout" et "Decocher tout" dans l'apercu avant impression
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@837 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -148,6 +148,20 @@ void QETPrintPreviewDialog::zoomOut() {
|
||||
updateZoomList();
|
||||
}
|
||||
|
||||
/**
|
||||
Selectionne tous les schemas
|
||||
*/
|
||||
void QETPrintPreviewDialog::selectAllDiagrams() {
|
||||
diagrams_list_ -> setSelectedAllDiagrams(true);
|
||||
}
|
||||
|
||||
/**
|
||||
Deselectionne tous les schemas
|
||||
*/
|
||||
void QETPrintPreviewDialog::selectNoDiagram() {
|
||||
diagrams_list_ -> setSelectedAllDiagrams(false);
|
||||
}
|
||||
|
||||
/**
|
||||
Met en place le dialogue
|
||||
*/
|
||||
@@ -155,6 +169,8 @@ void QETPrintPreviewDialog::build() {
|
||||
preview_ = new QPrintPreviewWidget(printer_);
|
||||
diagrams_label_ = new QLabel(tr("Sch\351mas \340 imprimer\240:"));
|
||||
diagrams_list_ = new DiagramsChooser(project_);
|
||||
diagrams_select_all_ = new QPushButton(tr("Tout cocher"));
|
||||
diagrams_select_none_ = new QPushButton(tr("Tout d\351cocher"));
|
||||
toggle_diagrams_list_ = new QAction(QET::Icons::Diagram, tr("Cacher la liste des sch\351mas"), this);
|
||||
toggle_print_options_ = new QAction(QET::Icons::Configure, tr("Cacher les options d'impression"), this);
|
||||
adjust_width_ = new QAction(QET::Icons::ViewFitWidth, tr("Ajuster la largeur"), this);
|
||||
@@ -245,6 +261,8 @@ void QETPrintPreviewDialog::build() {
|
||||
buttons_ -> addButton(new QPushButton(QET::Icons::DocumentPrint, tr("Imprimer")), QDialogButtonBox::AcceptRole);
|
||||
buttons_ -> addButton(QDialogButtonBox::Cancel);
|
||||
|
||||
connect(diagrams_select_all_, SIGNAL(released()), this, SLOT(selectAllDiagrams()));
|
||||
connect(diagrams_select_none_, SIGNAL(released()), this, SLOT(selectNoDiagram()));
|
||||
connect(toggle_diagrams_list_, SIGNAL(toggled(bool)), this, SLOT(setDiagramsListVisible(bool)));
|
||||
connect(toggle_print_options_, SIGNAL(toggled(bool)), this, SLOT(setPrintOptionsVisible(bool)));
|
||||
connect(adjust_width_, SIGNAL(triggered()), preview_, SLOT(fitToWidth()));
|
||||
@@ -286,6 +304,8 @@ void QETPrintPreviewDialog::build() {
|
||||
|
||||
vlayout2_ -> addWidget(diagrams_label_);
|
||||
vlayout2_ -> addWidget(diagrams_list_);
|
||||
vlayout2_ -> addWidget(diagrams_select_all_);
|
||||
vlayout2_ -> addWidget(diagrams_select_none_);
|
||||
|
||||
hlayout0_ -> addLayout(vlayout2_);
|
||||
hlayout0_ -> addWidget(preview_);
|
||||
|
||||
@@ -57,6 +57,8 @@ class QETPrintPreviewDialog : public QDialog {
|
||||
void fitDiagramToPage(bool);
|
||||
void zoomIn();
|
||||
void zoomOut();
|
||||
void selectAllDiagrams();
|
||||
void selectNoDiagram();
|
||||
|
||||
// attributs
|
||||
private:
|
||||
@@ -70,6 +72,8 @@ class QETPrintPreviewDialog : public QDialog {
|
||||
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_;
|
||||
|
||||
Reference in New Issue
Block a user