EQL5/Qt_EQL/trafficlight/trafficlight.cpp
2016-11-25 23:30:38 +01:00

18 lines
430 B
C++

// original copyright:
//
// ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
// ** You may use this file under the terms of the BSD license
#include "trafficlight.h"
void LightWidget::paintEvent(QPaintEvent *)
{
if (!m_on)
return;
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing);
painter.setBrush(m_color);
painter.drawEllipse(0, 0, width(), height());
}