2
* OpenRPT report writer and rendering engine
3
* Copyright (C) 2001-2007 by OpenMFG, LLC (info@openmfg.com)
4
* Copyright (C) 2007-2008 by Adam Pigg (adam@piggz.co.uk)
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
20
#ifndef REPORTRECTENTITY_H
21
#define REPORTRECTENTITY_H
23
#include <QGraphicsRectItem>
24
#include "KoReportDesignerItemBase.h"
25
#include <koproperty/Set.h>
27
#include "koreport_export.h"
29
class KoReportDesigner;
36
class KOREPORT_EXPORT KoReportDesignerItemRectBase : public QGraphicsRectItem, public KoReportDesignerItemBase
39
KoReportDesignerItemRectBase(KoReportDesigner*);
41
virtual ~KoReportDesignerItemRectBase();
44
void init(KRPos*, KRSize*, KoProperty::Set*);
48
enum UpdatePropertyFlag {
53
void setSceneRect(const QPointF& topLeft, const QSizeF& size, UpdatePropertyFlag update = UpdateProperty);
54
void setSceneRect(const QRectF& rect, UpdatePropertyFlag update = UpdateProperty);
56
void drawHandles(QPainter*);
59
virtual void mousePressEvent(QGraphicsSceneMouseEvent * event);
60
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * event);
61
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * event);
62
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent * event);
63
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
65
void propertyChanged(const KoProperty::Set &s, const KoProperty::Property &p);
67
virtual void move(const QPointF&);
69
int grabHandle(QPointF);
74
KoProperty::Set* m_pset;