Listing 2: The HelloWorld class definition

01:  class HelloWorld : public QWidget
02:  {
03:    Q_OBJECT 
04:    public:
05:      /** construtor */
06:      HelloWorld(QWidget* parent=0, const char *name=0);
07:      /** destructor */
08:      ~HelloWorld();
09:
10:    public slots:
11:        void intCount();
12:        void disableCountButton();
13:        void resetCount();
14:
15:    signals:
16:        void maxCountReached();
17:
18:    private:
19:        int myCount;
20:        static const int MAX_COUNT = 30;
21:        QPushButton * countButton;
22:        QPushButton * resetButton;
23:        QLabel * countLabel;
24:
25:  };
— End of Listing —