Text item : reduce a lot of code for several text item

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3379 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-10-17 21:30:42 +00:00
parent 7f4d2cc317
commit 243cd16e72
16 changed files with 158 additions and 547 deletions

View File

@@ -17,12 +17,16 @@
*/
#ifndef DIAGRAM_CONTENT_H
#define DIAGRAM_CONTENT_H
#include <QtGui>
#include "qetgraphicsitem/qetshapeitem.h"
#include <QSet>
class QGraphicsItem;
class Conductor;
class Element;
class IndependentTextItem;
class DiagramImageItem;
class ElementTextItem;
class QetShapeItem;
/**
This class provides a container that makes the transmission of diagram content
@@ -43,20 +47,23 @@ class DiagramContent {
enum Filter {
Elements = 1,
TextFields = 2,
Images = 4,
ConductorsToMove = 8,
ConductorsToUpdate = 16,
OtherConductors = 32,
AnyConductor = 56,
Shapes = 64,
All = 127,
SelectedOnly = 128
ElementTextFields = 4,
Images = 8,
ConductorsToMove = 16,
ConductorsToUpdate = 32,
OtherConductors = 64,
AnyConductor = 112,
Shapes = 128,
All = 255,
SelectedOnly = 256
};
/// Hold electrical elements
QSet<Element *> elements;
/// Hold independent text items
QSet<IndependentTextItem *> textFields;
/// Hold element text item
QSet <ElementTextItem *> elementTextFields;
/// Hold image
QSet<DiagramImageItem *> images;
/// Hold shape