|
Last change
on this file since 176 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.2 KB
|
| Line | |
|---|
| 1 | /****************************************************************************
|
|---|
| 2 | ** $Id: menu.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 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 | void contextMenuEvent ( QContextMenuEvent * );
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 | QMenuBar *menu;
|
|---|
| 53 | QLabel *label;
|
|---|
| 54 | bool isBold;
|
|---|
| 55 | bool isUnderline;
|
|---|
| 56 | int boldID, underlineID;
|
|---|
| 57 | };
|
|---|
| 58 |
|
|---|
| 59 |
|
|---|
| 60 | #endif // MENU_H
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.