| 
            Last change
 on this file 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 | 
 | 
|---|
| 17 | class QSlider;
 | 
|---|
| 18 | class QPushButton;
 | 
|---|
| 19 | class QLabel;
 | 
|---|
| 20 | class QComboBox;
 | 
|---|
| 21 | 
 | 
|---|
| 22 | #include "life.h"
 | 
|---|
| 23 | 
 | 
|---|
| 24 | 
 | 
|---|
| 25 | class LifeTimer : public QTimer
 | 
|---|
| 26 | {
 | 
|---|
| 27 |     Q_OBJECT
 | 
|---|
| 28 | public:
 | 
|---|
| 29 |     LifeTimer( QWidget *parent );
 | 
|---|
| 30 |     enum { MAXSPEED = 1000 };
 | 
|---|
| 31 | 
 | 
|---|
| 32 | public slots:
 | 
|---|
| 33 |     void        setSpeed( int speed );
 | 
|---|
| 34 |     void        pause( bool );
 | 
|---|
| 35 | 
 | 
|---|
| 36 | private:
 | 
|---|
| 37 |     int         interval;
 | 
|---|
| 38 | };
 | 
|---|
| 39 | 
 | 
|---|
| 40 | 
 | 
|---|
| 41 | class LifeDialog : public QWidget
 | 
|---|
| 42 | {
 | 
|---|
| 43 |     Q_OBJECT
 | 
|---|
| 44 | public:
 | 
|---|
| 45 |     LifeDialog( int scale = 10, QWidget *parent = 0, const char *name = 0 );
 | 
|---|
| 46 | public slots:
 | 
|---|
| 47 |     void        getPattern( int );
 | 
|---|
| 48 | 
 | 
|---|
| 49 | protected:
 | 
|---|
| 50 |     virtual void resizeEvent( QResizeEvent * e );
 | 
|---|
| 51 | 
 | 
|---|
| 52 | private:
 | 
|---|
| 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.