COPASI API  4.16.103
CQRoundedRect.cpp
Go to the documentation of this file.
1 // Copyright (C) 2013 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 #include <QtGui/QGraphicsRectItem>
7 #include <QtGui/QStyleOptionGraphicsItem>
8 #include <QtGui/QPainter>
9 
10 #include <qlayout/CQRoundedRect.h>
11 
12 CQRoundedRect::CQRoundedRect(qreal x, qreal y, qreal w, qreal h, qreal rx, qreal ry)
13  : QGraphicsRectItem(x, y, w, h)
14  , mRx(rx)
15  , mRy(ry)
16 {
17 }
18 
20 {
21 }
22 
23 void CQRoundedRect::paint(QPainter *painter, const QStyleOptionGraphicsItem* /*option*/, QWidget* /*widget*/)
24 {
25  painter->save();
26  painter->setPen(pen());
27  painter->setBrush(brush());
28  painter->drawRoundedRect(rect(), mRx, mRy);
29  painter->restore();
30 }
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option=new QStyleOptionGraphicsItem(), QWidget *widget=0)
virtual ~CQRoundedRect()
CQRoundedRect(qreal x, qreal y, qreal w, qreal h, qreal rx=0, qreal ry=0)