#include "configtab.h"
+/**
+ * \brief Config Tab constructor.
+ */
ConfigTab::ConfigTab(QWidget *parent): QWidget(parent) {
file = 0;
http = new QHttp;
setLayout(mainLayout);
}
+/**
+ * \brief Config Tab destructor.
+ */
ConfigTab::~ConfigTab() {
if(file) delete file;
delete http;
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);
}
}
+/**
+ * \brief Slot assigned to download button click.
+ */
void ConfigTab::downloadLatest() {
QSettings settings("config/global.ini", QSettings::IniFormat);
useProxy = settings.value("Network/proxyUsed", 0).toInt();
settings.sync();
}
+/**
+ * \brief Slot assigned to download finished action.
+ */
void ConfigTab::httpRequestFinished(int requestId, bool error) {
if (requestId != httpId) return;
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()));
}
}
+/**
+ * \brief Slot assigned to errMsgBox signal.
+ * \param text text to show.
+ */
void ConfigTab::showMsgBox(const QString &text) {
msgbox->clear();
msgbox->setText(text);