mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 08:40:53 +01:00
Basic Shapes: XML export/import added.
Many files were changed, so debugging required. Minor Bug exists: If we export to xml first time, it is OK. But if we then add another shape and then export, then the new shape is not added in XML. Reason: UndoAction not implemented at present for basi shape addition. git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2888 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "diagramcontent.h"
|
||||
#include "titleblockproperties.h"
|
||||
#include "qet.h"
|
||||
#include "qetgraphicsitem/qetshapeitem.h"
|
||||
class Diagram;
|
||||
class DiagramTextItem;
|
||||
class Element;
|
||||
@@ -111,6 +112,34 @@ class AddImageCommand : public QUndoCommand {
|
||||
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
This command adds an image item to a particular diagram
|
||||
*/
|
||||
class AddShapeCommand : public QUndoCommand {
|
||||
//constructors, destructor
|
||||
public:
|
||||
AddShapeCommand (Diagram *, QetShapeItem *, const QPointF &, QUndoCommand * = 0);
|
||||
virtual ~AddShapeCommand();
|
||||
private:
|
||||
AddShapeCommand(const AddShapeCommand &);
|
||||
|
||||
//methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
|
||||
// attributes
|
||||
private:
|
||||
/// added shape item
|
||||
QetShapeItem *shapeitem;
|
||||
/// diagram the image item is added to
|
||||
Diagram *diagram;
|
||||
/// position of the image item on the diagram
|
||||
QPointF position;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
This command adds a conductor to a particular diagram.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user