author | mickeyl <mickeyl> | 2003-12-09 21:33:48 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-12-09 21:33:48 (UTC) |
commit | 0a1f6405780b18c9f3d953adcfd072de8fd4dc18 (patch) (side-by-side diff) | |
tree | b155d2ee3c7766155b028f4e8ee92599fd50e8a9 /noncore/net/wellenreiter/gui/mainwindow.cpp | |
parent | dc1fc74ee3988fb3a89f6fc46cbcfe8b74416647 (diff) | |
download | opie-0a1f6405780b18c9f3d953adcfd072de8fd4dc18.zip opie-0a1f6405780b18c9f3d953adcfd072de8fd4dc18.tar.gz opie-0a1f6405780b18c9f3d953adcfd072de8fd4dc18.tar.bz2 |
misc. fixes and preparations for uploading dumps
Diffstat (limited to 'noncore/net/wellenreiter/gui/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 56 |
1 files changed, 32 insertions, 24 deletions
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index 868b0b0..ab7e0c7 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp @@ -58,11 +58,4 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n #endif - // setup icon sets - - infoIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/InfoIcon" ) ); - settingsIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/SettingsIcon" ) ); - startIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/SearchIcon" ) ); - stopIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/CancelIcon" ) ); - // setup tool buttons @@ -71,5 +64,5 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n startButton->setAutoRaise( true ); #endif - startButton->setIconSet( *startIconSet ); + startButton->setIconSet( Resource::loadIconSet( "wellenreiter/SearchIcon" ) ); startButton->setEnabled( false ); connect( startButton, SIGNAL( clicked() ), mw, SLOT( startClicked() ) ); @@ -79,22 +72,23 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n stopButton->setAutoRaise( true ); #endif - stopButton->setIconSet( *stopIconSet ); + stopButton->setIconSet( Resource::loadIconSet( "wellenreiter/CancelIcon" ) ); stopButton->setEnabled( false ); connect( stopButton, SIGNAL( clicked() ), mw, SLOT( stopClicked() ) ); - 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 ); + d->setIconSet( Resource::loadIconSet( "wellenreiter/SettingsIcon" ) ); connect( d, SIGNAL( clicked() ), this, SLOT( showConfigure() ) ); + uploadButton = new QToolButton( 0 ); + #ifdef QWS + uploadButton->setAutoRaise( true ); + #endif + uploadButton->setIconSet( Resource::loadIconSet( "up" ) ); + uploadButton->setEnabled( false ); + connect( uploadButton, SIGNAL( clicked() ), this, SLOT( uploadSession() ) ); + // setup menu bar @@ -117,4 +111,6 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n file->insertItem( tr( "&Save" ), fileSave ); file->insertSeparator(); + uploadID = file->insertItem( tr( "&Upload Session" ), this, SLOT( uploadSession() ) ); + file->insertSeparator(); file->insertItem( tr( "&Exit" ), qApp, SLOT( quit() ) ); @@ -140,13 +136,14 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n id = mb->insertItem( tr( "&Demo" ), demo ); mb->setItemEnabled( id, true ); + mb->setItemEnabled( uploadID, false ); #ifdef QWS mb->insertItem( startButton ); mb->insertItem( stopButton ); - mb->insertItem( c ); + mb->insertItem( uploadButton ); mb->insertItem( d ); #else // Qt3 changed the insertion order. It's now totally random :( mb->insertItem( d ); - mb->insertItem( c ); + mb->insertItem( uploadButton ); mb->insertItem( stopButton ); mb->insertItem( startButton ); @@ -180,5 +177,4 @@ void WellenreiterMainWindow::showConfigure() - void WellenreiterMainWindow::updateToolButtonState() { @@ -205,4 +201,10 @@ void WellenreiterMainWindow::changedSniffingState() stopButton->setEnabled( mw->sniffing ); menuBar()->setItemEnabled( stopID, mw->sniffing ); + + if ( !mw->sniffing ) + { + menuBar()->setItemEnabled( uploadID, true ); + uploadButton->setEnabled( true ); + } } @@ -210,10 +212,8 @@ void WellenreiterMainWindow::changedSniffingState() WellenreiterMainWindow::~WellenreiterMainWindow() { - delete infoIconSet; - delete settingsIconSet; - delete startIconSet; - delete stopIconSet; + qDebug( "Wellenreiter:: bye." ); }; + void WellenreiterMainWindow::demoAddStations() { @@ -344,4 +344,5 @@ void WellenreiterMainWindow::fileLoadSession() } + void WellenreiterMainWindow::fileNew() { @@ -351,4 +352,5 @@ void WellenreiterMainWindow::fileNew() } + void WellenreiterMainWindow::closeEvent( QCloseEvent* e ) { @@ -366,2 +368,8 @@ void WellenreiterMainWindow::closeEvent( QCloseEvent* e ) +void WellenreiterMainWindow::uploadSession() +{ + QMessageBox::warning( this, "Wellenreiter/Opie", + tr( "This feature is\nunder construction... ;-)" ) ); +} + |