summaryrefslogtreecommitdiff
path: root/noncore/settings/packagemanager/oipkgconfigdlg.cpp
authordrw <drw>2005-06-05 22:41:15 (UTC)
committer drw <drw>2005-06-05 22:41:15 (UTC)
commit56b8917e2cca3715e9a19941965ddd73e6bba5d4 (patch) (side-by-side diff)
tree77f19a696d1cc4568083f38467390b59c5270da2 /noncore/settings/packagemanager/oipkgconfigdlg.cpp
parent31e8d6aad8220f747113870cfa10261435a2a162 (diff)
downloadopie-56b8917e2cca3715e9a19941965ddd73e6bba5d4.zip
opie-56b8917e2cca3715e9a19941965ddd73e6bba5d4.tar.gz
opie-56b8917e2cca3715e9a19941965ddd73e6bba5d4.tar.bz2
Resource -> OResource
Diffstat (limited to 'noncore/settings/packagemanager/oipkgconfigdlg.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/packagemanager/oipkgconfigdlg.cpp52
1 files changed, 25 insertions, 27 deletions
diff --git a/noncore/settings/packagemanager/oipkgconfigdlg.cpp b/noncore/settings/packagemanager/oipkgconfigdlg.cpp
index 945571f..58c572b 100644
--- a/noncore/settings/packagemanager/oipkgconfigdlg.cpp
+++ b/noncore/settings/packagemanager/oipkgconfigdlg.cpp
@@ -22,27 +22,27 @@
:     =  ...= . :.=-
 -.   .:....=;==+<; You should have received a copy of the GNU
  -_. . .   )=.  = Library General Public License along with
    --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "oipkgconfigdlg.h"
#include <opie2/ofiledialog.h>
+#include <opie2/oresource.h>
#include <qpe/qpeapplication.h>
-#include <qpe/resource.h>
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qlistbox.h>
#include <qpushbutton.h>
#include <qscrollview.h>
#include <qwhatsthis.h>
OIpkgConfigDlg::OIpkgConfigDlg( OIpkg *ipkg, bool installOptions, QWidget *parent )
@@ -173,43 +173,42 @@ void OIpkgConfigDlg::initServerWidget()
sv->setResizePolicy( QScrollView::AutoOneFit );
sv->setFrameStyle( QFrame::NoFrame );
QWidget *container = new QWidget( sv->viewport() );
sv->addChild( container );
QGridLayout *layout = new QGridLayout( container, 2, 3, 2, 4 );
m_serverList = new QListBox( container );
QWhatsThis::add( m_serverList, tr( "This is a list of all servers configured. Select one here to edit or delete, or add a new one below." ) );
m_serverList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) );
connect( m_serverList, SIGNAL(highlighted(int)), this, SLOT(slotServerSelected(int)) );
layout->addMultiCellWidget( m_serverList, 0, 0, 0, 2 );
- QPixmap pic;
- pic.convertFromImage( Resource::loadImage( "new" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
- QPushButton *btn = new QPushButton( pic, tr( "New" ), container );
- btn->setMinimumHeight( AppLnk::smallIconSize() );
+ QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ),
+ tr( "New" ), container );
+ btn->setMinimumHeight( AppLnk::smallIconSize()+4 );
QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) );
connect( btn, SIGNAL(clicked()), this, SLOT(slotServerNew()) );
layout->addWidget( btn, 1, 0 );
- pic.convertFromImage( Resource::loadImage( "edit" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
- m_serverEditBtn = new QPushButton( pic, tr( "Edit" ), container );
- m_serverEditBtn->setMinimumHeight( AppLnk::smallIconSize() );
+ m_serverEditBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ),
+ tr( "Edit" ), container );
+ m_serverEditBtn->setMinimumHeight( AppLnk::smallIconSize()+4 );
m_serverEditBtn->setEnabled( false );
QWhatsThis::add( m_serverEditBtn, tr( "Tap here to edit the entry selected above." ) );
connect( m_serverEditBtn, SIGNAL(clicked()), this, SLOT(slotServerEdit()) );
layout->addWidget( m_serverEditBtn, 1, 1 );
- pic.convertFromImage( Resource::loadImage( "trash" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
- m_serverDeleteBtn = new QPushButton( pic, tr( "Delete" ), container );
- m_serverDeleteBtn->setMinimumHeight( AppLnk::smallIconSize() );
+ m_serverDeleteBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "trash", Opie::Core::OResource::SmallIcon ),
+ tr( "Delete" ), container );
+ m_serverDeleteBtn->setMinimumHeight( AppLnk::smallIconSize()+4 );
m_serverDeleteBtn->setEnabled( false );
QWhatsThis::add( m_serverDeleteBtn, tr( "Tap here to delete the entry selected above." ) );
connect( m_serverDeleteBtn, SIGNAL(clicked()), this, SLOT(slotServerDelete()) );
layout->addWidget( m_serverDeleteBtn, 1, 2 );
}
void OIpkgConfigDlg::initDestinationWidget()
{
m_destWidget = new QWidget( this );
// Initialize UI
QVBoxLayout *vb = new QVBoxLayout( m_destWidget );
@@ -218,43 +217,42 @@ void OIpkgConfigDlg::initDestinationWidget()
sv->setResizePolicy( QScrollView::AutoOneFit );
sv->setFrameStyle( QFrame::NoFrame );
QWidget *container = new QWidget( sv->viewport() );
sv->addChild( container );
QGridLayout *layout = new QGridLayout( container, 2, 3, 2, 4 );
m_destList = new QListBox( container );
QWhatsThis::add( m_destList, tr( "This is a list of all destinations configured for this device. Select one here to edit or delete, or add a new one below." ) );
m_destList->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) );
connect( m_destList, SIGNAL(highlighted(int)), this, SLOT(slotDestSelected(int)) );
layout->addMultiCellWidget( m_destList, 0, 0, 0, 2 );
- QPixmap pic;
- pic.convertFromImage( Resource::loadImage( "new" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
- QPushButton *btn = new QPushButton( pic, tr( "New" ), container );
- btn->setMinimumHeight( AppLnk::smallIconSize() );
+ QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ),
+ tr( "New" ), container );
+ btn->setMinimumHeight( AppLnk::smallIconSize()+4 );
QWhatsThis::add( btn, tr( "Tap here to create a new entry. Fill in the fields below and then tap on Update." ) );
connect( btn, SIGNAL(clicked()), this, SLOT(slotDestNew()) );
layout->addWidget( btn, 1, 0 );
- pic.convertFromImage( Resource::loadImage( "edit" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
- m_destEditBtn = new QPushButton( pic, tr( "Edit" ), container );
- m_destEditBtn->setMinimumHeight( AppLnk::smallIconSize() );
+ m_destEditBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ),
+ tr( "Edit" ), container );
+ m_destEditBtn->setMinimumHeight( AppLnk::smallIconSize()+4 );
m_destEditBtn->setEnabled( false );
QWhatsThis::add( m_destEditBtn, tr( "Tap here to edit the entry selected above." ) );
connect( m_destEditBtn, SIGNAL(clicked()), this, SLOT(slotDestEdit()) );
layout->addWidget( m_destEditBtn, 1, 1 );
- pic.convertFromImage( Resource::loadImage( "trash" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
- m_destDeleteBtn = new QPushButton( pic, tr( "Delete" ), container );
- m_destDeleteBtn->setMinimumHeight( AppLnk::smallIconSize() );
+ m_destDeleteBtn = new QPushButton( Opie::Core::OResource::loadPixmap( "trash", Opie::Core::OResource::SmallIcon ),
+ tr( "Delete" ), container );
+ m_destDeleteBtn->setMinimumHeight( AppLnk::smallIconSize()+4 );
m_destDeleteBtn->setEnabled( false );
QWhatsThis::add( m_destDeleteBtn, tr( "Tap here to delete the entry selected above." ) );
connect( m_destDeleteBtn, SIGNAL(clicked()), this, SLOT(slotDestDelete()) );
layout->addWidget( m_destDeleteBtn, 1, 2 );
}
void OIpkgConfigDlg::initProxyWidget()
{
m_proxyWidget = new QWidget( this );
// Initialize UI
QVBoxLayout *vb = new QVBoxLayout( m_proxyWidget );
@@ -348,27 +346,28 @@ void OIpkgConfigDlg::initOptionsWidget()
m_optVerboseIpkg->insertItem( tr( "Normal messages" ) );
m_optVerboseIpkg->insertItem( tr( "Informative messages" ) );
m_optVerboseIpkg->insertItem( tr( "Troubleshooting output" ) );
layout->addMultiCellWidget( m_optVerboseIpkg, 5, 5, 0, 1 );
l = new QLabel( tr( "Package source lists directory:" ), container );
QWhatsThis::add( l, tr( "Enter the directory where package source feed information is stored." ) );
layout->addMultiCellWidget( l, 6, 6, 0, 1 );
m_optSourceLists = new QLineEdit( container );
QWhatsThis::add( m_optSourceLists, tr( "Enter the directory where package source feed information is stored." ) );
layout->addWidget( m_optSourceLists, 7, 0 );
- QPixmap pic;
- pic.convertFromImage( Resource::loadImage( "folder" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
- QPushButton *btn = new QPushButton( pic, QString::null, container );
+
+ QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon ),
+ QString::null, container );
+ btn->setMinimumHeight( AppLnk::smallIconSize()+4 );
btn->setMaximumWidth( btn->height() );
QWhatsThis::add( btn, tr( "Tap here to select the directory where package source feed information is stored." ) );
connect( btn, SIGNAL(clicked()), this, SLOT(slotOptSelectSourceListsPath()) );
layout->addWidget( btn, 7, 1 );
layout->addItem( new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
}
void OIpkgConfigDlg::initData()
{
// Read ipkg configuration (server/destination/proxy) information
if ( m_ipkg && !m_installOptions )
@@ -653,27 +652,26 @@ OIpkgDestDlg::OIpkgDestDlg( OConfItem *dest, QWidget *parent )
layout->addStretch();
label = new QLabel( tr( "Location:" ), this );
QWhatsThis::add( label, tr( "Enter the absolute directory path of this entry here." ) );
layout->addWidget( label );
QHBoxLayout *layout2 = new QHBoxLayout( this, 2, 4 );
layout->addLayout( layout2 );
m_location = new QLineEdit( this );
QWhatsThis::add( m_location, tr( "Enter the absolute directory path of this entry here." ) );
layout2->addWidget( m_location );
- QPixmap pic;
- pic.convertFromImage( Resource::loadImage( "folder" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
- QPushButton *btn = new QPushButton( pic, QString::null, this );
+ QPushButton *btn = new QPushButton( Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon ),
+ QString::null, this );
btn->setMaximumWidth( btn->height() );
QWhatsThis::add( btn, tr( "Tap here to select the desired location." ) );
connect( btn, SIGNAL(clicked()), this, SLOT(slotSelectPath()) );
layout2->addWidget( btn );
// Populate initial information
if ( m_dest )
{
m_name->setText( m_dest->name() );
m_location->setText( m_dest->value() );
m_active->setChecked( m_dest->active() );
}