File: aclock.h

package info (click to toggle)
qt2 1%3A2.0.2-1.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 26,248 kB
  • ctags: 24,915
  • sloc: cpp: 150,477; makefile: 22,439; ansic: 21,468; yacc: 1,445; sh: 948; perl: 458; lex: 393; pascal: 141
file content (38 lines) | stat: -rw-r--r-- 868 bytes parent folder | download
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
/****************************************************************************
** $Id: aclock.h,v 1.2 1999/06/03 01:43:44 warwick Exp $
**
** Copyright (C) 1992-1999 Troll Tech AS.  All rights reserved.
**
** This file is part of an example program for Qt.  This example
** program may be used, distributed and modified without limitation.
**
*****************************************************************************/

#ifndef ACLOCK_H
#define ACLOCK_H

#include <qwidget.h>
#include <qdatetime.h>


class AnalogClock : public QWidget		// analog clock widget
{
    Q_OBJECT
public:
    AnalogClock( QWidget *parent=0, const char *name=0 );
    void setAutoMask(bool b);

protected:
    void updateMask();
    void paintEvent( QPaintEvent *);
    
private slots:
    void drawClock( QPainter* );
    void	timeout();

private:
    QTime	time;
};


#endif // ACLOCK_H