summaryrefslogtreecommitdiff
authordrw <drw>2005-05-04 23:07:10 (UTC)
committer drw <drw>2005-05-04 23:07:10 (UTC)
commitd89cbf4ba511beaf228ce87d4e21a2a6a49767f2 (patch) (side-by-side diff)
treed7c1518bfa0550b99d73fe85630cebe351155a37
parent5db2256e7e342f290e17096cf70b8b318bfcd987 (diff)
downloadopie-d89cbf4ba511beaf228ce87d4e21a2a6a49767f2.zip
opie-d89cbf4ba511beaf228ce87d4e21a2a6a49767f2.tar.gz
opie-d89cbf4ba511beaf228ce87d4e21a2a6a49767f2.tar.bz2
Resource -> OResource
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieftp/opie-ftp.control2
-rw-r--r--noncore/net/opieftp/opieftp.cpp71
2 files changed, 32 insertions, 41 deletions
diff --git a/noncore/net/opieftp/opie-ftp.control b/noncore/net/opieftp/opie-ftp.control
index 32cc7a6..82f774f 100644
--- a/noncore/net/opieftp/opie-ftp.control
+++ b/noncore/net/opieftp/opie-ftp.control
@@ -6,3 +6,3 @@ Maintainer: L.J. Potter <ljp@llornkcor.com>
Architecture: arm
-Depends: task-opie-minimal, ftplib
+Depends: task-opie-minimal, ftplib, libopiecore2
Replaces: opieftp
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp
index 4f0ca29..14fd859 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -25,20 +25,23 @@ extern "C" {
-#include <qpe/qpeapplication.h>
-#include <qpe/resource.h>
+#include <opie2/oresource.h>
+
+#include <qpe/applnk.h>
#include <qpe/config.h>
#include <qpe/mimetype.h>
+#include <qpe/qpeapplication.h>
+#include <qpe/qpemenubar.h>
-#include <qtextstream.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
+#include <qbitmap.h>
#include <qcombobox.h>
-#include <qlistview.h>
#include <qlabel.h>
+#include <qlayout.h>
+#include <qlistview.h>
+#include <qmenubar.h>
+#include <qmessagebox.h>
#include <qprogressbar.h>
+#include <qpushbutton.h>
#include <qspinbox.h>
#include <qtabwidget.h>
-#include <qlayout.h>
-#include <qmessagebox.h>
-#include <qmenubar.h>
-#include <qpe/qpemenubar.h>
+#include <qtextstream.h>
+#include <qtoolbutton.h>
@@ -92,6 +95,3 @@ void OpieFtp::initializeGui() {
- QWMatrix matrix;
- QPixmap pix(Resource::loadPixmap( "UnknownDocument" ));
- matrix.scale( .4, .4);
- unknownXpm = pix.xForm(matrix);
+ unknownXpm = Opie::Core::OResource::loadPixmap( "UnknownDocument", Opie::Core::OResource::SmallIcon );
@@ -135,10 +135,9 @@ void OpieFtp::initializeGui() {
tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() ));
- tabMenu->insertSeparator();
-// tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() ));
tabMenu->setCheckable(TRUE);
-
+ bool useBigPix = qApp->desktop()->size().width() > 330;
cdUpButton = new QToolButton( view,"cdUpButton");
- cdUpButton->setPixmap(Resource::loadPixmap("up"));
- cdUpButton ->setFixedSize( QSize( 20, 20 ) );
+ cdUpButton->setUsesBigPixmap( useBigPix );
+ cdUpButton->setPixmap( Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ) );
+ cdUpButton->setFixedSize( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) );
@@ -147,11 +146,6 @@ void OpieFtp::initializeGui() {
-// docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",view,"docsButton");
-// docButton->setFixedSize( QSize( 20, 20 ) );
-// connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) );
-// docButton->setFlat(TRUE);
-// layout->addMultiCellWidget( docButton, 0, 0, 6, 6 );
-
homeButton = new QToolButton( view,"homeButton");
- homeButton->setPixmap( Resource::loadPixmap("home"));
- homeButton->setFixedSize( QSize( 20, 20 ) );
+ homeButton->setUsesBigPixmap( useBigPix );
+ homeButton->setPixmap( Opie::Core::OResource::loadPixmap( "home", Opie::Core::OResource::SmallIcon ) );
+ homeButton->setFixedSize( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) );
@@ -163,4 +157,2 @@ void OpieFtp::initializeGui() {
-// TabWidget->setTabShape(QTabWidget::Triangular);
-
tab = new QWidget( TabWidget, "tab" );
@@ -343,3 +335,3 @@ void OpieFtp::initializeGui() {
TabWidget->setCurrentPage(2);
- qDebug("XXXXXXXXXXXX Constructor done");
+// qDebug("XXXXXXXXXXXX Constructor done");
@@ -701,5 +693,5 @@ void OpieFtp::populateLocalView()
if( !QDir( fi->filePath() ).isReadable())
- pm = Resource::loadPixmap( "lockedfolder" );
+ pm = Opie::Core::OResource::loadPixmap( "lockedfolder", Opie::Core::OResource::SmallIcon );
else
- pm= Resource::loadPixmap( "folder" );
+ pm = Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon );
item->setPixmap( 0,pm );
@@ -707,3 +699,3 @@ void OpieFtp::populateLocalView()
if( !fi->isReadable() )
- pm = Resource::loadPixmap( "locked" );
+ pm = Opie::Core::OResource::loadPixmap( "locked", Opie::Core::OResource::SmallIcon );
else {
@@ -717,9 +709,8 @@ void OpieFtp::populateLocalView()
// overlay link image
- pm= Resource::loadPixmap( "folder" );
- QPixmap lnk = Resource::loadPixmap( "opie/symlink" );
+ pm = Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon );
+ QPixmap lnk = Opie::Core::OResource::loadPixmap( "opie/symlink" );
QPainter painter( &pm );
painter.drawPixmap( pm.width()-lnk.width(), pm.height()-lnk.height(), lnk );
- pm.setMask( pm.createHeuristicMask( FALSE ) );
}
- item->setPixmap( 0,pm);
+ item->setPixmap( 0,pm);
}
@@ -765,3 +756,3 @@ bool OpieFtp::populateRemoteView( )
QListViewItem * item = new QListViewItem( Remote_View, fileL, fileDate, fileS,"d");
- item->setPixmap( 0, Resource::loadPixmap( "folder" ));
+ item->setPixmap( 0, Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon ));
// if(itemDir)
@@ -771,3 +762,3 @@ bool OpieFtp::populateRemoteView( )
QListViewItem * item = new QListViewItem( Remote_View, fileL, fileDate, fileS,"f");
- item->setPixmap( 0, Resource::loadPixmap( "fileopen" ));
+ item->setPixmap( 0, Opie::Core::OResource::loadPixmap( "fileopen", Opie::Core::OResource::SmallIcon ));
// if(itemFile)
@@ -779,3 +770,3 @@ bool OpieFtp::populateRemoteView( )
QListViewItem * item1 = new QListViewItem( Remote_View, "../");
- item1->setPixmap( 0, Resource::loadPixmap( "folder" ));
+ item1->setPixmap( 0, Opie::Core::OResource::loadPixmap( "folder", Opie::Core::OResource::SmallIcon ));
file.close();