This repository was archived by the owner on Sep 11, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththemeclockwidget.h
More file actions
62 lines (54 loc) · 1.75 KB
/
Copy paththemeclockwidget.h
File metadata and controls
62 lines (54 loc) · 1.75 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/****************************************************************************
**
** Copyright (C) 2011-2012 Jan M. Binder, Felix Engelmann, Simeon Voelkel
** Contact: jan.binder@sfz-bw.de, felix.engelmann@sfz-bw.de,
** simeon.voelkel@sfz-bw.de
**
** $QT_BEGIN_LICENSE:GPL$
** GNU General Public License Usage
** This file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef THEMECLOCKWIDGET_H
#define THEMECLOCKWIDGET_H
#include <QGraphicsView>
#include <QGraphicsScene>
#include <QSvgRenderer>
#include <QGraphicsSvgItem>
#include <QGraphicsEllipseItem>
class ThemeClockWidget : public QGraphicsView
{
Q_OBJECT
public:
ThemeClockWidget(QWidget *parent = 0);
~ThemeClockWidget();
int getTime();
int getAllowedTime();
public slots:
void act();
void setAllowedTime(int ms);
void setRoomclock(bool roomclock);
void setTime(int ms);
private:
QGraphicsScene *nscene;
QGraphicsScene *rscene;
QGraphicsPolygonItem *hourHand;
QGraphicsPolygonItem *minuteHand;
QGraphicsPolygonItem *secondHand;
QGraphicsPolygonItem *secondHandBase;
QGraphicsEllipseItem *secondRing;
QGraphicsEllipseItem *fg, *mg, *bg, *ring, *focus, *focus2;
int time, maxtime;
bool roomclock;
void actRoomclock();
void actCake();
bool isRoomclock();
void resizeEvent(QResizeEvent *event);
};
#endif