Change element information is now managed by an undo command

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3542 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-12-11 20:10:28 +00:00
parent 60dd0f2054
commit 77164adf4b
9 changed files with 280 additions and 95 deletions

View File

@@ -19,9 +19,12 @@
#define ELEMENTINFOWIDGET_H
#include <QWidget>
#include "qetgraphicsitem/element.h"
#include "diagramcontext.h"
#include "elementinfopartwidget.h"
class Element;
class QUndoCommand;
class ElementInfoPartWidget;
class ChangeElementInformationCommand;
namespace Ui {
class ElementInfoWidget;
@@ -35,20 +38,23 @@ class ElementInfoWidget : public QWidget {
Q_OBJECT
//METHODS
public:
explicit ElementInfoWidget(Element *elmt, QWidget *parent = 0);
~ElementInfoWidget();
void apply();
private:
void buildInterface();
void fillInfo();
public:
explicit ElementInfoWidget(Element *elmt, QWidget *parent = 0);
~ElementInfoWidget();
bool apply();
QUndoCommand* associatedUndo () const;
private:
void buildInterface();
void fillInfo();
//ATTRIBUTES
private:
Ui::ElementInfoWidget *ui;
Element *element_;
DiagramContext elmt_info;
QList <ElementInfoPartWidget *> eipw_list;
private:
Ui::ElementInfoWidget *ui;
Element *element_;
DiagramContext elmt_info;
QList <ElementInfoPartWidget *> eipw_list;
};
#endif // ELEMENTINFOWIDGET_H