diff options
Diffstat (limited to 'examples/network/ftp/ftpwindow.cpp')
-rw-r--r-- | examples/network/ftp/ftpwindow.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/examples/network/ftp/ftpwindow.cpp b/examples/network/ftp/ftpwindow.cpp index 3e4a128..ffab8b4 100644 --- a/examples/network/ftp/ftpwindow.cpp +++ b/examples/network/ftp/ftpwindow.cpp @@ -44,6 +44,10 @@ #include "ftpwindow.h" +#ifdef Q_OS_SYMBIAN +#include "sym_iap_util.h" +#endif + FtpWindow::FtpWindow(QWidget *parent) : QDialog(parent), ftp(0) { @@ -52,6 +56,10 @@ FtpWindow::FtpWindow(QWidget *parent) ftpServerLabel->setBuddy(ftpServerLineEdit); statusLabel = new QLabel(tr("Please enter the name of an FTP server.")); +#ifdef Q_OS_SYMBIAN + // Use word wrapping to fit the text on screen + statusLabel->setWordWrap( true ); +#endif fileList = new QTreeWidget; fileList->setEnabled(false); @@ -90,16 +98,31 @@ FtpWindow::FtpWindow(QWidget *parent) QHBoxLayout *topLayout = new QHBoxLayout; topLayout->addWidget(ftpServerLabel); topLayout->addWidget(ftpServerLineEdit); +#ifndef Q_OS_SYMBIAN topLayout->addWidget(cdToParentButton); topLayout->addWidget(connectButton); +#else + // Make app better lookin on small screen + QHBoxLayout *topLayout2 = new QHBoxLayout; + topLayout2->addWidget(cdToParentButton); + topLayout2->addWidget(connectButton); +#endif QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addLayout(topLayout); +#ifdef Q_OS_SYMBIAN + // Make app better lookin on small screen + mainLayout->addLayout(topLayout2); +#endif mainLayout->addWidget(fileList); mainLayout->addWidget(statusLabel); mainLayout->addWidget(buttonBox); setLayout(mainLayout); +#ifdef Q_OS_SYMBIAN + bDefaultIapSet = false; +#endif + setWindowTitle(tr("FTP")); } @@ -111,6 +134,12 @@ QSize FtpWindow::sizeHint() const //![0] void FtpWindow::connectOrDisconnect() { +#ifdef Q_OS_SYMBIAN + if(!bDefaultIapSet) { + qt_SetDefaultIap(); + bDefaultIapSet = true; + } +#endif if (ftp) { ftp->abort(); ftp->deleteLater(); @@ -124,6 +153,7 @@ void FtpWindow::connectOrDisconnect() #ifndef QT_NO_CURSOR setCursor(Qt::ArrowCursor); #endif + statusLabel->setText(tr("Please enter the name of an FTP server.")); return; } |