[qet] [837] Ajout de boutons "Cocher tout" et "Decocher tout" dans l' apercu avant impression

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 837
Author:   xavier
Date:     2010-01-10 16:07:06 +0100 (Sun, 10 Jan 2010)
Log Message:
-----------
Ajout de boutons "Cocher tout" et "Decocher tout" dans l'apercu avant impression

Modified Paths:
--------------
    trunk/sources/qetprintpreviewdialog.cpp
    trunk/sources/qetprintpreviewdialog.h

Modified: trunk/sources/qetprintpreviewdialog.cpp
===================================================================
--- trunk/sources/qetprintpreviewdialog.cpp	2010-01-10 03:13:28 UTC (rev 836)
+++ trunk/sources/qetprintpreviewdialog.cpp	2010-01-10 15:07:06 UTC (rev 837)
@@ -149,12 +149,28 @@
 }
 
 /**
+	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
 */
 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 @@
 	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 @@
 	
 	vlayout2_ -> addWidget(diagrams_label_);
 	vlayout2_ -> addWidget(diagrams_list_);
+	vlayout2_ -> addWidget(diagrams_select_all_);
+	vlayout2_ -> addWidget(diagrams_select_none_);
 	
 	hlayout0_ -> addLayout(vlayout2_);
 	hlayout0_ -> addWidget(preview_);

Modified: trunk/sources/qetprintpreviewdialog.h
===================================================================
--- trunk/sources/qetprintpreviewdialog.h	2010-01-10 03:13:28 UTC (rev 836)
+++ trunk/sources/qetprintpreviewdialog.h	2010-01-10 15:07:06 UTC (rev 837)
@@ -57,6 +57,8 @@
 	void fitDiagramToPage(bool);
 	void zoomIn();
 	void zoomOut();
+	void selectAllDiagrams();
+	void selectNoDiagram();
 	
 	// attributs
 	private:
@@ -70,6 +72,8 @@
 	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_;


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/