source: trunk/examples/aclock/aclock.h@ 16

Last change on this file since 16 was 2, checked in by dmik, 20 years ago

Imported xplatform parts of the official release 3.3.1 from Trolltech

  • Property svn:keywords set to Id
File size: 1.0 KB
Line 
1/****************************************************************************
2** $Id: aclock.h 2 2005-11-16 15:49:26Z dmik $
3**
4** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
5**
6** This file is part of an example program for Qt. This example
7** program may be used, distributed and modified without limitation.
8**
9*****************************************************************************/
10
11#ifndef ACLOCK_H
12#define ACLOCK_H
13
14#include <qwidget.h>
15#include <qdatetime.h>
16
17class QTimer;
18class AnalogClock : public QWidget // analog clock widget
19{
20 Q_OBJECT
21public:
22 AnalogClock( QWidget *parent=0, const char *name=0 );
23 void setAutoMask(bool b);
24
25protected:
26 void updateMask();
27 void paintEvent( QPaintEvent *);
28 void mousePressEvent( QMouseEvent *);
29 void mouseMoveEvent( QMouseEvent *);
30 void drawClock( QPainter* );
31
32private slots:
33 void timeout();
34
35public slots:
36 void setTime( const QTime & t );
37
38private:
39 QPoint clickPos;
40 QTime time;
41 QTimer *internalTimer;
42};
43
44
45#endif // ACLOCK_H
Note: See TracBrowser for help on using the repository browser.