X-Git-Url: https://git.johniez.cz/?p=aspt.git;a=blobdiff_plain;f=configtab.cc;fp=configtab.cc;h=fa2b24cd1a534980b96c9d9f3f1025546983c278;hp=841dd046c465f400efc786ee194ac5ba3d4e8bb5;hb=d5bb30030db3f96b903382a8f862c76d73fdc2b2;hpb=b935a223648e5014d780856903a1b421c7e84398 diff --git a/configtab.cc b/configtab.cc index 841dd04..fa2b24c 100755 --- a/configtab.cc +++ b/configtab.cc @@ -6,6 +6,9 @@ http://creativecommons.org/licenses/by-nc-nd/2.5/legalcode #include "configtab.h" +/** + * \brief Config Tab constructor. + */ ConfigTab::ConfigTab(QWidget *parent): QWidget(parent) { file = 0; http = new QHttp; @@ -76,6 +79,9 @@ ConfigTab::ConfigTab(QWidget *parent): QWidget(parent) { setLayout(mainLayout); } +/** + * \brief Config Tab destructor. + */ ConfigTab::~ConfigTab() { if(file) delete file; delete http; @@ -100,14 +106,24 @@ ConfigTab::~ConfigTab() { delete mainLayout; } +/** + * \brief Slot assigned to language change action. + * \param langId language ID. + */ void ConfigTab::changeLang(int langId) { langToSave = langId; } +/** + * \brief Slot assigned to proxy settings opening action. + */ void ConfigTab::openProxy() { proxyWin = new ProxySet(); } +/** + * \brief Slot assigned to save button click. + */ void ConfigTab::saveSettings() { const char* langs[5] = {"en", "cs", "ro", "pl", "lt"}; QSettings settings("config/global.ini", QSettings::IniFormat); @@ -117,6 +133,9 @@ void ConfigTab::saveSettings() { } } +/** + * \brief Slot assigned to download button click. + */ void ConfigTab::downloadLatest() { QSettings settings("config/global.ini", QSettings::IniFormat); useProxy = settings.value("Network/proxyUsed", 0).toInt(); @@ -134,6 +153,9 @@ void ConfigTab::downloadLatest() { settings.sync(); } +/** + * \brief Slot assigned to download finished action. + */ void ConfigTab::httpRequestFinished(int requestId, bool error) { if (requestId != httpId) return; @@ -171,6 +193,10 @@ void ConfigTab::httpRequestFinished(int requestId, bool error) { file = 0; } +/** + * \brief Slot assigned to QHttp response action. + * \param responseHeader QHttp response. + */ void ConfigTab::readResponseHeader(const QHttpResponseHeader &responseHeader) { if (responseHeader.statusCode() != 200) { QMessageBox::information(this, tr("HTTP"), tr("Download failed: %1.").arg(responseHeader.reasonPhrase())); @@ -179,6 +205,10 @@ void ConfigTab::readResponseHeader(const QHttpResponseHeader &responseHeader) { } } +/** + * \brief Slot assigned to errMsgBox signal. + * \param text text to show. + */ void ConfigTab::showMsgBox(const QString &text) { msgbox->clear(); msgbox->setText(text);