path.moveTo(r.x() + 7, r.y());
path.lineTo(r.x() + r.width() - 7, r.y());
// Upper right
path.lineTo(r.x() + r.width() - 6, r.y() + 1);
path.lineTo(r.x() + r.width() - 5, r.y() + 1);
path.lineTo(r.x() + r.width() - 1, r.y() + 5);
path.lineTo(r.x() + r.width() - 1, r.y() + 6);
path.lineTo(r.x() + r.width(), r.y() + 7);
path.lineTo(r.x() + r.width(), r.y() + r.height() - 7);
// Lower right
path.lineTo(r.x() + r.width() - 1, r.y() + r.height() - 6);
path.lineTo(r.x() + r.width() - 1, r.y() + r.height() - 5);
path.lineTo(r.x() + r.width() - 5, r.y() + r.height() - 1);
path.lineTo(r.x() + r.width() - 6, r.y() + r.height() - 1);
path.lineTo(r.x() + r.width() - 7, r.y() + r.height());
path.lineTo(r.x() + 7, r.y() + r.height());
// Lower left
path.lineTo(r.x() + 6, r.y() + r.height() - 1);
path.lineTo(r.x() + 5, r.y() + r.height() - 1);
path.lineTo(r.x() + 1, r.y() + r.height() - 5);
path.lineTo(r.x() + 1, r.y() + r.height() - 6);
path.lineTo(r.x(), r.y() + r.height() - 7);
path.lineTo(r.x(), r.y() + 7);
// Upper left
path.lineTo(r.x() + 1, r.y() + 6);
path.lineTo(r.x() + 1, r.y() + 5);
path.lineTo(r.x() + 5, r.y() + 1);
path.lineTo(r.x() + 6, r.y() + 1);
path.lineTo(r.x() + 7, r.y());
QPainterPath path;
path.moveTo(r.x() + 7, r.y());
path.lineTo(r.x() + r.width() - 7, r.y());
// Upper right
path.lineTo(r.x() + r.width() - 6, r.y() + 1);
path.lineTo(r.x() + r.width() - 5, r.y() + 1);
path.lineTo(r.x() + r.width() - 1, r.y() + 5);
path.lineTo(r.x() + r.width() - 1, r.y() + 6);
path.lineTo(r.x() + r.width(), r.y() + 7);
path.lineTo(r.x() + r.width(), r.y() + r.height() - 7);
// Lower right
path.lineTo(r.x() + r.width() - 1, r.y() + r.height() - 6);
path.lineTo(r.x() + r.width() - 1, r.y() + r.height() - 5);
path.lineTo(r.x() + r.width() - 5, r.y() + r.height() - 1);
path.lineTo(r.x() + r.width() - 6, r.y() + r.height() - 1);
path.lineTo(r.x() + r.width() - 7, r.y() + r.height());
path.lineTo(r.x() + 7, r.y() + r.height());
// Lower left
path.lineTo(r.x() + 6, r.y() + r.height() - 1);
path.lineTo(r.x() + 5, r.y() + r.height() - 1);
path.lineTo(r.x() + 1, r.y() + r.height() - 5);
path.lineTo(r.x() + 1, r.y() + r.height() - 6);
path.lineTo(r.x(), r.y() + r.height() - 7);
path.lineTo(r.x(), r.y() + 7);
// Upper left
path.lineTo(r.x() + 1, r.y() + 6);
path.lineTo(r.x() + 1, r.y() + 5);
path.lineTo(r.x() + 5, r.y() + 1);
path.lineTo(r.x() + 6, r.y() + 1);
path.lineTo(r.x() + 7, r.y());
To copy to clipboard, switch view to plain text mode
void ZeMessengerWindow
::paintEvent(QPaintEvent * event
) {
//painter.setRenderHint(QPainter::Antialiasing, true);
pen.setBrush(ZeStyle::get()->getBorderColor());
painter.setPen(pen);
painter.
setBrush(QColor(0,
0,
0,
0));
QRect rectBack
(rect
().
x(), rect
().
y(),
rect().width() - 1, rect().height() - 1);
ZePainterController::get()->DrawRoundRect(painter, rectBack);
}
//=============================================================================
//=============================================================================
{
setMask
(QRegion(ZePainterController
::get()->DrawRoundRect
(rect
()).
toFillPolygon().
toPolygon()));
}
void ZeMessengerWindow::paintEvent(QPaintEvent * event)
{
QPainter painter(this);
//painter.setRenderHint(QPainter::Antialiasing, true);
QPen pen;
pen.setBrush(ZeStyle::get()->getBorderColor());
painter.setPen(pen);
painter.setBrush(QColor(0, 0, 0, 0));
QRect rectBack(rect().x(), rect().y(),
rect().width() - 1, rect().height() - 1);
ZePainterController::get()->DrawRoundRect(painter, rectBack);
}
//=============================================================================
//=============================================================================
void ZeMessengerWindow::resizeEvent(QResizeEvent * event)
{
setMask(QRegion(ZePainterController::get()->DrawRoundRect(rect()).toFillPolygon().toPolygon()));
}
To copy to clipboard, switch view to plain text mode
Bookmarks