/* 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); dg_ = dg; // create widget of diagram selection dgselect_ = new diagramselection( dg_ ->project(), this ); ui -> verticalLayout_Selection -> addWidget( dgselect_ ); } DialogConductorAutoNum::~DialogConductorAutoNum() { delete ui; } /** * @brief DialogConductorAutoNum::on_pushButton_delete_clicked */ void DialogConductorAutoNum::on_pushButton_delete_clicked() { // get list of diagrams selected QListlistDiag = dgselect_ ->list_of_DiagramSelected(); if(listDiag.count()<=0) return; QString diagramsTitle; for(int i=0; ititle(); if(i+1listDiag = dgselect_ ->list_of_DiagramSelected(); if(listDiag.count()<=0) return; QString diagramsTitle; for(int i=0; ititle(); if(i+1setNumerotation(Diagram::Conductors, num); qDebug() << "ok"; } } }