23QPixmap ViewPointStyle::pixmapForCurrentSettings ()
const
28 QPolygonF polygonUnscaled = m_pointStyle.
polygon();
31 double xMinGot = polygonUnscaled.boundingRect().left();
32 double xMaxGot = polygonUnscaled.boundingRect().right();
33 double yMinGot = polygonUnscaled.boundingRect().top();
34 double yMaxGot = polygonUnscaled.boundingRect().bottom();
36 QPolygonF polygonScaled;
37 for (
int i = 0; i < polygonUnscaled.length(); i++) {
38 QPointF pOld = polygonUnscaled.at(i);
39 polygonScaled.append (QPointF ((width () - 1) * (pOld.x() - xMinGot) / (xMaxGot - xMinGot),
40 (height () - 1) * (pOld.y() - yMinGot) / (yMaxGot - yMinGot)));
46 color = QColor (Qt::black);
52 QImage::Format_RGB32);
53 QPainter painter (&img);
62 painter.setPen (QPen (color, m_pointStyle.lineWidth()));
63 painter.drawPolygon (polygonScaled);
67 QPixmap pixmap = QPixmap::fromImage (img);
75 <<
" enabled=" << (enabled ?
"true" :
"false");
78 setPixmap (pixmapForCurrentSettings ());
85 m_pointStyle = pointStyle;
86 setPixmap (pixmapForCurrentSettings ());
93 QPixmap pEmpty (width (),
QColor ColorPaletteToQColor(ColorPalette color)
log4cpp::Category * mainCat
const QColor COLOR_FOR_BRUSH_DISABLED(Qt::gray)
const QColor COLOR_FOR_BRUSH_ENABLED(Qt::white)
Details for a specific Point.
QPolygonF polygon() const
Return the polygon for creating a QGraphicsPolygonItem. The size is determined by the radius.
ViewPointStyle(QWidget *parent=0)
Single constructor.
void unsetPointStyle()
Apply no PointStyle.
void setPointStyle(const PointStyle &pointStyle)
Apply the PointStyle of the currently selected curve.
void setEnabled(bool enabled)
Show the style with semi-transparency or full-transparency to indicate if associated Curve is active ...
#define LOG4CPP_INFO_S(logger)