Diffstat (limited to 'noncore/settings/aqpkg/mainwin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/mainwin.cpp | 83 |
1 files changed, 47 insertions, 36 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp index 6b31cd1..e07d8a0 100644 --- a/noncore/settings/aqpkg/mainwin.cpp +++ b/noncore/settings/aqpkg/mainwin.cpp @@ -1,26 +1,26 @@ /* - This file is part of the OPIE Project + This file is part of the OPIE Project =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> - .=l. Dan Williams <drw@handhelds.org> - .>+-= - _;:, .> :=|. This file is free software; you can -.> <`_, > . <= redistribute it and/or modify it under -:`=1 )Y*s>-.-- : the terms of the GNU General Public -.="- .-=="i, .._ License as published by the Free Software - - . .-<_> .<> Foundation; either version 2 of the License, - ._= =} : or (at your option) any later version. - .%`+i> _;_. - .i_,=:_. -<s. This file is distributed in the hope that - + . -:. = it will be useful, but WITHOUT ANY WARRANTY; - : .. .:, . . . without even the implied warranty of - =_ + =;=|` MERCHANTABILITY or FITNESS FOR A - _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General -..}^=.= = ; Public License for more details. -++= -. .` .: - : = ...= . :.=- You should have received a copy of the GNU - -. .:....=;==+<; General Public License along with this file; - -_. . . )=. = see the file COPYING. If not, write to the - -- :-=` Free Software Foundation, Inc., + .=l. Dan Williams <drw@handhelds.org> + .>+-= +_;:, .> :=|. This file is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software +- . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This file is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General +..}^=.= = ; Public License for more details. +++= -. .` .: +: = ...= . :.=- You should have received a copy of the GNU +-. .:....=;==+<; General Public License along with this file; + -_. . . )=. = see the file COPYING. If not, write to the + -- :-=` Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -41,8 +41,9 @@ /* OPIE */ +#include <opie2/oresource.h> + #include <qpe/qcopenvelope_qws.h> #include <qpe/qpeapplication.h> #include <qpe/config.h> -#include <qpe/resource.h> /* QT */ @@ -122,5 +123,6 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl ) } - QAction *a = new QAction( QString::null, Resource::loadPixmap( "close" ), QString::null, 0, w, 0 ); + QAction *a = new QAction( QString::null, Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ), + QString::null, 0, w, 0 ); a->setWhatsThis( tr( "Click here to hide the Quick Jump toolbar." ) ); connect( a, SIGNAL( activated() ), this, SLOT( hideJumpBar() ) ); @@ -131,5 +133,6 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl ) QPopupMenu *popup = new QPopupMenu( this ); - a = new QAction( tr( "Update lists" ), Resource::loadPixmap( "aqpkg/update" ), QString::null, 0, this, 0 ); + a = new QAction( tr( "Update lists" ), Opie::Core::OResource::loadPixmap( "aqpkg/update", Opie::Core::OResource::SmallIcon ), + QString::null, 0, this, 0 ); a->setWhatsThis( tr( "Click here to update package lists from servers." ) ); connect( a, SIGNAL( activated() ), this, SLOT( updateServer() ) ); @@ -137,5 +140,6 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl ) a->addTo( bar ); - actionUpgrade = new QAction( tr( "Upgrade" ), Resource::loadPixmap( "aqpkg/upgrade" ), QString::null, 0, this, 0 ); + actionUpgrade = new QAction( tr( "Upgrade" ), Opie::Core::OResource::loadPixmap( "aqpkg/upgrade", Opie::Core::OResource::SmallIcon ), + QString::null, 0, this, 0 ); actionUpgrade->setWhatsThis( tr( "Click here to upgrade all installed packages if a newer version is available." ) ); connect( actionUpgrade, SIGNAL( activated() ), this, SLOT( upgradePackages() ) ); @@ -143,6 +147,6 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl ) actionUpgrade->addTo( bar ); - iconDownload = Resource::loadPixmap( "aqpkg/download" ); - iconRemove = Resource::loadPixmap( "aqpkg/remove" ); + iconDownload = Opie::Core::OResource::loadPixmap( "aqpkg/download", Opie::Core::OResource::SmallIcon ); + iconRemove = Opie::Core::OResource::loadPixmap( "aqpkg/remove", Opie::Core::OResource::SmallIcon ); actionDownload = new QAction( tr( "Download" ), iconDownload, QString::null, 0, this, 0 ); actionDownload->setWhatsThis( tr( "Click here to download the currently selected package(s)." ) ); @@ -151,5 +155,6 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl ) actionDownload->addTo( bar ); - a = new QAction( tr( "Apply changes" ), Resource::loadPixmap( "aqpkg/apply" ), QString::null, 0, this, 0 ); + a = new QAction( tr( "Apply changes" ), Opie::Core::OResource::loadPixmap( "aqpkg/apply", Opie::Core::OResource::SmallIcon ), + QString::null, 0, this, 0 ); a->setWhatsThis( tr( "Click here to install, remove or upgrade currently selected package(s)." ) ); connect( a, SIGNAL( activated() ), this, SLOT( applyChanges() ) ); @@ -159,5 +164,6 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl ) popup->insertSeparator(); - a = new QAction( tr( "Configure" ), Resource::loadPixmap( "SettingsIcon" ), QString::null, 0, this, 0 ); + a = new QAction( tr( "Configure" ), Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon ), + QString::null, 0, this, 0 ); a->setWhatsThis( tr( "Click here to configure this application." ) ); connect( a, SIGNAL( activated() ), this, SLOT( displaySettings() ) ); @@ -188,5 +194,6 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl ) popup->insertSeparator(); - actionFilter = new QAction( tr( "Filter by category" ), Resource::loadPixmap( "aqpkg/filter" ), QString::null, 0, this, 0 ); + actionFilter = new QAction( tr( "Filter by category" ), Opie::Core::OResource::loadPixmap( "aqpkg/filter", + Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 ); actionFilter->setToggleAction( TRUE ); actionFilter->setWhatsThis( tr( "Click here to list packages belonging to one category." ) ); @@ -201,10 +208,12 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl ) popup->insertSeparator(); - a = new QAction( tr( "Find" ), Resource::loadPixmap( "find" ), QString::null, 0, this, 0 ); + a = new QAction( tr( "Find" ), Opie::Core::OResource::loadPixmap( "find", Opie::Core::OResource::SmallIcon ), + QString::null, 0, this, 0 ); a->setWhatsThis( tr( "Click here to search for text in package names." ) ); connect( a, SIGNAL( activated() ), this, SLOT( displayFindBar() ) ); a->addTo( popup ); - actionFindNext = new QAction( tr( "Find next" ), Resource::loadIconSet( "next" ), QString::null, 0, this, 0 ); + actionFindNext = new QAction( tr( "Find next" ), Opie::Core::OResource::loadPixmap( "next", Opie::Core::OResource::SmallIcon ), + QString::null, 0, this, 0 ); actionFindNext->setEnabled( FALSE ); actionFindNext->setWhatsThis( tr( "Click here to find the next package name containing the text you are searching for." ) ); @@ -216,5 +225,6 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl ) popup->insertSeparator(); - a = new QAction( tr( "Quick Jump keypad" ), Resource::loadPixmap( "aqpkg/keyboard" ), QString::null, 0, this, 0 ); + a = new QAction( tr( "Quick Jump keypad" ), Opie::Core::OResource::loadPixmap( "aqpkg/keyboard", Opie::Core::OResource::SmallIcon ), + QString::null, 0, this, 0 ); a->setWhatsThis( tr( "Click here to display/hide keypad to allow quick movement through the package list." ) ); connect( a, SIGNAL( activated() ), this, SLOT( displayJumpBar() ) ); @@ -224,5 +234,6 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl ) // Finish find toolbar creation - a = new QAction( QString::null, Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); + a = new QAction( QString::null, Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ), + QString::null, 0, this, 0 ); a->setWhatsThis( tr( "Click here to hide the find toolbar." ) ); connect( a, SIGNAL( activated() ), this, SLOT( hideFindBar() ) ); @@ -259,6 +270,6 @@ void MainWindow :: initMainWidget() QWhatsThis::add( serversList, tr( "Click here to select a package feed." ) ); - installedIcon = Resource::loadPixmap( "installed" ); - updatedIcon = Resource::loadPixmap( "aqpkg/updated" ); + installedIcon = Opie::Core::OResource::loadPixmap( "installed" ); + updatedIcon = Opie::Core::OResource::loadPixmap( "aqpkg/updated" ); packagesList = new QListView( networkPkgWindow ); |