Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[99b84b]: libgui / CornerPatchWidget.cpp Maximize Restore History

Download this file

CornerPatchWidget.cpp    30 lines (25 with data), 683 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <qpainter.h>
#include "CornerPatchWidget.h"
//**********************************************************
CornerPatchWidget::CornerPatchWidget(QWidget *parent, int pos)
:QWidget(parent)
{
this->pos = pos;
}
//**********************************************************
CornerPatchWidget::~CornerPatchWidget()
{
}
//**********************************************************
void CornerPatchWidget::paintEvent(QPaintEvent *)
{
int h = height();
int w = width();
QPainter p;
p.begin (this);
p.setPen (colorGroup().light());
p.drawLine (0, 0, 0, h - 1);
p.setPen (colorGroup().dark());
p.drawLine (0, h - 1, w, h - 1);
p.end ();
}