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-04-05 01:13:14 +00:00
|
|
|
#ifndef ELEMENTS_CATEGORY_EDITOR_H
|
|
|
|
#define ELEMENTS_CATEGORY_EDITOR_H
|
|
|
|
#include <QtGui>
|
2009-04-03 19:30:25 +00:00
|
|
|
#include "elementslocation.h"
|
2007-10-21 16:10:21 +00:00
|
|
|
class ElementsCategory;
|
|
|
|
class NamesListWidget;
|
2009-04-03 19:30:25 +00:00
|
|
|
class QFileNameEdit;
|
2007-04-05 18:02:40 +00:00
|
|
|
/**
|
2012-11-09 21:09:24 +00:00
|
|
|
This class provides a dialog to edit an existing category or create a new
|
|
|
|
one.
|
2007-04-05 18:02:40 +00:00
|
|
|
*/
|
2007-04-05 01:13:14 +00:00
|
|
|
class ElementsCategoryEditor : public QDialog {
|
|
|
|
Q_OBJECT
|
2007-04-12 03:13:13 +00:00
|
|
|
|
2012-11-09 21:09:24 +00:00
|
|
|
// constructors, destructor
|
2007-04-05 01:13:14 +00:00
|
|
|
public:
|
2009-04-03 19:30:25 +00:00
|
|
|
ElementsCategoryEditor(const ElementsLocation &, bool = true, QWidget * = 0);
|
2007-04-12 03:13:13 +00:00
|
|
|
virtual ~ElementsCategoryEditor();
|
|
|
|
|
|
|
|
private:
|
|
|
|
ElementsCategoryEditor(const ElementsCategoryEditor &);
|
2007-04-05 01:13:14 +00:00
|
|
|
|
2012-11-09 21:09:24 +00:00
|
|
|
// attributes
|
2007-04-05 01:13:14 +00:00
|
|
|
private:
|
|
|
|
ElementsCategory *category;
|
|
|
|
QDialogButtonBox *buttons;
|
2007-04-13 11:50:16 +00:00
|
|
|
NamesListWidget *names_list;
|
2009-04-03 19:30:25 +00:00
|
|
|
QLabel *internal_name_label_;
|
|
|
|
QFileNameEdit *internal_name_;
|
2007-04-05 01:13:14 +00:00
|
|
|
bool mode_edit;
|
2007-04-07 02:37:57 +00:00
|
|
|
|
2012-11-09 21:09:24 +00:00
|
|
|
// methods
|
2007-04-05 01:13:14 +00:00
|
|
|
private:
|
|
|
|
void buildDialog();
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void acceptCreation();
|
|
|
|
void acceptUpdate();
|
|
|
|
};
|
|
|
|
#endif
|