/**
* Holds the data needed for move modifications.
*/
-class RS_MoveData
+class MoveData
{
public:
int number;
/**
* Holds the data needed for rotation modifications.
*/
-class RS_RotateData
+class RotateData
{
public:
int number;
/**
* Holds the data needed for scale modifications.
*/
-class RS_ScaleData
+class ScaleData
{
public:
int number;
/**
* Holds the data needed for mirror modifications.
*/
-class RS_MirrorData
+class MirrorData
{
public:
bool copy;
/**
* Holds the data needed for move/rotate modifications.
*/
-class RS_MoveRotateData
+class MoveRotateData
{
public:
int number;
/**
* Holds the data needed for rotation around two centers modifications.
*/
-class RS_Rotate2Data
+class Rotate2Data
{
public:
int number;
/**
* Holds the data needed for beveling modifications.
*/
-class RS_BevelData
+class BevelData
{
public:
double length1;
/**
* Holds the data needed for rounding modifications.
*/
-class RS_RoundData
+class RoundData
{
public:
double radius;
/**
* Holds the data needed for moving reference points.
*/
-class RS_MoveRefData
+class MoveRefData
{
public:
Vector ref;
/**
* Holds the data needed for changing attributes.
*/
-class RS_AttributesData
+class AttributesData
{
public:
QString layer;
- RS_Pen pen;
+ Pen pen;
bool changeLayer;
bool changeColor;
bool changeLineType;
/**
* Holds the data needed for pasting.
*/
-class RS_PasteData
+class PasteData
{
public:
- RS_PasteData(Vector insertionPoint, double factor, double angle,
+ PasteData(Vector insertionPoint, double factor, double angle,
bool asInsert, const QString & blockName)
{
this->insertionPoint = insertionPoint;
*
* @author Andrew Mustun
*/
-class RS_Modification
+class Modification
{
public:
- RS_Modification(RS_EntityContainer & entityContainer,
+ Modification(EntityContainer & entityContainer,
GraphicView * graphicView = NULL, bool handleUndo = true);
void remove();
- bool changeAttributes(RS_AttributesData& data);
+ bool changeAttributes(AttributesData& data);
void copy(const Vector & ref, const bool cut);
private:
- void copyEntity(RS_Entity * e, const Vector & ref, const bool cut);
+ void copyEntity(Entity * e, const Vector & ref, const bool cut);
public:
- void copyLayers(RS_Entity * e);
- void copyBlocks(RS_Entity * e);
- void paste(const RS_PasteData & data, Drawing * source = NULL);
-
- bool move(RS_MoveData & data);
- bool rotate(RS_RotateData & data);
- bool scale(RS_ScaleData & data);
- bool mirror(RS_MirrorData & data);
- bool moveRotate(RS_MoveRotateData & data);
- bool rotate2(RS_Rotate2Data & data);
-
- bool trim(const Vector & trimCoord, RS_AtomicEntity * trimEntity,
- const Vector & limitCoord, RS_Entity * limitEntity,
+ void copyLayers(Entity * e);
+ void copyBlocks(Entity * e);
+ void paste(const PasteData & data, Drawing * source = NULL);
+
+ bool move(MoveData & data);
+ bool rotate(RotateData & data);
+ bool scale(ScaleData & data);
+ bool mirror(MirrorData & data);
+ bool moveRotate(MoveRotateData & data);
+ bool rotate2(Rotate2Data & data);
+
+ bool trim(const Vector & trimCoord, AtomicEntity * trimEntity,
+ const Vector & limitCoord, Entity * limitEntity,
bool both);
- bool trimAmount(const Vector & trimCoord, RS_AtomicEntity * trimEntity,
+ bool trimAmount(const Vector & trimCoord, AtomicEntity * trimEntity,
double dist);
- bool cut(const Vector& cutCoord, RS_AtomicEntity* cutEntity);
+ bool cut(const Vector& cutCoord, AtomicEntity* cutEntity);
bool stretch(const Vector & firstCorner, const Vector & secondCorner,
const Vector & offset);
- bool bevel(const Vector & coord1, RS_AtomicEntity * entity1,
- const Vector & coord2, RS_AtomicEntity * entity2,
- RS_BevelData & data);
- bool round(const Vector & coord, const Vector & coord1, RS_AtomicEntity * entity1,
- const Vector & coord2, RS_AtomicEntity * entity2, RS_RoundData & data);
+ bool bevel(const Vector & coord1, AtomicEntity * entity1,
+ const Vector & coord2, AtomicEntity * entity2,
+ BevelData & data);
+ bool round(const Vector & coord, const Vector & coord1, AtomicEntity * entity1,
+ const Vector & coord2, AtomicEntity * entity2, RoundData & data);
bool explode();
bool explodeTextIntoLetters();
- bool explodeTextIntoLetters(RS_Text * text, QList<RS_Entity *> & addList);
- bool moveRef(RS_MoveRefData & data);
-
- bool splitPolyline(RS_Polyline & polyline, RS_Entity & e1, Vector v1,
- RS_Entity & e2, Vector v2, RS_Polyline ** polyline1, RS_Polyline ** polyline2) const;
- RS_Polyline * addPolylineNode(RS_Polyline& polyline,
- const RS_AtomicEntity& segment, const Vector& node);
- RS_Polyline * deletePolylineNode(RS_Polyline& polyline, const Vector& node);
- RS_Polyline * deletePolylineNodesBetween(RS_Polyline & polyline, RS_AtomicEntity & segment,
+ bool explodeTextIntoLetters(Text * text, QList<Entity *> & addList);
+ bool moveRef(MoveRefData & data);
+
+ bool splitPolyline(Polyline & polyline, Entity & e1, Vector v1,
+ Entity & e2, Vector v2, Polyline ** polyline1, Polyline ** polyline2) const;
+ Polyline * addPolylineNode(Polyline& polyline,
+ const AtomicEntity& segment, const Vector& node);
+ Polyline * deletePolylineNode(Polyline& polyline, const Vector& node);
+ Polyline * deletePolylineNodesBetween(Polyline & polyline, AtomicEntity & segment,
const Vector& node1, const Vector & node2);
- RS_Polyline * polylineTrim(RS_Polyline & polyline,
- RS_AtomicEntity & segment1, RS_AtomicEntity & segment2);
+ Polyline * polylineTrim(Polyline & polyline,
+ AtomicEntity & segment1, AtomicEntity & segment2);
private:
void deselectOriginals(bool remove);
- void addNewEntities(QList<RS_Entity *> & addList);
+ void addNewEntities(QList<Entity *> & addList);
protected:
- RS_EntityContainer * container;
+ EntityContainer * container;
Drawing * graphic;
- RS_Document * document;
+ Document * document;
GraphicView * graphicView;
bool handleUndo;
};