mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-03-21 04:19:58 +01:00
Element editor: revamped ElementScene::zItems() to fulfil the needs of ElementScene::managePrimitivesGroups()
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2029 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -42,7 +42,17 @@ class ElementScene : public QGraphicsScene {
|
||||
Q_OBJECT
|
||||
|
||||
// enum
|
||||
public:
|
||||
enum Behavior { Normal, Line, Rectangle, Circle, Ellipse, Polygon, Text, Terminal, Arc, TextField, PasteArea };
|
||||
enum ItemOption {
|
||||
SortByZValue = 1,
|
||||
IncludeTerminals = 2,
|
||||
IncludeHelperItems = 4,
|
||||
Selected = 8,
|
||||
NonSelected = 16,
|
||||
SelectedOrNot = 24
|
||||
};
|
||||
Q_DECLARE_FLAGS(ItemOptions, ItemOption);
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
@@ -130,7 +140,7 @@ class ElementScene : public QGraphicsScene {
|
||||
virtual void fromXml(const QDomDocument &, const QPointF & = QPointF(), bool = true, ElementContent * = 0);
|
||||
virtual void reset();
|
||||
virtual QList<CustomElementPart *> primitives() const;
|
||||
virtual QList<QGraphicsItem *> zItems(bool = false) const;
|
||||
virtual QList<QGraphicsItem *> zItems(ItemOptions options = ItemOptions(SortByZValue | IncludeTerminals | SelectedOrNot)) const;
|
||||
virtual ElementContent selectedContent() const;
|
||||
virtual void getPasteArea(const QRectF &);
|
||||
QRectF borderRect() const;
|
||||
@@ -209,6 +219,8 @@ class ElementScene : public QGraphicsScene {
|
||||
void pasteAreaDefined(const QRectF &);
|
||||
};
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(ElementScene::ItemOptions)
|
||||
|
||||
/**
|
||||
@param wid the new width for the currently edited element
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user