summaryrefslogtreecommitdiff
authordrw <drw>2005-06-09 21:00:47 (UTC)
committer drw <drw>2005-06-09 21:00:47 (UTC)
commit346a2cd09c2c28bd4d2086b0c152dd348913eaa9 (patch) (side-by-side diff)
treeb79a0e94a2dd35bf9039a2e92ecc033d3572cbb1
parent39a9211b7a43742e214aa815094a576dbae07755 (diff)
downloadopie-346a2cd09c2c28bd4d2086b0c152dd348913eaa9.zip
opie-346a2cd09c2c28bd4d2086b0c152dd348913eaa9.tar.gz
opie-346a2cd09c2c28bd4d2086b0c152dd348913eaa9.tar.bz2
Resource -> OResource
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/aqpkg/installdlgimpl.cpp58
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp83
-rw-r--r--noncore/settings/aqpkg/packagewin.cpp46
-rw-r--r--noncore/settings/aqpkg/settingsimpl.cpp61
-rw-r--r--noncore/settings/backup/backuprestore.cpp12
5 files changed, 135 insertions, 125 deletions
diff --git a/noncore/settings/aqpkg/installdlgimpl.cpp b/noncore/settings/aqpkg/installdlgimpl.cpp
index da21cef..e828595 100644
--- a/noncore/settings/aqpkg/installdlgimpl.cpp
+++ b/noncore/settings/aqpkg/installdlgimpl.cpp
@@ -1,52 +1,50 @@
/*
-                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.
*/
#include <stdio.h>
#include <opie2/ofiledialog.h>
+#include <opie2/oresource.h>
-#ifdef QWS
#include <qpe/config.h>
#include <qpe/fileselector.h>
#include <qpe/qpeapplication.h>
-#include <qpe/resource.h>
#include <qpe/storage.h>
-#endif
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qdialog.h>
#include <qfileinfo.h>
#include <qgroupbox.h>
#include <qmultilineedit.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include "datamgr.h"
@@ -187,29 +185,29 @@ void InstallDlgImpl :: init( bool displayextrainfo )
txtAvailableSpace = 0x0;
}
QGroupBox *GroupBox2 = new QGroupBox( 0, Qt::Vertical, tr( "Output" ), this );
GroupBox2->layout()->setSpacing( 0 );
GroupBox2->layout()->setMargin( 4 );
QVBoxLayout *GroupBox2Layout = new QVBoxLayout( GroupBox2->layout() );
output = new QMultiLineEdit( GroupBox2 );
GroupBox2Layout->addWidget( output );
layout->addMultiCellWidget( GroupBox2, 2, 2, 0, 1 );
- btnInstall = new QPushButton( Resource::loadPixmap( "aqpkg/apply" ), tr( "Start" ), this );
+ btnInstall = new QPushButton( Opie::Core::OResource::loadPixmap( "aqpkg/apply", Opie::Core::OResource::SmallIcon ), tr( "Start" ), this );
layout->addWidget( btnInstall, 3, 0 );
connect( btnInstall, SIGNAL( clicked() ), this, SLOT( installSelected() ) );
- btnOptions = new QPushButton( Resource::loadPixmap( "SettingsIcon" ), tr( "Options" ), this );
+ btnOptions = new QPushButton( Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon ), tr( "Options" ), this );
layout->addWidget( btnOptions, 3, 1 );
connect( btnOptions, SIGNAL( clicked() ), this, SLOT( optionsSelected() ) );
}
void InstallDlgImpl :: optionsSelected()
{
if ( btnOptions->text() == tr( "Options" ) )
{
InstallOptionsDlgImpl opt( flags, infoLevel, this, "Option", true );
if ( opt.exec() == QDialog::Accepted )
{
// set options selected from dialog
@@ -251,39 +249,39 @@ void InstallDlgImpl :: optionsSelected()
void InstallDlgImpl :: installSelected()
{
if ( btnInstall->text() == tr( "Abort" ) )
{
if ( pIpkg )
{
displayText( tr( "\n**** User Clicked ABORT ***" ) );
pIpkg->abort();
displayText( tr( "**** Process Aborted ****" ) );
}
btnInstall->setText( tr( "Close" ) );
- btnInstall->setIconSet( Resource::loadPixmap( "enter" ) );
+ btnInstall->setIconSet( Opie::Core::OResource::loadPixmap( "enter", Opie::Core::OResource::SmallIcon ) );
return;
}
else if ( btnInstall->text() == tr( "Close" ) )
{
emit reloadData( this );
return;
}
// Disable buttons
btnOptions->setEnabled( false );
// btnInstall->setEnabled( false );
btnInstall->setText( tr( "Abort" ) );
- btnInstall->setIconSet( Resource::loadPixmap( "close" ) );
+ btnInstall->setIconSet( Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ) );
if ( pIpkg )
{
output->setText( "" );
connect( pIpkg, SIGNAL(outputText(const QString&)), this, SLOT(displayText(const QString&)));
connect( pIpkg, SIGNAL(ipkgFinished()), this, SLOT(ipkgFinished()));
pIpkg->runIpkg();
}
else
{
output->setText( "" );
Destination *d = dataMgr->getDestination( destination->currentText() );
@@ -457,21 +455,21 @@ void InstallDlgImpl :: ipkgFinished()
tmpFlags |= FORCE_REINSTALL;
if ( item->destination->linkToRoot() && item->recreateLinks )
tmpFlags |= MAKE_LINKS;
}
pIpkg->setFlags( tmpFlags, infoLevel );
pIpkg->runIpkg();
}
else
{
btnOptions->setEnabled( true );
btnInstall->setText( tr( "Close" ) );
- btnInstall->setIconSet( Resource::loadPixmap( "enter" ) );
+ btnInstall->setIconSet( Opie::Core::OResource::loadPixmap( "enter", Opie::Core::OResource::SmallIcon ) );
btnOptions->setText( tr( "Save output" ) );
- btnOptions->setIconSet( Resource::loadPixmap( "save" ) );
+ btnOptions->setIconSet( Opie::Core::OResource::loadPixmap( "save", Opie::Core::OResource::SmallIcon ) );
if ( destination && destination->currentText() != 0 && destination->currentText() != "" )
displayAvailableSpace( destination->currentText() );
}
}
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,58 +1,59 @@
/*
-                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.
*/
#include "categoryfilterimpl.h"
#include "datamgr.h"
#include "global.h"
#include "inputdlg.h"
#include "ipkg.h"
#include "installdlgimpl.h"
#include "letterpushbutton.h"
#include "mainwin.h"
#include "packagewin.h"
#include "settingsimpl.h"
#include "utils.h"
/* OPIE */
+#include <opie2/oresource.h>
+
#include <qpe/qcopenvelope_qws.h>
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
-#include <qpe/resource.h>
/* QT */
#include <qmenubar.h>
#include <qtoolbar.h>
#include <qaction.h>
#include <qcombobox.h>
#include <qfile.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qlistview.h>
#include <qmenubar.h>
@@ -112,62 +113,67 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl )
QGridLayout *layout = new QGridLayout( w );
char text[2];
text[1] = '\0';
for ( int i = 0 ; i < 26 ; ++i )
{
text[0] = 'A' + i;
LetterPushButton *b = new LetterPushButton( text, w );
connect( b, SIGNAL( released(QString) ), this, SLOT( letterPushed(QString) ) );
layout->addWidget( b, i / 13, i % 13);
}
- 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() ) );
a->addTo( jumpBar );
jumpBar->hide();
// Packages menu
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() ) );
a->addTo( popup );
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() ) );
actionUpgrade->addTo( popup );
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)." ) );
connect( actionDownload, SIGNAL( activated() ), this, SLOT( downloadPackage() ) );
actionDownload->addTo( popup );
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() ) );
a->addTo( popup );
a->addTo( bar );
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() ) );
a->addTo( popup );
mb->insertItem( tr( "Actions" ), popup );
// View menu
popup = new QPopupMenu( this );
actionUninstalled = new QAction( tr( "Show packages not installed" ), QString::null, 0, this, 0 );
actionUninstalled->setToggleAction( TRUE );
actionUninstalled->setWhatsThis( tr( "Click here to show packages available which have not been installed." ) );
connect( actionUninstalled, SIGNAL( activated() ), this, SLOT( filterUninstalledPackages() ) );
@@ -178,61 +184,66 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl )
actionInstalled->setWhatsThis( tr( "Click here to show packages currently installed on this device." ) );
connect( actionInstalled, SIGNAL( activated() ), this, SLOT( filterInstalledPackages() ) );
actionInstalled->addTo( popup );
actionUpdated = new QAction( tr( "Show updated packages" ), QString::null, 0, this, 0 );
actionUpdated->setToggleAction( TRUE );
actionUpdated->setWhatsThis( tr( "Click here to show packages currently installed on this device which have a newer version available." ) );
connect( actionUpdated, SIGNAL( activated() ), this, SLOT( filterUpgradedPackages() ) );
actionUpdated->addTo( popup );
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." ) );
connect( actionFilter, SIGNAL( activated() ), this, SLOT( filterCategory() ) );
actionFilter->addTo( popup );
a = new QAction( tr( "Set filter category" ), QString::null, 0, this, 0 );
a->setWhatsThis( tr( "Click here to change package category to used filter." ) );
connect( a, SIGNAL( activated() ), this, SLOT( setFilterCategory() ) );
a->addTo( popup );
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." ) );
connect( actionFindNext, SIGNAL( activated() ), this, SLOT( repeatFind() ) );
actionFindNext->addTo( popup );
actionFindNext->addTo( findBar );
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() ) );
a->addTo( popup );
mb->insertItem( tr( "View" ), popup );
// 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() ) );
a->addTo( findBar );
findBar->hide();
// Create widget stack and add UI widgets
stack = new QWidgetStack( this );
stack->addWidget( progressWindow, 2 );
stack->addWidget( networkPkgWindow, 1 );
setCentralWidget( stack );
stack->raiseWidget( progressWindow );
@@ -249,26 +260,26 @@ MainWindow :: ~MainWindow()
}
void MainWindow :: initMainWidget()
{
networkPkgWindow = new QWidget( this );
QLabel *l = new QLabel( tr( "Servers:" ), networkPkgWindow );
serversList = new QComboBox( networkPkgWindow );
connect( serversList, SIGNAL(activated(int)), this, SLOT(serverSelected(int)) );
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 );
packagesList->addColumn( tr( "Packages" ), 225 );
QWhatsThis::add( packagesList, tr( "This is a listing of all packages for the server feed selected above.\n\nA blue dot next to the package name indicates that the package is currently installed.\n\nA blue dot with a star indicates that a newer version of the package is available from the server feed.\n\nClick inside the box at the left to select a package." ) );
QPEApplication::setStylusOperation( packagesList->viewport(), QPEApplication::RightOnHold );
connect( packagesList, SIGNAL(rightButtonPressed(QListViewItem*,const QPoint&,int)),
this, SLOT(slotDisplayPackage(QListViewItem*)) );
QVBoxLayout *vbox = new QVBoxLayout( networkPkgWindow, 0, -1 );
QHBoxLayout *hbox1 = new QHBoxLayout( vbox, -1 );
hbox1->addWidget( l );
hbox1->addWidget( serversList );
diff --git a/noncore/settings/aqpkg/packagewin.cpp b/noncore/settings/aqpkg/packagewin.cpp
index 499d647..5f0ae20 100644
--- a/noncore/settings/aqpkg/packagewin.cpp
+++ b/noncore/settings/aqpkg/packagewin.cpp
@@ -1,46 +1,46 @@
/*
-                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.
*/
#include "packagewin.h"
#include "package.h"
#include "datamgr.h"
-#include <qpe/resource.h>
+#include <opie2/oresource.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qstring.h>
#include <qtextview.h>
PackageWindow::PackageWindow( Package *package, const QString &server )
: QWidget( 0, 0, 0 )
{
QString str;
if ( package )
{
@@ -99,21 +99,21 @@ PackageWindow::PackageWindow( Package *package, const QString &server )
}
else
{
setCaption( tr( "Package Information" ) );
str = tr( "Package information is unavailable" );
}
QVBoxLayout *layout = new QVBoxLayout( this, 4, 4 );
QTextView *l = new QTextView( str, QString::null, this );
layout->addWidget( l );
- QPushButton *btn = new QPushButton( Resource::loadPixmap( "enter" ), tr( "Close" ), this );
+ QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "enter", Opie::Core::OResource::SmallIcon ), tr( "Close" ), this );
layout->addWidget( btn );
connect( btn, SIGNAL( clicked() ), this, SLOT( close() ) );
}
PackageWindow::~PackageWindow()
{
}
diff --git a/noncore/settings/aqpkg/settingsimpl.cpp b/noncore/settings/aqpkg/settingsimpl.cpp
index 9c8ec7a..7ffa1d6 100644
--- a/noncore/settings/aqpkg/settingsimpl.cpp
+++ b/noncore/settings/aqpkg/settingsimpl.cpp
@@ -1,50 +1,48 @@
/*
-                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.
*/
#include "settingsimpl.h"
#include "global.h"
/* OPIE */
#include <opie2/otabwidget.h>
-#ifdef QWS
+#include <opie2/oresource.h>
#include <qpe/config.h>
-#include <qpe/resource.h>
-#endif
#include <qpe/qpeapplication.h>
/* QT */
#include <qcheckbox.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qlistbox.h>
#include <qpushbutton.h>
using namespace Opie::Ui;
@@ -102,53 +100,54 @@ QWidget *SettingsImpl :: initServerTab()
QWidget *container = new QWidget( sv->viewport() );
sv->addChild( container );
QGridLayout *layout = new QGridLayout( container );
layout->setSpacing( 2 );
layout->setMargin( 4 );
servers = new QListBox( container );
servers->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) );
connect( servers, SIGNAL( highlighted(int) ), this, SLOT( editServer(int) ) );
layout->addMultiCellWidget( servers, 0, 0, 0, 1 );
- QPushButton *btn = new QPushButton( Resource::loadPixmap( "new" ), tr( "New" ), container );
+ QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ),
+ tr( "New" ), container );
connect( btn, SIGNAL( clicked() ), this, SLOT( newServer() ) );
layout->addWidget( btn, 1, 0 );
- btn = new QPushButton( Resource::loadPixmap( "trash" ), tr( "Delete" ), container );
+ btn = new QPushButton( Opie::Core::OResource::loadPixmap( "trash", Opie::Core::OResource::SmallIcon ), tr( "Delete" ), container );
connect( btn, SIGNAL( clicked() ), this, SLOT( removeServer() ) );
layout->addWidget( btn, 1, 1 );
QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "Server" ), container );
grpbox->layout()->setSpacing( 2 );
grpbox->layout()->setMargin( 4 );
layout->addMultiCellWidget( grpbox, 2, 2, 0, 1 );
QGridLayout *grplayout = new QGridLayout( grpbox->layout() );
QLabel *label = new QLabel( tr( "Name:" ), grpbox );
grplayout->addWidget( label, 0, 0 );
servername = new QLineEdit( grpbox );
grplayout->addWidget( servername, 0, 1 );
label = new QLabel( tr( "Address:" ), grpbox );
grplayout->addWidget( label, 1, 0 );
serverurl = new QLineEdit( grpbox );
grplayout->addWidget( serverurl, 1, 1 );
active = new QCheckBox( tr( "Active Server" ), grpbox );
grplayout->addMultiCellWidget( active, 2, 2, 0, 1 );
- btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Update" ), grpbox );
+ btn = new QPushButton( Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ), tr( "Update" ), grpbox );
connect( btn, SIGNAL( clicked() ), this, SLOT( changeServerDetails() ) );
grplayout->addMultiCellWidget( btn, 3, 3, 0, 1 );
return control;
}
QWidget *SettingsImpl :: initDestinationTab()
{
QWidget *control = new QWidget( this );
QVBoxLayout *vb = new QVBoxLayout( control );
@@ -160,53 +159,53 @@ QWidget *SettingsImpl :: initDestinationTab()
QWidget *container = new QWidget( sv->viewport() );
sv->addChild( container );
QGridLayout *layout = new QGridLayout( container );
layout->setSpacing( 2 );
layout->setMargin( 4 );
destinations = new QListBox( container );
destinations->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) );
connect( destinations, SIGNAL( highlighted(int) ), this, SLOT( editDestination(int) ) );
layout->addMultiCellWidget( destinations, 0, 0, 0, 1 );
- QPushButton *btn = new QPushButton( Resource::loadPixmap( "new" ), tr( "New" ), container );
+ QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ), tr( "New" ), container );
connect( btn, SIGNAL( clicked() ), this, SLOT( newDestination() ) );
layout->addWidget( btn, 1, 0 );
- btn = new QPushButton( Resource::loadPixmap( "trash" ), tr( "Delete" ), container );
+ btn = new QPushButton( Opie::Core::OResource::loadPixmap( "trash", Opie::Core::OResource::SmallIcon ), tr( "Delete" ), container );
connect( btn, SIGNAL( clicked() ), this, SLOT( removeDestination() ) );
layout->addWidget( btn, 1, 1 );
QGroupBox *grpbox = new QGroupBox( 0, Qt::Vertical, tr( "Destination" ), container );
grpbox->layout()->setSpacing( 2 );
grpbox->layout()->setMargin( 4 );
layout->addMultiCellWidget( grpbox, 2, 2, 0, 1 );
QGridLayout *grplayout = new QGridLayout( grpbox->layout() );
QLabel *label = new QLabel( tr( "Name:" ), grpbox );
grplayout->addWidget( label, 0, 0 );
destinationname = new QLineEdit( grpbox );
grplayout->addWidget( destinationname, 0, 1 );
label = new QLabel( tr( "Location:" ), grpbox );
grplayout->addWidget( label, 1, 0 );
destinationurl = new QLineEdit( grpbox );
grplayout->addWidget( destinationurl, 1, 1 );
linkToRoot = new QCheckBox( tr( "Link to root" ), grpbox );
grplayout->addMultiCellWidget( linkToRoot, 2, 2, 0, 1 );
- btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Update" ), grpbox );
+ btn = new QPushButton( Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ), tr( "Update" ), grpbox );
connect( btn, SIGNAL( clicked() ), this, SLOT( changeDestinationDetails() ) );
grplayout->addMultiCellWidget( btn, 3, 3, 0, 1 );
return control;
}
QWidget *SettingsImpl :: initProxyTab()
{
QWidget *control = new QWidget( this );
QVBoxLayout *vb = new QVBoxLayout( control );
@@ -243,25 +242,25 @@ QWidget *SettingsImpl :: initProxyTab()
grplayout->addWidget( chkFtpProxyEnabled );
QLabel *label = new QLabel( tr( "Username:" ), container );
layout->addWidget( label, 2, 0 );
txtUsername = new QLineEdit( container );
layout->addWidget( txtUsername, 2, 1 );
label = new QLabel( tr( "Password:" ), container );
layout->addWidget( label, 3, 0 );
txtPassword = new QLineEdit( container );
layout->addWidget( txtPassword, 3, 1 );
- QPushButton *btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Update" ), container );
+ QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ), tr( "Update" ), container );
connect( btn, SIGNAL( clicked() ), this, SLOT( proxyApplyChanges() ) );
layout->addMultiCellWidget( btn, 4, 4, 0, 1 );
return control;
}
void SettingsImpl :: setupData()
{
// add servers
QString serverName;
QListIterator<Server> it( dataMgr->getServerList() );
for ( ; it.current(); ++it )
diff --git a/noncore/settings/backup/backuprestore.cpp b/noncore/settings/backup/backuprestore.cpp
index 5a4e284..eadfb63 100644
--- a/noncore/settings/backup/backuprestore.cpp
+++ b/noncore/settings/backup/backuprestore.cpp
@@ -21,32 +21,34 @@ _;:, .> :=|. This file is free software; you can
-. .:....=;==+<; 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.
*/
#include "backuprestore.h"
#include "errordialog.h"
/* OPIE */
-#include <qpe/qpeapplication.h>
-#include <qpe/resource.h>
-#include <qpe/config.h>
#include <opie2/odebug.h>
#include <opie2/odevice.h>
#include <opie2/ostorageinfo.h>
#include <opie2/ofiledialog.h>
+#include <opie2/oresource.h>
#include <opie2/owait.h>
+
+#include <qpe/qpeapplication.h>
+#include <qpe/config.h>
+
using namespace Opie::Core;
using namespace Opie::Ui;
/* QT */
#include <qapplication.h>
#include <qmultilineedit.h>
#include <qdir.h>
#include <qfile.h>
#include <qfileinfo.h>
#include <qlistview.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
@@ -224,30 +226,30 @@ QList<QListViewItem> BackupAndRestore::getAllItems(QListViewItem *item, QList<QL
/**
* Selects and unselects the item by setting the HEADER_BACKUP to B or !.
* and changing the icon to match
* @param currentItem the item to swich the selection choice.
*/
void BackupAndRestore::selectItem(QListViewItem *currentItem)
{
if(!currentItem)
return;
if(currentItem->text(HEADER_BACKUP) == "B")
{
- currentItem->setPixmap(HEADER_NAME, Resource::loadPixmap("backup/null"));
+ currentItem->setPixmap(HEADER_NAME, Opie::Core::OResource::loadPixmap("backup/null"));
currentItem->setText(HEADER_BACKUP, "");
}
else
{
- currentItem->setPixmap(HEADER_NAME, Resource::loadPixmap("backup/check"));
+ currentItem->setPixmap(HEADER_NAME, Opie::Core::OResource::loadPixmap("backup/check"));
currentItem->setText(HEADER_BACKUP, "B");
}
}
void BackupAndRestore::scanForApplicationSettings()
{
QDir d( QDir::homeDirPath() + "/" + QString( applicationSettings->text(BACKUP_LOCATION) ) );
d.setFilter( QDir::Dirs | QDir::Files | QDir::NoSymLinks );
const QFileInfoList *list = d.entryInfoList();
QFileInfoListIterator it( *list );
QFileInfo *fi;
while ( (fi=it.current()) )