diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-08-08 20:32:41 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-08-08 22:39:13 +0300 |
commit | 7d516abb39081c7ce58bb78a644f5bb5ff88f98a (patch) | |
tree | b2aaa681ded6f3b09bd7bf4e2f5ebfa1b8768608 /softwarecontext/rectanglenode.h | |
parent | 2b04743d352d8793057ec94bb1a64df1ee0fcc45 (diff) |
Add a simple rectangle node
This gets text cursor and selections working properly
together with the corresponding change in qtdeclarative.
Change-Id: I53acc39c959f9cde875ef5e8d1bcd4d660269d5e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'softwarecontext/rectanglenode.h')
-rw-r--r-- | softwarecontext/rectanglenode.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/softwarecontext/rectanglenode.h b/softwarecontext/rectanglenode.h index 3405c8db84..52414de219 100644 --- a/softwarecontext/rectanglenode.h +++ b/softwarecontext/rectanglenode.h @@ -6,6 +6,24 @@ #include <QPen> #include <QBrush> +class SimpleRectangleNode : public QSGSimpleRectangleNode +{ +public: + SimpleRectangleNode(const QRectF &rect, const QColor &color); + + virtual void setRect(const QRectF &rect); + virtual void setColor(const QColor &color); + + virtual void update(); + + void paint(QPainter *); + +private: + QRectF m_rect; + QColor m_color; +}; + + class RectangleNode : public QSGRectangleNode { public: |