|
Last change
on this file since 94 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:
660 bytes
|
| Line | |
|---|
| 1 | /****************************************************************
|
|---|
| 2 | **
|
|---|
| 3 | ** Definition of CannonField class, Qt tutorial 8
|
|---|
| 4 | **
|
|---|
| 5 | ****************************************************************/
|
|---|
| 6 |
|
|---|
| 7 | #ifndef CANNON_H
|
|---|
| 8 | #define CANNON_H
|
|---|
| 9 |
|
|---|
| 10 | #include <qwidget.h>
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 | class CannonField : public QWidget
|
|---|
| 14 | {
|
|---|
| 15 | Q_OBJECT
|
|---|
| 16 | public:
|
|---|
| 17 | CannonField( QWidget *parent=0, const char *name=0 );
|
|---|
| 18 |
|
|---|
| 19 | int angle() const { return ang; }
|
|---|
| 20 | QSizePolicy sizePolicy() const;
|
|---|
| 21 |
|
|---|
| 22 | public slots:
|
|---|
| 23 | void setAngle( int degrees );
|
|---|
| 24 |
|
|---|
| 25 | signals:
|
|---|
| 26 | void angleChanged( int );
|
|---|
| 27 |
|
|---|
| 28 | protected:
|
|---|
| 29 | void paintEvent( QPaintEvent * );
|
|---|
| 30 |
|
|---|
| 31 | private:
|
|---|
| 32 | int ang;
|
|---|
| 33 | };
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 | #endif // CANNON_H
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.