source: trunk/examples/life/lifedlg.h@ 8

Last change on this file since 8 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.3 KB
Line 
1/****************************************************************************
2** $Id: lifedlg.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 LIFEDLG_H
12#define LIFEDLG_H
13
14#include <qtimer.h>
15#include <qwidget.h>
16
17class QSlider;
18class QPushButton;
19class QLabel;
20class QComboBox;
21
22#include "life.h"
23
24
25class LifeTimer : public QTimer
26{
27 Q_OBJECT
28public:
29 LifeTimer( QWidget *parent );
30 enum { MAXSPEED = 1000 };
31
32public slots:
33 void setSpeed( int speed );
34 void pause( bool );
35
36private:
37 int interval;
38};
39
40
41class LifeDialog : public QWidget
42{
43 Q_OBJECT
44public:
45 LifeDialog( int scale = 10, QWidget *parent = 0, const char *name = 0 );
46public slots:
47 void getPattern( int );
48
49protected:
50 virtual void resizeEvent( QResizeEvent * e );
51
52private:
53 enum { TOPBORDER = 70, SIDEBORDER = 10 };
54
55 LifeWidget *life;
56 QPushButton *qb;
57 LifeTimer *timer;
58 QPushButton *pb;
59 QComboBox *cb;
60 QLabel *sp;
61 QSlider *scroll;
62};
63
64
65#endif // LIFEDLG_H
Note: See TracBrowser for help on using the repository browser.