6#include "analogclock.h"
22 setWindowTitle(
tr(
"Analog Clock"));
30 static const QPoint hourHand[3] = {
35 static const QPoint minuteHand[3] = {
41 QColor hourColor(127, 0, 127);
42 QColor minuteColor(0, 127, 127, 191);
62 for (
int i = 0;
i < 12; ++
i) {
77 for (
int j = 0;
j < 60; ++
j) {
The QColor class provides colors based on RGB, HSV or CMYK values.
The QPaintEvent class contains event parameters for paint events.
The QPainter class performs low-level painting on widgets and other paint devices.
void drawConvexPolygon(const QPointF *points, int pointCount)
Draws the convex polygon defined by the first pointCount points in the array points using the current...
void setPen(const QColor &color)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void drawLine(const QLineF &line)
Draws a line defined by line.
void restore()
Restores the current painter state (pops a saved state off the stack).
void rotate(qreal a)
Rotates the coordinate system clockwise.
void scale(qreal sx, qreal sy)
Scales the coordinate system by ({sx}, {sy}).
void save()
Saves the current painter state (pushes the state onto a stack).
void setBrush(const QBrush &brush)
Sets the painter's brush to the given brush.
void translate(const QPointF &offset)
Translates the coordinate system by the given offset; i.e.
void setRenderHint(RenderHint hint, bool on=true)
Sets the given render hint on the painter if on is true; otherwise clears the render hint.
\inmodule QtCore\reentrant
\inmodule QtCore \reentrant
static QTime currentTime()
Returns the current time as reported by the system clock.
int hour() const
Returns the hour part (0 to 23) of the time.
int minute() const
Returns the minute part (0 to 59) of the time.
int second() const
Returns the second part (0 to 59) of the time.
void start(int msec)
Starts or restarts the timer with a timeout interval of msec milliseconds.
void timeout(QPrivateSignal)
This signal is emitted when the timer times out.
constexpr const T & qMin(const T &a, const T &b)
GLint GLsizei GLsizei height
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent