diff --git a/sources/ui/dialogconductorautonum.cpp b/sources/ui/dialogconductorautonum.cpp
index 696fd140d..39babff2a 100644
--- a/sources/ui/dialogconductorautonum.cpp
+++ b/sources/ui/dialogconductorautonum.cpp
@@ -1,15 +1,37 @@
+/*
+ Copyright 2006-2013 The QElectroTech Team
+ This file is part of QElectroTech.
+
+ QElectroTech is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ QElectroTech is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with QElectroTech. If not, see .
+*/
#include "dialogconductorautonum.h"
#include "ui_dialogconductorautonum.h"
#include "conductorautonumerotation.h"
#include "qetmessagebox.h"
+
DialogConductorAutoNum::DialogConductorAutoNum(Diagram *dg, QWidget *parent) :
QDialog(parent),
ui(new Ui::DialogConductorAutoNum)
{
- ui->setupUi(this);
+ ui -> setupUi(this);
dg_ = dg;
+
+ // create widget of diagram selection
+ dgselect_ = new diagramselection( dg_ ->project(), this );
+ ui -> verticalLayout_Selection -> addWidget( dgselect_ );
}
DialogConductorAutoNum::~DialogConductorAutoNum()
@@ -17,27 +39,37 @@ DialogConductorAutoNum::~DialogConductorAutoNum()
delete ui;
}
+
/**
* @brief DialogConductorAutoNum::on_pushButton_delete_clicked
*/
void DialogConductorAutoNum::on_pushButton_delete_clicked() {
- // TODO check if project or diagram
- // ...
+ // get list of diagrams selected
+ QListlistDiag = dgselect_ ->list_of_DiagramSelected();
+ if(listDiag.count()<=0) return;
+
+ QString diagramsTitle;
+ for(int i=0; ititle();
+ if(i+1 title()),
+ tr("Voulez vraiment supprimer les annotations conducteurs de :\n\n%1 ?")
+ ).arg(diagramsTitle),
QMessageBox::Yes | QMessageBox::No,
QMessageBox::No
);
// if yes remove all
if( answer == QMessageBox::Yes) {
- ConductorAutoNumerotation can(dg_);
- can.removeNum_ofDiagram();
+ for(int i=0; i.
+*/
#ifndef DIALOGCONDUCTORAUTONUM_H
#define DIALOGCONDUCTORAUTONUM_H
#include
#include "diagram.h"
+#include "ui/diagramselection.h"
namespace Ui {
class DialogConductorAutoNum;
@@ -18,13 +36,14 @@ class DialogConductorAutoNum : public QDialog
~DialogConductorAutoNum();
private slots:
- void on_pushButton_delete_clicked();
-
+ void on_pushButton_delete_clicked();
void on_pushButton_close_clicked();
private:
Ui::DialogConductorAutoNum *ui;
Diagram *dg_;
+ diagramselection *dgselect_;
+
};
#endif // DIALOGCONDUCTORAUTONUM_H
diff --git a/sources/ui/dialogconductorautonum.ui b/sources/ui/dialogconductorautonum.ui
index 1c91e6690..3d31722dc 100644
--- a/sources/ui/dialogconductorautonum.ui
+++ b/sources/ui/dialogconductorautonum.ui
@@ -7,7 +7,7 @@
0
0
482
- 245
+ 382
@@ -27,25 +27,7 @@
-
-
-
-
-
-
- Numéroter le schéma actif
-
-
- true
-
-
-
- -
-
-
- Numéroter le projet actif entier
-
-
-
-
+
@@ -70,6 +52,14 @@
+ -
+
+
+
+ :/ico/16x16/configure.png:/ico/16x16/configure.png
+
+
+
@@ -121,6 +111,9 @@
Fermer
+
+ true
+