[qet] [2861] ExportDialog: Add buttons for SelectAll and De-Select All

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


Revision: 2861
Author:   abhishekm71
Date:     2014-02-17 12:11:06 +0100 (Mon, 17 Feb 2014)
Log Message:
-----------
ExportDialog: Add buttons for SelectAll and De-Select All

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

Modified: trunk/sources/exportdialog.cpp
===================================================================
--- trunk/sources/exportdialog.cpp	2014-02-16 12:34:30 UTC (rev 2860)
+++ trunk/sources/exportdialog.cpp	2014-02-17 11:11:06 UTC (rev 2861)
@@ -70,8 +70,21 @@
 	export_button -> setText(tr("Exporter"));
 	
 	// disposition des elements
+
+	QHBoxLayout *hLayout = new QHBoxLayout();
+	hLayout -> addWidget(new QLabel(tr("Choisissez les sch\351mas que vous d\351sirez exporter ainsi que leurs dimensions :")));
+	selectAll   = new QPushButton();
+	deSelectAll = new QPushButton();
+	selectAll   -> setText(tr("Select All"));
+	deSelectAll -> setText(tr("De-Select All"));
+	hLayout -> addWidget(selectAll);
+	hLayout -> addWidget(deSelectAll);
+	connect(selectAll,   SIGNAL(clicked()),            this, SLOT(slot_selectAllClicked()));
+	connect(deSelectAll, SIGNAL(clicked()),            this, SLOT(slot_deSelectAllClicked()));
+
+
 	QVBoxLayout *layout = new QVBoxLayout(this);
-	layout -> addWidget(new QLabel(tr("Choisissez les sch\351mas que vous d\351sirez exporter ainsi que leurs dimensions :")));
+	layout -> addLayout(hLayout);
 	layout -> addWidget(initDiagramsListPart(), 1);
 	layout -> addWidget(epw);
 	layout -> addWidget(buttons);
@@ -170,6 +183,20 @@
 	return(scroll_diagrams_list);
 }
 
+void ExportDialog::slot_selectAllClicked() {
+	foreach (ExportDiagramLine *diagramLine, diagram_lines_) {
+		diagramLine -> must_export -> setChecked(true);
+	}
+}
+
+void ExportDialog::slot_deSelectAllClicked() {
+	foreach (ExportDiagramLine *diagramLine, diagram_lines_) {
+		diagramLine -> must_export -> setChecked(false);
+	}
+}
+
+
+
 /**
 	@param diagram Un schema
 	@return le rapport largeur / hauteur du schema

Modified: trunk/sources/exportdialog.h
===================================================================
--- trunk/sources/exportdialog.h	2014-02-16 12:34:30 UTC (rev 2860)
+++ trunk/sources/exportdialog.h	2014-02-17 11:11:06 UTC (rev 2861)
@@ -68,6 +68,10 @@
 	QGridLayout *diagrams_list_layout_;
 	ExportPropertiesWidget *epw;
 	QDialogButtonBox *buttons;
+
+	QPushButton *selectAll;
+	QPushButton *deSelectAll;
+
 	// mappers
 	QSignalMapper *preview_mapper_;
 	QSignalMapper *width_mapper_;
@@ -104,5 +108,7 @@
 	void slot_changeFilesExtension(bool = false);
 	void slot_previewDiagram(int);
 	void slot_exportToClipBoard(int);
+	void slot_selectAllClicked();
+	void slot_deSelectAllClicked();
 };
 #endif


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