Diffstat (limited to 'noncore/net/wellenreiter/gui/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index b67376c..b2d3a71 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp @@ -42,6 +42,12 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n - searchIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/SearchIcon" ) ); infoIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/InfoIcon" ) ); settingsIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/SettingsIcon" ) ); + #ifdef QWS + searchIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/SearchIcon" ) ); cancelIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/CancelIcon" ) ); + #else + startStopIconSet = new QIconSet(); + startStopIconSet->setPixmap( Resource::loadPixmap( "wellenreiter/SearchIcon" ), QIconSet::Automatic, QIconSet::Normal, QIconSet::Off ); + startStopIconSet->setPixmap( Resource::loadPixmap( "wellenreiter/CancelIcon" ), QIconSet::Automatic, QIconSet::Normal, QIconSet::On ); + #endif @@ -51,4 +57,8 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n startStopButton->setAutoRaise( true ); + #ifdef QWS startStopButton->setOnIconSet( *cancelIconSet ); startStopButton->setOffIconSet( *searchIconSet ); + #else + startStopButton->setIconSet( *startStopIconSet ); + #endif startStopButton->setToggleButton( true ); @@ -91,2 +101,3 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n + #ifdef QWS mb->insertItem( startStopButton ); @@ -94,2 +105,7 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n mb->insertItem( d ); + #else // Qt3 changed the insertion order. It's now totally random :( + mb->insertItem( d ); + mb->insertItem( c ); + mb->insertItem( startStopButton ); + #endif @@ -107,3 +123,5 @@ void WellenreiterMainWindow::showConfigure() cw->setCaption( tr( "Configure" ) ); + #ifdef QWS cw->showMaximized(); + #endif int result = cw->exec(); @@ -130,7 +148,10 @@ WellenreiterMainWindow::~WellenreiterMainWindow() - delete searchIconSet; delete infoIconSet; delete settingsIconSet; + #ifdef QWS + delete searchIconSet; delete cancelIconSet; - + #else + delete startStopIconSet; + #endif |