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-04 02:13:14 +00:00
|
|
|
#ifndef ELEMENTS_CATEGORIES_WIDGET_H
|
|
|
|
#define ELEMENTS_CATEGORIES_WIDGET_H
|
|
|
|
#include <QtGui>
|
2007-10-21 16:10:21 +00:00
|
|
|
class ElementsCategoriesList;
|
2007-04-04 02:13:14 +00:00
|
|
|
/**
|
2012-11-09 21:09:24 +00:00
|
|
|
This class provides a widget listing available elements categories along
|
|
|
|
with buttons to add, change or create categories.
|
2007-04-04 02:13:14 +00:00
|
|
|
*/
|
|
|
|
class ElementsCategoriesWidget : public QWidget {
|
|
|
|
Q_OBJECT
|
2007-04-12 03:13:13 +00:00
|
|
|
|
2012-11-09 21:09:24 +00:00
|
|
|
// Constructors, destructor
|
2007-04-04 02:13:14 +00:00
|
|
|
public:
|
2007-04-05 01:13:14 +00:00
|
|
|
ElementsCategoriesWidget(QWidget * = 0);
|
2007-04-12 03:13:13 +00:00
|
|
|
virtual ~ElementsCategoriesWidget();
|
|
|
|
|
|
|
|
private:
|
|
|
|
ElementsCategoriesWidget(const ElementsCategoriesWidget &);
|
2007-04-04 02:13:14 +00:00
|
|
|
|
2012-11-09 21:09:24 +00:00
|
|
|
// attributes
|
2007-04-04 02:13:14 +00:00
|
|
|
private:
|
|
|
|
ElementsCategoriesList *elementscategorieslist;
|
|
|
|
QToolBar *toolbar;
|
2007-04-05 02:06:20 +00:00
|
|
|
QAction *action_reload;
|
|
|
|
QAction *action_new;
|
|
|
|
QAction *action_open;
|
|
|
|
QAction *action_delete;
|
2007-04-04 02:13:14 +00:00
|
|
|
|
2012-11-09 21:09:24 +00:00
|
|
|
// methods
|
2007-04-04 02:13:14 +00:00
|
|
|
public:
|
2007-04-09 02:56:47 +00:00
|
|
|
ElementsCategoriesList &elementsCategoriesList() const;
|
2007-04-04 02:13:14 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void newCategory();
|
|
|
|
void editCategory();
|
|
|
|
void removeCategory();
|
2007-04-05 02:06:20 +00:00
|
|
|
void updateButtons();
|
2007-04-04 02:13:14 +00:00
|
|
|
};
|
2007-04-09 02:56:47 +00:00
|
|
|
|
|
|
|
/**
|
2012-11-09 21:09:24 +00:00
|
|
|
@return The ElementsCategoriesList embedded within this widget.
|
2007-04-09 02:56:47 +00:00
|
|
|
*/
|
|
|
|
inline ElementsCategoriesList &ElementsCategoriesWidget::elementsCategoriesList() const {
|
|
|
|
return(*elementscategorieslist);
|
|
|
|
}
|
|
|
|
|
2007-04-04 02:13:14 +00:00
|
|
|
#endif
|