QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RDeleteObjectsOperation.h
Go to the documentation of this file.
1
20#ifndef RDELETEOBJECTSOPERATION_H
21#define RDELETEOBJECTSOPERATION_H
22
23#include "operations_global.h"
24
25#include <QList>
26#include <QSharedPointer>
27
28#include "ROperation.h"
29
30class RDocument;
31class RObject;
32class RTransaction;
33
41public:
42 RDeleteObjectsOperation(bool undoable = true);
43 RDeleteObjectsOperation(QList<QSharedPointer<RObject> >& list, bool undoable = true);
45
46 void deleteObject(const QSharedPointer<RObject>& o);
47
48 virtual RTransaction apply(RDocument& document, bool preview = false);
49
50private:
51 QList<QSharedPointer<RObject> > list;
52};
53
55
56#endif
Q_DECLARE_METATYPE(RMath *)
Implementation of an operation that deletes entities.
Definition RDeleteObjectsOperation.h:40
QList< QSharedPointer< RObject > > list
Definition RDeleteObjectsOperation.h:51
virtual ~RDeleteObjectsOperation()
Definition RDeleteObjectsOperation.h:44
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition RDocument.h:78
Abstract base class for all objects.
Definition RObject.h:64
This abstract class is an interface for all operation implementations.
Definition ROperation.h:45
virtual RTransaction apply(RDocument &document, bool preview=false)=0
Applies this operation to selection in the given document.
Transaction implementation.
Definition RTransaction.h:73
void deleteObject(void obj)
Deletes the given RObject from the drawing.
Definition simple_create.js:216
#define QCADOPERATIONS_EXPORT
Definition operations_global.h:10