author | mickeyl <mickeyl> | 2003-10-29 18:18:19 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-10-29 18:18:19 (UTC) |
commit | 1af1f1d9f398d38a2bc666cd2edff5725da7a770 (patch) (side-by-side diff) | |
tree | b3bb0d90cafc1e933b5b9297a7b2669ce3b184ea /noncore/net/opieftp | |
parent | 35615947e11575a61456c8483e7f6d67fe59d5ed (diff) | |
download | opie-1af1f1d9f398d38a2bc666cd2edff5725da7a770.zip opie-1af1f1d9f398d38a2bc666cd2edff5725da7a770.tar.gz opie-1af1f1d9f398d38a2bc666cd2edff5725da7a770.tar.bz2 |
mrege noncore/net/*
-rw-r--r-- | noncore/net/opieftp/main.cpp | 15 | ||||
-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 58 | ||||
-rw-r--r-- | noncore/net/opieftp/opieftp.h | 3 | ||||
-rw-r--r-- | noncore/net/opieftp/opieftp.pro | 6 |
4 files changed, 35 insertions, 47 deletions
diff --git a/noncore/net/opieftp/main.cpp b/noncore/net/opieftp/main.cpp index 4f5a7d4..0217e41 100644 --- a/noncore/net/opieftp/main.cpp +++ b/noncore/net/opieftp/main.cpp @@ -12,16 +12,5 @@ ***************************************************************************/ -#include <qpe/qpeapplication.h> - - - +#include <opie/oapplicationfactory.h> #include "opieftp.h" -int main(int argc, char *argv[]) -{ - QPEApplication a(argc, argv); - - OpieFtp opieftp; - a.showMainWidget( &opieftp); - return a.exec(); -} - +OPIE_EXPORT_APP( OApplicationFactory<OpieFtp> ) diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 269449e..ee7d32f 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp @@ -59,4 +59,4 @@ static int log_progress(netbuf *, int xfered, void *) -OpieFtp::OpieFtp( ) - : QMainWindow( ) +OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) + : QMainWindow( parent, name, fl ) { @@ -83,3 +83,3 @@ OpieFtp::OpieFtp( ) tabMenu = new QPopupMenu( this ); - + layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 ); @@ -271,4 +271,4 @@ OpieFtp::OpieFtp( ) this,SLOT( serverListClicked( const QString &) ) ); - - connectServerBtn = new QPushButton( "Connect", tab_3 , "ConnectButton" ); + + connectServerBtn = new QPushButton( tr("Connect"), tab_3 , "ConnectButton" ); tabLayout_3->addMultiCellWidget( connectServerBtn, 6, 6, 0, 1); @@ -277,3 +277,3 @@ OpieFtp::OpieFtp( ) - newServerButton= new QPushButton( "Add", tab_3 , "NewServerButton" ); + newServerButton= new QPushButton( tr("Add"), tab_3 , "NewServerButton" ); tabLayout_3->addMultiCellWidget( newServerButton, 6, 6, 2, 2); @@ -282,3 +282,3 @@ OpieFtp::OpieFtp( ) QPushButton *deleteServerBtn; - deleteServerBtn = new QPushButton( "Delete", tab_3 , "OpenButton" ); + deleteServerBtn = new QPushButton( tr("Delete"), tab_3 , "OpenButton" ); tabLayout_3->addMultiCellWidget( deleteServerBtn, 6, 6, 3, 3); @@ -321,3 +321,3 @@ OpieFtp::OpieFtp( ) // ServerComboBox->setCurrentItem(currentServerConfig); - + TabWidget->setCurrentPage(2); @@ -359,3 +359,3 @@ void OpieFtp::tabChanged(QWidget *) homeButton->show(); - + } @@ -451,3 +451,3 @@ void OpieFtp::connector() // if(ftp_pass != cfg.readEntry(cfg.readEntry("Username"))) -// currentServerConfig=-1; +// currentServerConfig=-1; @@ -595,3 +595,3 @@ void OpieFtp::remoteDownload() } - Remote_View->setFocus(); + Remote_View->setFocus(); TabWidget->setCurrentPage(0); @@ -671,3 +671,3 @@ void OpieFtp::populateLocalView() QPixmap pm; - + if(isDir || fileL.find("/",0,TRUE) != -1) { @@ -731,3 +731,3 @@ bool OpieFtp::populateRemoteView( ) fileL = s.right(s.length() - month - len); - if(s.left(1) == "d") + if(s.left(1) == "d") fileL = fileL+"/"; @@ -817,4 +817,4 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) // QCopEnvelope ( "QPE/System", "notBusy()" ); - Remote_View->ensureItemVisible(Remote_View->firstChild()); - + Remote_View->ensureItemVisible(Remote_View->firstChild()); + } @@ -825,3 +825,3 @@ void OpieFtp::localListClicked(QListViewItem *selectedItem) if(selectedItem!= NULL) { - + QString strItem=selectedItem->text(0); @@ -838,3 +838,3 @@ void OpieFtp::localListClicked(QListViewItem *selectedItem) if(strItem.find(". .",0,TRUE) && strItem.find("/",0,TRUE)!=-1 ) { - + if(QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem)).exists() ) { @@ -860,3 +860,3 @@ void OpieFtp::localListClicked(QListViewItem *selectedItem) } - Local_View->ensureItemVisible(Local_View->firstChild()); + Local_View->ensureItemVisible(Local_View->firstChild()); } @@ -974,3 +974,3 @@ void OpieFtp::localDelete() it.current()->setSelected(FALSE); - + // QString f = Local_View->currentItem()->text(0); @@ -999,3 +999,3 @@ void OpieFtp::localDelete() break; - case 1: + case 1: // exit @@ -1007,3 +1007,3 @@ void OpieFtp::localDelete() populateLocalView(); - + } @@ -1203,6 +1203,6 @@ void OpieFtp::readConfig() currentServerConfig = cfg.readNumEntry("currentServer", -1); - + // qDebug("Reading %d", currentServerConfig); serverComboSelected( currentServerConfig-1); - + } @@ -1256,3 +1256,3 @@ void OpieFtp::writeConfig() cfg.writeEntry("numberOfEntries", QString::number(numberOfEntries + 1 )); - + } @@ -1328,5 +1328,5 @@ void OpieFtp::serverComboSelected(int index) if( portInt == 0) portInt = 21; - + ServerComboBox->lineEdit()->setText(remoteServerStr.left( remoteServerStr.find(":",0,TRUE))); - + PortSpinBox->setValue( portInt); @@ -1342,3 +1342,3 @@ void OpieFtp::serverComboSelected(int index) // PasswordEdit - + cfg.setGroup("Server"); @@ -1360,3 +1360,3 @@ void OpieFtp::deleteServer() servername=serverListView->currentText(); - + Config cfg("opieftp"); @@ -1495,3 +1495,3 @@ void OpieFtp::NewServer() { writeConfig(); - serverListView->insertItem( newServerName ); + serverListView->insertItem( newServerName ); serverListView->setCurrentItem( serverListView->count()); diff --git a/noncore/net/opieftp/opieftp.h b/noncore/net/opieftp/opieftp.h index 9d5d211..7bd615a 100644 --- a/noncore/net/opieftp/opieftp.h +++ b/noncore/net/opieftp/opieftp.h @@ -49,5 +49,6 @@ class OpieFtp : public QMainWindow public: - OpieFtp( ); + OpieFtp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~OpieFtp(); + static QString appName() { return QString::fromLatin1("opieftp"); } QTabWidget *TabWidget; diff --git a/noncore/net/opieftp/opieftp.pro b/noncore/net/opieftp/opieftp.pro index ac16819..185c341 100644 --- a/noncore/net/opieftp/opieftp.pro +++ b/noncore/net/opieftp/opieftp.pro @@ -1,7 +1,5 @@ -TEMPLATE = app -CONFIG += qt warn_on release -HEADERS = opieftp.h inputDialog.h +CONFIG += qt warn_on release quick-app +HEADERS = opieftp.h inputDialog.h SOURCES = opieftp.cpp inputDialog.cpp main.cpp TARGET = opieftp -DESTDIR = $(OPIEDIR)/bin INCLUDEPATH += $(OPIEDIR)/include |