InstallDialog::InstallDialog(QHelpEngineCore *helpEngine, QWidget *parent, const QString &host, int port) : QDialog(parent), m_helpEngine(helpEngine), m_networkAccessManager(new QNetworkAccessManager(this)), m_networkReply(0), m_host(host), m_port(port) { TRACE_OBJ m_ui.setupUi(this); m_ui.installButton->setEnabled(false); m_ui.cancelButton->setEnabled(false); m_ui.pathLineEdit->setText(QFileInfo(m_helpEngine->collectionFile()).absolutePath()); m_ui.progressBar->hide(); m_windowTitle = tr("Install Documentation"); connect(m_networkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(httpRequestFinished(QNetworkReply*))); connect(m_ui.installButton, SIGNAL(clicked()), this, SLOT(install())); connect(m_ui.cancelButton, SIGNAL(clicked()), this, SLOT(cancelDownload())); connect(m_ui.browseButton, SIGNAL(clicked()), this, SLOT(browseDirectories())); connect(m_ui.listWidget, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(updateInstallButton())); QTimer::singleShot(0, this, SLOT(init())); }
QT_BEGIN_NAMESPACE #ifndef QT_NO_HTTP #define QCH_FILENAME 92943 #define QCH_NAMESPACE 92944 #define QCH_CHECKSUM 92945 InstallDialog::InstallDialog(QHelpEngineCore *helpEngine, QWidget *parent, const QString &host, int port) : QDialog(parent), m_helpEngine(helpEngine), m_host(host), m_port(port) { TRACE_OBJ m_ui.setupUi(this); m_ui.installButton->setEnabled(false); m_ui.cancelButton->setEnabled(false); m_ui.pathLineEdit->setText(QFileInfo(m_helpEngine->collectionFile()).absolutePath()); m_ui.progressBar->hide(); m_windowTitle = tr("Install Documentation"); m_http = new QHttp(this); connect(m_http, SIGNAL(requestFinished(int,bool)), this, SLOT(httpRequestFinished(int,bool))); connect(m_http, SIGNAL(dataReadProgress(int,int)), this, SLOT(updateDataReadProgress(int,int))); connect(m_http, SIGNAL(responseHeaderReceived(QHttpResponseHeader)), this, SLOT(readResponseHeader(QHttpResponseHeader))); connect(m_ui.installButton, SIGNAL(clicked()), this, SLOT(install())); connect(m_ui.cancelButton, SIGNAL(clicked()), this, SLOT(cancelDownload())); connect(m_ui.browseButton, SIGNAL(clicked()), this, SLOT(browseDirectories())); connect(m_ui.listWidget, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(updateInstallButton())); QTimer::singleShot(0, this, SLOT(init())); }