: QMainWindow(parent
), twCountries
(0), progressDialog
(this) {
//QErrorMessage::qtHandler();
setupUi(this);
readSettings();
earlerDate = earlerDate.addDays(-10);
dateEdit->setDate(earlerDate);
dateEdit->setCalendarPopup(true);
toolBar->addWidget(dateEdit);
connect(http, SIGNAL(requestFinished(int, bool)),
this, SLOT(httpRequestFinished(int, bool)));
connect(http, SIGNAL(requestStarted(int)), this, SLOT(httpRequestStarted(int)));
connect(http, SIGNAL(dataReadProgress(int, int)),
this, SLOT(updateDataReadProgress(int, int)));
connect(http,
SIGNAL(authenticationRequired
(const QString &, quint16, QAuthenticator
*)),
this,
SLOT(slotAuthenticationRequired
(const QString &, quint16, QAuthenticator
*)));
connect(&progressDialog, SIGNAL(canceled()), http, SLOT(abort()));
http->setHost(host);
spohttp
= new QHttp(this);
connect(spohttp, SIGNAL(requestFinished(int, bool)),
this, SLOT(httpSpoRequestFinished(int, bool)));
connect(spohttp, SIGNAL(requestStarted(int)), this, SLOT(httpSpoRequestStarted(int)));
connect(spohttp, SIGNAL(dataReadProgress(int, int)),
this, SLOT(updateSpoDataReadProgress(int, int)));
connect(spohttp,
SIGNAL(authenticationRequired
(const QString &, quint16, QAuthenticator
*)),
this,
SLOT(slotSpoAuthenticationRequired
(const QString &, quint16, QAuthenticator
*)));
spohttp->setHost(host);
screenCenter();
QMetaObject::invokeMethod(this,
"show", Qt
::QueuedConnection);
}
SpoList::SpoList(QWidget *parent)
: QMainWindow(parent), twCountries(0), progressDialog(this)
{
//QErrorMessage::qtHandler();
setupUi(this);
readSettings();
QDateEdit *dateEdit = new QDateEdit(this);
QDate earlerDate = QDate::currentDate();
earlerDate = earlerDate.addDays(-10);
dateEdit->setDate(earlerDate);
dateEdit->setCalendarPopup(true);
toolBar->addWidget(dateEdit);
http = new QHttp(this);
connect(http, SIGNAL(requestFinished(int, bool)),
this, SLOT(httpRequestFinished(int, bool)));
connect(http, SIGNAL(requestStarted(int)), this, SLOT(httpRequestStarted(int)));
connect(http, SIGNAL(dataReadProgress(int, int)),
this, SLOT(updateDataReadProgress(int, int)));
connect(http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)),
this, SLOT(readResponseHeader(const QHttpResponseHeader &)));
connect(http, SIGNAL(authenticationRequired(const QString &, quint16, QAuthenticator *)),
this, SLOT(slotAuthenticationRequired(const QString &, quint16, QAuthenticator *)));
connect(&progressDialog, SIGNAL(canceled()), http, SLOT(abort()));
http->setHost(host);
spohttp = new QHttp(this);
connect(spohttp, SIGNAL(requestFinished(int, bool)),
this, SLOT(httpSpoRequestFinished(int, bool)));
connect(spohttp, SIGNAL(requestStarted(int)), this, SLOT(httpSpoRequestStarted(int)));
connect(spohttp, SIGNAL(dataReadProgress(int, int)),
this, SLOT(updateSpoDataReadProgress(int, int)));
connect(spohttp, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)),
this, SLOT(readSpoResponseHeader(const QHttpResponseHeader &)));
connect(spohttp, SIGNAL(authenticationRequired(const QString &, quint16, QAuthenticator *)),
this, SLOT(slotSpoAuthenticationRequired(const QString &, quint16, QAuthenticator *)));
spohttp->setHost(host);
screenCenter();
QMetaObject::invokeMethod(this, "show", Qt::QueuedConnection);
}
To copy to clipboard, switch view to plain text mode
Bookmarks