author | mickeyl <mickeyl> | 2003-03-03 23:54:03 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-03-03 23:54:03 (UTC) |
commit | 8173569e94a72051d80b8441e70fa1d99f79ef3e (patch) (side-by-side diff) | |
tree | 725b67bbee90a0deebb5177f58329cf23ee21baf | |
parent | 3688aa2cd692e3226f67a599daea99e35a36036f (diff) | |
download | opie-8173569e94a72051d80b8441e70fa1d99f79ef3e.zip opie-8173569e94a72051d80b8441e70fa1d99f79ef3e.tar.gz opie-8173569e94a72051d80b8441e70fa1d99f79ef3e.tar.bz2 |
add exit to file menu (not that someone would want to exit this fine app... :-D
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index 9065351..1185f84 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp @@ -70,96 +70,98 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n // setup tool buttons startStopButton = new QToolButton( 0 ); #ifdef QWS startStopButton->setAutoRaise( true ); #endif #ifdef QWS startStopButton->setOnIconSet( *cancelIconSet ); startStopButton->setOffIconSet( *searchIconSet ); #else startStopButton->setIconSet( *startStopIconSet ); #endif startStopButton->setToggleButton( true ); connect( startStopButton, SIGNAL( clicked() ), mw, SLOT( startStopClicked() ) ); startStopButton->setEnabled( false ); QToolButton* c = new QToolButton( 0 ); #ifdef QWS c->setAutoRaise( true ); #endif c->setIconSet( *infoIconSet ); c->setEnabled( false ); QToolButton* d = new QToolButton( 0 ); #ifdef QWS d->setAutoRaise( true ); #endif d->setIconSet( *settingsIconSet ); connect( d, SIGNAL( clicked() ), this, SLOT( showConfigure() ) ); // setup menu bar int id; QMenuBar* mb = menuBar(); QPopupMenu* fileSave = new QPopupMenu( mb ); fileSave->insertItem( "&Session...", this, SLOT( fileSaveSession() ) ); fileSave->insertItem( "&Log...", this, SLOT( fileSaveLog() ) ); QPopupMenu* fileLoad = new QPopupMenu( mb ); fileLoad->insertItem( "&Session...", this, SLOT( fileLoadSession() ) ); //fileLoad->insertItem( "&Log", this, SLOT( fileLoadLog() ) ); QPopupMenu* file = new QPopupMenu( mb ); id = file->insertItem( "&Load", fileLoad ); file->insertItem( "&Save", fileSave ); + file->insertSeparator(); + file->insertItem( "&Exit", qApp, SLOT( quit() ) ); QPopupMenu* view = new QPopupMenu( mb ); view->insertItem( "&Configure..." ); QPopupMenu* sniffer = new QPopupMenu( mb ); sniffer->insertItem( "&Configure..." ); sniffer->insertSeparator(); QPopupMenu* demo = new QPopupMenu( mb ); demo->insertItem( "&Add something", this, SLOT( demoAddStations() ) ); id = mb->insertItem( "&File", file ); id = mb->insertItem( "&View", view ); mb->setItemEnabled( id, false ); id = mb->insertItem( "&Sniffer", sniffer ); mb->setItemEnabled( id, false ); id = mb->insertItem( "&Demo", demo ); mb->setItemEnabled( id, true ); #ifdef QWS mb->insertItem( startStopButton ); mb->insertItem( c ); mb->insertItem( d ); #else // Qt3 changed the insertion order. It's now totally random :( mb->insertItem( d ); mb->insertItem( c ); mb->insertItem( startStopButton ); #endif // setup status bar (for now only on X11) #ifndef QWS statusBar()->message( "Ready." ); #endif }; void WellenreiterMainWindow::showConfigure() { qDebug( "show configure..." ); cw->setCaption( tr( "Configure" ) ); #ifdef QWS cw->showMaximized(); #endif int result = cw->exec(); if ( result ) { |