2007-12-01 10:47:15 +00:00
|
|
|
/*
|
2014-01-29 18:37:45 +00:00
|
|
|
Copyright 2006-2014 The QElectroTech Team
|
2007-12-01 10:47:15 +00:00
|
|
|
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 <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2007-08-28 21:17:11 +00:00
|
|
|
#ifndef ELEMENT_DELETER_H
|
|
|
|
#define ELEMENT_DELETER_H
|
|
|
|
#include "elementscategory.h"
|
2009-04-03 19:30:25 +00:00
|
|
|
#include "elementslocation.h"
|
2007-08-28 21:17:11 +00:00
|
|
|
#include <QtGui>
|
2007-10-10 17:50:26 +00:00
|
|
|
/**
|
2012-11-09 21:09:24 +00:00
|
|
|
This class provides an abstract way to delete an element from its parent
|
|
|
|
collection. Especially, it requires a confirmation from users.
|
2007-10-10 17:50:26 +00:00
|
|
|
*/
|
2007-08-28 21:17:11 +00:00
|
|
|
class ElementDeleter : public QWidget {
|
|
|
|
Q_OBJECT
|
2012-11-09 21:09:24 +00:00
|
|
|
// constructors, destructor
|
2007-08-28 21:17:11 +00:00
|
|
|
public:
|
2009-04-03 19:30:25 +00:00
|
|
|
ElementDeleter(const ElementsLocation &, QWidget * = 0);
|
2007-08-28 21:17:11 +00:00
|
|
|
virtual ~ElementDeleter();
|
|
|
|
private:
|
|
|
|
ElementDeleter(const ElementsCategory &);
|
|
|
|
|
2012-11-09 21:09:24 +00:00
|
|
|
// methods
|
2007-08-28 21:17:11 +00:00
|
|
|
public slots:
|
2009-04-03 19:30:25 +00:00
|
|
|
bool exec();
|
2007-08-28 21:17:11 +00:00
|
|
|
|
2012-11-09 21:09:24 +00:00
|
|
|
// attributes
|
2007-08-28 21:17:11 +00:00
|
|
|
private:
|
2009-04-03 19:30:25 +00:00
|
|
|
ElementsCollectionItem *element;
|
2007-08-28 21:17:11 +00:00
|
|
|
};
|
|
|
|
#endif
|