summaryrefslogtreecommitdiff
path: root/noncore/net/opieftp
authormickeyl <mickeyl>2003-10-29 18:18:19 (UTC)
committer mickeyl <mickeyl>2003-10-29 18:18:19 (UTC)
commit1af1f1d9f398d38a2bc666cd2edff5725da7a770 (patch) (side-by-side diff)
treeb3bb0d90cafc1e933b5b9297a7b2669ce3b184ea /noncore/net/opieftp
parent35615947e11575a61456c8483e7f6d67fe59d5ed (diff)
downloadopie-1af1f1d9f398d38a2bc666cd2edff5725da7a770.zip
opie-1af1f1d9f398d38a2bc666cd2edff5725da7a770.tar.gz
opie-1af1f1d9f398d38a2bc666cd2edff5725da7a770.tar.bz2
mrege noncore/net/*
Diffstat (limited to 'noncore/net/opieftp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opieftp/main.cpp15
-rw-r--r--noncore/net/opieftp/opieftp.cpp10
-rw-r--r--noncore/net/opieftp/opieftp.h3
-rw-r--r--noncore/net/opieftp/opieftp.pro4
4 files changed, 10 insertions, 22 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
@@ -1,27 +1,16 @@
/***************************************************************************
main.cpp - description
-------------------
begin : March 10, 2002
copyright : (C) 2002 by llornkcor
email : ljp@llornkcor.com
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
-#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
@@ -36,50 +36,50 @@ extern "C" {
#include <qtabwidget.h>
#include <qlayout.h>
#include <qmessagebox.h>
#include <qlineedit.h>
#include <qlistbox.h>
#include <unistd.h>
#include <stdlib.h>
QProgressBar *ProgressBar;
static netbuf *conn=NULL;
static int log_progress(netbuf *, int xfered, void *)
{
// int fsz = *(int *)arg;
// int pct = (xfered * 100) / fsz;
// printf("%3d%%\r", pct);
// fflush(stdout);
ProgressBar->setProgress(xfered);
qApp->processEvents();
return 1;
}
-OpieFtp::OpieFtp( )
- : QMainWindow( )
+OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl)
+ : QMainWindow( parent, name, fl )
{
setCaption( tr( "OpieFtp" ) );
fuckeduphack=FALSE;
QGridLayout *layout = new QGridLayout( this );
layout->setSpacing( 2);
layout->setMargin( 2);
connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
QPEMenuBar *menuBar = new QPEMenuBar(this);
// QPEToolBar *menuBar = new QPEToolBar(this);
// menuBar->setHorizontalStretchable( TRUE );
QWMatrix matrix;
QPixmap pix(Resource::loadPixmap( "UnknownDocument" ));
matrix.scale( .4, .4);
unknownXpm = pix.xForm(matrix);
connectionMenu = new QPopupMenu( this );
localMenu = new QPopupMenu( this );
remoteMenu = new QPopupMenu( this );
tabMenu = new QPopupMenu( this );
layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 );
@@ -249,59 +249,59 @@ OpieFtp::OpieFtp( )
SLOT(serverComboEdited(const QString & ) ));
QLabel *TextLabel5 = new QLabel( tab_3, "TextLabel5" );
TextLabel5->setText( tr( "Remote path" ) );
tabLayout_3->addMultiCellWidget( TextLabel5, 2, 2, 2, 3 );
remotePath = new QLineEdit( "/", tab_3, "remotePath" );
tabLayout_3->addMultiCellWidget( remotePath, 3, 3, 2, 3 );
TextLabel4 = new QLabel( tab_3, "TextLabel4" );
TextLabel4->setText( tr( "Port" ) );
tabLayout_3->addMultiCellWidget( TextLabel4, 4, 4, 0, 1 );
PortSpinBox = new QSpinBox( tab_3, "PortSpinBox" );
PortSpinBox->setButtonSymbols( QSpinBox::UpDownArrows );
PortSpinBox->setMaxValue(32786);
tabLayout_3->addMultiCellWidget( PortSpinBox, 4, 4, 1, 1);
serverListView = new QListBox( tab_3, "ServerListView" );
tabLayout_3->addMultiCellWidget( serverListView , 5, 5, 0, 5);
connect( serverListView, SIGNAL( highlighted( const QString &)),
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);
connectServerBtn->setToggleButton(TRUE);
connect(connectServerBtn,SIGNAL( toggled( bool)),SLOT( connectorBtnToggled(bool) ));
- newServerButton= new QPushButton( "Add", tab_3 , "NewServerButton" );
+ newServerButton= new QPushButton( tr("Add"), tab_3 , "NewServerButton" );
tabLayout_3->addMultiCellWidget( newServerButton, 6, 6, 2, 2);
connect( newServerButton,SIGNAL( clicked()),SLOT( NewServer() ));
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);
connect(deleteServerBtn,SIGNAL(clicked()),SLOT(deleteServer()));
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
tabLayout_3->addItem( spacer, 5, 0 );
TabWidget->insertTab( tab_3, tr( "Config" ) );
connect(TabWidget,SIGNAL(currentChanged(QWidget *)),
this,SLOT(tabChanged(QWidget*)));
currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
currentDir.setPath( QDir::currentDirPath());
// currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst);
currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" );
layout->addMultiCellWidget( currentPathCombo, 3, 3, 0, 4);
currentPathCombo ->setFixedWidth(220);
currentPathCombo->setEditable(TRUE);
currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
connect( currentPathCombo, SIGNAL( activated( const QString & ) ),
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
@@ -26,51 +26,52 @@ class QGridLayout;
class QComboBox;
class QListView;
class QListViewItem;
class QLabel;
class QProgressBar;
class QSpinBox;
class QTabWidget;
class QWidget;
class QPEToolBar;
class QPEMenuBar;
class QPopupMenu;
class QFile;
class QLineEdit;
class QPushButton;
class QToolButton;
class QStringList;
class QListBox;
class QTimer;
class OpieFtp : public QMainWindow
{
Q_OBJECT
public:
- OpieFtp( );
+ OpieFtp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~OpieFtp();
+ static QString appName() { return QString::fromLatin1("opieftp"); }
QTabWidget *TabWidget;
QWidget *tab, *tab_2, *tab_3;
QListView *Local_View, *Remote_View;
QListBox *serverListView;
QComboBox *UsernameComboBox, *ServerComboBox, *currentPathCombo;
QLineEdit *PasswordEdit, *remotePath;
QLabel *TextLabel2, *TextLabel1, *TextLabel3, *TextLabel4;;
QSpinBox* PortSpinBox;
QPopupMenu *connectionMenu, *localMenu, *remoteMenu, *tabMenu, *aboutMenu;
QDir currentDir;
QString currentRemoteDir;
QString filterStr;
QListViewItem * item;
QPushButton *connectServerBtn, *newServerButton;//
QToolButton *cdUpButton, *homeButton, *docButton;
bool b;
int currentServerConfig;
protected slots:
void timerOut();
void upDir();
void homeButtonPushed();
void docButtonPushed();
void doAbout();
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,30 +1,28 @@
-TEMPLATE = app
-CONFIG += qt warn_on release
+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
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe -lftplib
TRANSLATIONS = ../../../i18n/de/opieftp.ts \
../../../i18n/nl/opieftp.ts \
../../../i18n/da/opieftp.ts \
../../../i18n/xx/opieftp.ts \
../../../i18n/en/opieftp.ts \
../../../i18n/es/opieftp.ts \
../../../i18n/fr/opieftp.ts \
../../../i18n/hu/opieftp.ts \
../../../i18n/ja/opieftp.ts \
../../../i18n/ko/opieftp.ts \
../../../i18n/no/opieftp.ts \
../../../i18n/pl/opieftp.ts \
../../../i18n/pt/opieftp.ts \
../../../i18n/pt_BR/opieftp.ts \
../../../i18n/sl/opieftp.ts \
../../../i18n/zh_CN/opieftp.ts \
../../../i18n/zh_TW/opieftp.ts