summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-gutenbrowser/NetworkDialog.h
blob: 61595a8e96b88e50f1fb3d5490bf3e06aa4f24ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/***************************************************************************
                          NetworkDialog.h  -  description
                             -------------------
    begin                : Sun Aug 27 2000
    copyright            : (C) 2000 -2004 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.                                   *
 *                                                                         *
 ***************************************************************************/
#ifndef NETWORKDIALOG_H
#define NETWORKDIALOG_H

#include <qdialog.h>
#include <qurloperator.h>
#include <qcstring.h>
#include <qfile.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qstringlist.h>

//#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;
    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;
    QPushButton* buttonCancel;

    QString localFileName;
    bool fileFound;
    int i, totalBytesDownloaded;
		bool autoOk;

		void initDialog();

protected:
    QHBoxLayout* hbox;

private slots:
		bool downloadFile( QString strUrl);
		void connectionTimeSlot();
		void timeSlot();
		void doOk();

	private:
/*  #ifndef Q_WS_QWS */

/*      QString getOpenFileName(); */
/*      QUrlOperator op; */
/*  #endif */
};

#endif // NETWORKDIALOG_H