2007-02-26 22:42:46 +00:00
|
|
|
#ifndef ELEMENTS_PANEL_WIDGET_H
|
2007-04-09 02:56:47 +00:00
|
|
|
#define ELEMENTS_PANEL_WIDGET_H
|
|
|
|
#include <QtGui>
|
|
|
|
#include "elementspanel.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
Cette classe est un widget qui contient le panel d'elements surplombe d'une
|
|
|
|
barre d'outils avec differentes actions pour gerer les elements.
|
|
|
|
*/
|
|
|
|
class ElementsPanelWidget : public QWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
|
2007-04-12 03:13:13 +00:00
|
|
|
// constructeurs, destructeur
|
2007-04-09 02:56:47 +00:00
|
|
|
public:
|
|
|
|
ElementsPanelWidget(QWidget * = 0);
|
2007-04-12 03:13:13 +00:00
|
|
|
virtual ~ElementsPanelWidget();
|
|
|
|
|
|
|
|
private:
|
|
|
|
ElementsPanelWidget(const ElementsPanelWidget &);
|
2007-04-09 02:56:47 +00:00
|
|
|
|
|
|
|
// attributs
|
|
|
|
private:
|
|
|
|
ElementsPanel *elements_panel;
|
|
|
|
QToolBar *toolbar;
|
2007-08-28 21:17:11 +00:00
|
|
|
QAction *reload;
|
|
|
|
QAction *new_category, *edit_category, *delete_category;
|
|
|
|
QAction *new_element, *edit_element, *delete_element;
|
2007-04-09 02:56:47 +00:00
|
|
|
|
|
|
|
// methodes
|
|
|
|
public:
|
2007-04-12 03:13:13 +00:00
|
|
|
inline ElementsPanel &elementsPanel() const;
|
2007-04-09 02:56:47 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void newElement();
|
2007-08-28 21:17:11 +00:00
|
|
|
void newCategory();
|
|
|
|
void updateButtons();
|
2007-04-09 02:56:47 +00:00
|
|
|
};
|
2007-04-12 03:13:13 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
@return Le panel d'elements imbrique dans ce widget
|
|
|
|
*/
|
|
|
|
inline ElementsPanel &ElementsPanelWidget::elementsPanel() const {
|
|
|
|
return(*elements_panel);
|
|
|
|
}
|
|
|
|
|
2007-02-26 22:42:46 +00:00
|
|
|
#endif
|