rock_widget_collection  0.1
DrawItem.cc
Go to the documentation of this file.
1 /*
2  * File: DrawItem.cc
3  * Author: blueck
4  *
5  * Created on 24. Juni 2010, 13:10
6  */
7 
8 #include "DrawItem.h"
9 int DrawItem::_ID = 0;
10 
11 DrawItem::DrawItem(int posX, int posY, int groupNr, const QColor &color):
12 groupNr(groupNr),
13 posX(posX),
14 posY(posY),
15 color(color),
16 lineWidth(0),
17 penCapStyle(Qt::SquareCap),
18 penStyle(Qt::SolidLine),
19 m_id(_ID++),
20 brender_on_opengl(false),
21 position_factor_x(0),
22 position_factor_y(0)
23 {
24 
25 }
26 
27 void DrawItem::addPenStyle(QPainter* painter)
28 {
29  QPen pen;
30  pen.setCapStyle(penCapStyle);
31  pen.setStyle(penStyle);
32  pen.setWidth(lineWidth);
33  pen.setColor(color);
34  painter->setPen(pen);
35 }
36 
37 
void addPenStyle(QPainter *painter)
Definition: DrawItem.cc:27
DrawItem(int posX, int posY, int groupNr, const QColor &color)
Definition: DrawItem.cc:11
static int _ID
Definition: DrawItem.h:192
Qt::PenCapStyle penCapStyle
Definition: DrawItem.h:188
int lineWidth
Definition: DrawItem.h:186
Qt::PenStyle penStyle
Definition: DrawItem.h:190
QColor color
Definition: DrawItem.h:184