| Line | |
|---|
| 1 | /****************************************************************
|
|---|
| 2 | **
|
|---|
| 3 | ** Implementation of MainWindow class, translation tutorial 2
|
|---|
| 4 | **
|
|---|
| 5 | ****************************************************************/
|
|---|
| 6 |
|
|---|
| 7 | #include "arrowpad.h"
|
|---|
| 8 | #include "mainwindow.h"
|
|---|
| 9 |
|
|---|
| 10 | #include <qaccel.h>
|
|---|
| 11 | #include <qapplication.h>
|
|---|
| 12 | #include <qmenubar.h>
|
|---|
| 13 | #include <qpopupmenu.h>
|
|---|
| 14 |
|
|---|
| 15 | MainWindow::MainWindow( QWidget *parent, const char *name )
|
|---|
| 16 | : QMainWindow( parent, name )
|
|---|
| 17 | {
|
|---|
| 18 | ArrowPad *ap = new ArrowPad( this, "arrow pad" );
|
|---|
| 19 | setCentralWidget( ap );
|
|---|
| 20 |
|
|---|
| 21 | QPopupMenu *file = new QPopupMenu( this );
|
|---|
| 22 | file->insertItem( tr("E&xit"), qApp, SLOT(quit()),
|
|---|
| 23 | tr("Ctrl+Q", "Quit") );
|
|---|
| 24 | menuBar()->insertItem( tr("&File"), file );
|
|---|
| 25 | menuBar()->setSeparator( QMenuBar::InWindowsStyle );
|
|---|
| 26 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.