mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 23:20:52 +01:00
Element editor : graphic part
Diagram editor : shape item Gain a new way to be resized: mirror resizing. Click on the item for switch the resize mode git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4583 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -21,11 +21,9 @@
|
||||
#include "editorcommands.h"
|
||||
#include "qet.h"
|
||||
#include <QPainter>
|
||||
#include <QDebug>
|
||||
#include <QGraphicsSceneHoverEvent>
|
||||
#include <QStyleOptionGraphicsItem>
|
||||
#include <QGraphicsScene>
|
||||
#include <QTransform>
|
||||
|
||||
/**
|
||||
Constructor
|
||||
@@ -36,6 +34,7 @@ ElementPrimitiveDecorator::ElementPrimitiveDecorator(QGraphicsItem *parent):
|
||||
m_handler(10)
|
||||
{
|
||||
init();
|
||||
m_handler.setOuterColor(Qt::darkGreen);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,8 +96,9 @@ void ElementPrimitiveDecorator::paint(QPainter *painter, const QStyleOptionGraph
|
||||
pen.setCosmetic(true);
|
||||
painter -> setPen(pen);
|
||||
painter -> drawRect(modified_bounding_rect_);
|
||||
|
||||
//Draw the handlers
|
||||
m_handler.drawHandler(painter, getResizingsPoints(), decorated_items_.size()-1);
|
||||
m_handler.drawHandler(painter, getResizingsPoints());
|
||||
|
||||
// uncomment to draw the real bouding rect (=adjusted internal bounding rect)
|
||||
// painter -> setBrush(QBrush(QColor(240, 0, 0, 127)));
|
||||
|
||||
Reference in New Issue
Block a user