author | llornkcor <llornkcor> | 2004-06-15 10:18:36 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2004-06-15 10:18:36 (UTC) |
commit | c711eea6fb1fa136cd62dc8b7134ee72968c8a53 (patch) (side-by-side diff) | |
tree | 5f467c8abff45e468c4b119122553c1eef7f3beb | |
parent | 83b4b2d2670b63a2a540006cea2ea8808100d308 (diff) | |
download | opie-c711eea6fb1fa136cd62dc8b7134ee72968c8a53.zip opie-c711eea6fb1fa136cd62dc8b7134ee72968c8a53.tar.gz opie-c711eea6fb1fa136cd62dc8b7134ee72968c8a53.tar.bz2 |
start download, fix dialogs
-rw-r--r-- | noncore/apps/opie-gutenbrowser/NetworkDialog.cpp | 30 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/NetworkDialog.h | 14 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/SearchDialog.cpp | 8 |
3 files changed, 26 insertions, 26 deletions
diff --git a/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp b/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp index 6e6b707..d629449 100644 --- a/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp +++ b/noncore/apps/opie-gutenbrowser/NetworkDialog.cpp @@ -59,13 +59,13 @@ NetworkDialog::NetworkDialog( QWidget* parent, const char* name, bool modal, WF networkUrl = strUrl = netL[0]; dir = ftp_base_dir = netL[1]; localFileName = netL[2]; s_partialFileName = netL[3]; - resize(240,110); + resize(240,120); local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/"; // autoOk = autoDownload; // if( networkUrl.find("ftp",0,false)== -1 ) { // if ( !name ) // setName( "HTTP NetworkDialog" ); @@ -96,42 +96,42 @@ void NetworkDialog::initDialog() { hbox->setMargin(4); ProgressBar1 = new QProgressBar( Layout1, "ProgressBar1" ); ProgressBar1->setProgress(0); hbox->addWidget(ProgressBar1,10,AlignCenter); - hbox->addStretch(1); - buttonOk = new QPushButton( Layout1, "buttonOk" ); - buttonOk->setText( tr( "&OK" ) ); - hbox->addWidget(buttonOk,0,AlignRight); - hbox->addSpacing(5); + // hbox->addStretch(1); +// buttonOk = new QPushButton( Layout1, "buttonOk" ); +// buttonOk->setText( tr( "&OK" ) ); +// hbox->addWidget(buttonOk,0,AlignRight); +// hbox->addSpacing(5); buttonCancel = new QPushButton( Layout1, "buttonCancel" ); buttonCancel->setText( tr( "&Cancel" ) ); buttonCancel->setAutoDefault( TRUE ); buttonCancel->setDefault( TRUE ); hbox->addWidget(buttonCancel,0,AlignRight); - ProgressBar1->setFixedSize(140,22); - buttonOk->setFixedSize(35,22); - buttonCancel->setFixedSize(35,22); + ProgressBar1->setFixedSize(150,25); +// buttonOk->setFixedSize(35,22); + buttonCancel->setFixedSize(50,25); warnLabel ->setGeometry( QRect( 5,1,230,25)); TextLabel3->setGeometry( QRect( 5,20,230,25)); Layout1->setGeometry( QRect(1,60,235,50)); //TODO check these!! // timer= new QTimer(this,"vu timer"); // connectionTimer=new QTimer(this,"connectionTimeout"); - connect(buttonOk,SIGNAL(clicked()),this,SLOT(doOk())); +// connect(buttonOk,SIGNAL(clicked()),this,SLOT(doOk())); connect(buttonCancel,SIGNAL(clicked()),this,SLOT(reject())); // connect( timer, SIGNAL(timeout()), this , SLOT(timeSlot())); // connect( connectionTimer,SIGNAL( timeout()),this,SLOT( connectionTimeSlot())); - if(autoOk) { - owarn << "XXXXXXXXXXXXXXXXXXXXXXXX" << oendl; - buttonOk->setDown(true); - doOk(); - } +// if(autoOk) { +// buttonOk->setDown(true); + QTimer::singleShot( 1000, this, SLOT( doOk() )); +// } + } void NetworkDialog::timeSlot() { // if(timerProgess < 19 && posTimer) { // ProgressBar1->setProgress(timerProgess); diff --git a/noncore/apps/opie-gutenbrowser/NetworkDialog.h b/noncore/apps/opie-gutenbrowser/NetworkDialog.h index 447979f..61595a8 100644 --- a/noncore/apps/opie-gutenbrowser/NetworkDialog.h +++ b/noncore/apps/opie-gutenbrowser/NetworkDialog.h @@ -27,37 +27,37 @@ //#include <qtimer.h> //class QProgressBar; class NetworkDialog : public QDialog -{ +{ Q_OBJECT public: NetworkDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0, const QStringList netList=0); /* NetworkDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0, const QString & UrlStr = 0, const QString & dirStr=0,const QString & fileStr=0, const QString & psrtialFile=0); */ ~NetworkDialog(); - + QFile fiole; QTimer * connectionTimer; QTimer * timer; int timerProgess; - bool posTimer; + bool posTimer; QString s_partialFileName, s_finally; bool foundIt, successDownload; QLabel * warnLabel; QLabel* TextLabel3; QPushButton* buttonHelp; bool ok; QString local_library; QString ftp_host; QString ftp_base_dir; - QString dir, strUrl, networkUrl; - - QPushButton* buttonOk; + QString dir, strUrl, networkUrl; + +// QPushButton* buttonOk; QPushButton* buttonCancel; QString localFileName; bool fileFound; int i, totalBytesDownloaded; bool autoOk; @@ -69,13 +69,13 @@ protected: private slots: bool downloadFile( QString strUrl); void connectionTimeSlot(); void timeSlot(); void doOk(); - + private: /* #ifndef Q_WS_QWS */ /* QString getOpenFileName(); */ /* QUrlOperator op; */ /* #endif */ diff --git a/noncore/apps/opie-gutenbrowser/SearchDialog.cpp b/noncore/apps/opie-gutenbrowser/SearchDialog.cpp index d989304..055ffee 100644 --- a/noncore/apps/opie-gutenbrowser/SearchDialog.cpp +++ b/noncore/apps/opie-gutenbrowser/SearchDialog.cpp @@ -27,14 +27,14 @@ SearchDialog::SearchDialog( QWidget* parent, const char* name, bool modal, WFla Config cfg("Gutenbrowser"); cfg.setGroup("General"); QString lastSearch=cfg.readEntry("LastSearch",""); #warning FIXME // FIXME - resize( 220,100); - + resize( 220,110); + QGridLayout *layout = new QGridLayout( this ); layout->setSpacing( 2); layout->setMargin( 2); QString local_library = (QDir::homeDirPath ()) +"/Applications/gutenbrowser/"; TextLabel1 = new QLabel( this, "TextLabel1" ); @@ -95,13 +95,13 @@ bool SearchDialog::forward_search() { } void SearchDialog::byeBye() { searchString = get_text(); -// odebug << "Search string is "+searchString << oendl; +// odebug << "Search string is "+searchString << oendl; Config cfg("Gutenbrowser"); cfg.setGroup("General"); cfg.writeEntry("LastSearch",searchString); QString thisName=name(); if( thisName.find("Library Search", 0, TRUE) != -1) { @@ -116,13 +116,13 @@ void SearchDialog::byeBye() } } void SearchDialog::closed() { searchString = get_text(); -// odebug << "Search string is "+searchString << oendl; +// odebug << "Search string is "+searchString << oendl; Config cfg("Gutenbrowser"); cfg.setGroup("General"); cfg.writeEntry("LastSearch",searchString); emit search_done_signal(); //this->reject(); |