mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 22:00:35 +01:00
ExportDialog: Add buttons for SelectAll and De-Select All
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2861 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -70,8 +70,21 @@ ExportDialog::ExportDialog(QETProject *project, QWidget *parent) : QDialog(paren
|
||||
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 @@ QWidget *ExportDialog::initDiagramsListPart() {
|
||||
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
|
||||
|
||||
@@ -68,6 +68,10 @@ class ExportDialog : public QDialog {
|
||||
QGridLayout *diagrams_list_layout_;
|
||||
ExportPropertiesWidget *epw;
|
||||
QDialogButtonBox *buttons;
|
||||
|
||||
QPushButton *selectAll;
|
||||
QPushButton *deSelectAll;
|
||||
|
||||
// mappers
|
||||
QSignalMapper *preview_mapper_;
|
||||
QSignalMapper *width_mapper_;
|
||||
@@ -104,5 +108,7 @@ class ExportDialog : public QDialog {
|
||||
void slot_changeFilesExtension(bool = false);
|
||||
void slot_previewDiagram(int);
|
||||
void slot_exportToClipBoard(int);
|
||||
void slot_selectAllClicked();
|
||||
void slot_deSelectAllClicked();
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user