home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / qt3_emx.zip / examples / menu / menu.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-11  |  1.1 KB  |  58 lines

  1. /****************************************************************************
  2. ** $Id:  qt/menu.h   3.0.0   edited Jun 22 13:24 $
  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 MENU_H
  12. #define MENU_H
  13.  
  14. #include <qwidget.h>
  15. #include <qmenubar.h>
  16. #include <qlabel.h>
  17.  
  18.  
  19. class MenuExample : public QWidget
  20. {
  21.     Q_OBJECT
  22. public:
  23.     MenuExample( QWidget *parent=0, const char *name=0 );
  24.  
  25. public slots:
  26.     void open();
  27.     void news();
  28.     void save();
  29.     void closeDoc();
  30.     void undo();
  31.     void redo();
  32.     void normal();
  33.     void bold();
  34.     void underline();
  35.     void about();
  36.     void aboutQt();
  37.     void printer();
  38.     void file();
  39.     void fax();
  40.     void printerSetup();
  41.  
  42. protected:
  43.     void    resizeEvent( QResizeEvent * );
  44.  
  45. signals:
  46.     void    explain( const QString& );
  47.  
  48. private:
  49.     QMenuBar *menu;
  50.     QLabel   *label;
  51.     bool isBold;
  52.     bool isUnderline;
  53.     int boldID, underlineID;
  54. };
  55.  
  56.  
  57. #endif // MENU_H
  58.