mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
fix indentation
This commit is contained in:
parent
99eb5b67cc
commit
aa33a13c1c
@ -173,7 +173,7 @@ void MainWindow::switchToModsTab()
|
|||||||
ui->tabListWidget->setCurrentIndex(TabRows::MODS);
|
ui->tabListWidget->setCurrentIndex(TabRows::MODS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::changeEvent(QEvent *event)
|
void MainWindow::changeEvent(QEvent * event)
|
||||||
{
|
{
|
||||||
if(event->type() == QEvent::LanguageChange)
|
if(event->type() == QEvent::LanguageChange)
|
||||||
{
|
{
|
||||||
|
@ -30,10 +30,10 @@ class MainWindow : public QMainWindow
|
|||||||
#ifdef ENABLE_QT_TRANSLATIONS
|
#ifdef ENABLE_QT_TRANSLATIONS
|
||||||
QTranslator translator;
|
QTranslator translator;
|
||||||
#endif
|
#endif
|
||||||
private:
|
|
||||||
Ui::MainWindow * ui;
|
Ui::MainWindow * ui;
|
||||||
|
|
||||||
void load();
|
void load();
|
||||||
|
|
||||||
enum TabRows
|
enum TabRows
|
||||||
{
|
{
|
||||||
MODS = 0,
|
MODS = 0,
|
||||||
@ -42,7 +42,6 @@ private:
|
|||||||
ABOUT = 3,
|
ABOUT = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
void changeEvent(QEvent *event) override;
|
|
||||||
public:
|
public:
|
||||||
explicit MainWindow(QWidget * parent = nullptr);
|
explicit MainWindow(QWidget * parent = nullptr);
|
||||||
~MainWindow() override;
|
~MainWindow() override;
|
||||||
@ -58,6 +57,9 @@ public:
|
|||||||
void exitSetup();
|
void exitSetup();
|
||||||
void switchToModsTab();
|
void switchToModsTab();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void changeEvent(QEvent * event) override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void on_startGameButton_clicked();
|
void on_startGameButton_clicked();
|
||||||
|
|
||||||
|
@ -111,12 +111,12 @@ void CSettingsView::loadSettings()
|
|||||||
|
|
||||||
ui->comboBoxAutoSave->setCurrentIndex(settings["general"]["saveFrequency"].Integer() > 0 ? 1 : 0);
|
ui->comboBoxAutoSave->setCurrentIndex(settings["general"]["saveFrequency"].Integer() > 0 ? 1 : 0);
|
||||||
|
|
||||||
ui->spinBoxAutoSaveLimit->setValue(settings["general"]["autosaveCountLimit"].Integer());
|
ui->spinBoxAutoSaveLimit->setValue(settings["general"]["autosaveCountLimit"].Integer());
|
||||||
|
|
||||||
ui->checkBoxAutoSavePrefix->setChecked(settings["general"]["useSavePrefix"].Bool());
|
ui->checkBoxAutoSavePrefix->setChecked(settings["general"]["useSavePrefix"].Bool());
|
||||||
|
|
||||||
ui->lineEditAutoSavePrefix->setText(QString::fromStdString(settings["general"]["savePrefix"].String()));
|
ui->lineEditAutoSavePrefix->setText(QString::fromStdString(settings["general"]["savePrefix"].String()));
|
||||||
ui->lineEditAutoSavePrefix->setEnabled(settings["general"]["useSavePrefix"].Bool());
|
ui->lineEditAutoSavePrefix->setEnabled(settings["general"]["useSavePrefix"].Bool());
|
||||||
|
|
||||||
Languages::fillLanguages(ui->comboBoxLanguage, false);
|
Languages::fillLanguages(ui->comboBoxLanguage, false);
|
||||||
fillValidRenderers();
|
fillValidRenderers();
|
||||||
@ -543,21 +543,21 @@ void CSettingsView::on_comboBoxAlliedPlayerAI_currentTextChanged(const QString &
|
|||||||
|
|
||||||
void CSettingsView::on_checkBoxAutoSavePrefix_stateChanged(int arg1)
|
void CSettingsView::on_checkBoxAutoSavePrefix_stateChanged(int arg1)
|
||||||
{
|
{
|
||||||
Settings node = settings.write["general"]["useSavePrefix"];
|
Settings node = settings.write["general"]["useSavePrefix"];
|
||||||
node->Bool() = arg1;
|
node->Bool() = arg1;
|
||||||
ui->lineEditAutoSavePrefix->setEnabled(arg1);
|
ui->lineEditAutoSavePrefix->setEnabled(arg1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSettingsView::on_spinBoxAutoSaveLimit_valueChanged(int arg1)
|
void CSettingsView::on_spinBoxAutoSaveLimit_valueChanged(int arg1)
|
||||||
{
|
{
|
||||||
Settings node = settings.write["general"]["autosaveCountLimit"];
|
Settings node = settings.write["general"]["autosaveCountLimit"];
|
||||||
node->Float() = arg1;
|
node->Float() = arg1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSettingsView::on_lineEditAutoSavePrefix_textEdited(const QString &arg1)
|
void CSettingsView::on_lineEditAutoSavePrefix_textEdited(const QString &arg1)
|
||||||
{
|
{
|
||||||
Settings node = settings.write["general"]["savePrefix"];
|
Settings node = settings.write["general"]["savePrefix"];
|
||||||
node->String() = arg1.toStdString();
|
node->String() = arg1.toStdString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSettingsView::on_spinBoxReservedArea_valueChanged(int arg1)
|
void CSettingsView::on_spinBoxReservedArea_valueChanged(int arg1)
|
||||||
@ -566,7 +566,6 @@ void CSettingsView::on_spinBoxReservedArea_valueChanged(int arg1)
|
|||||||
node->Float() = float(arg1) / 100; // percentage -> ratio
|
node->Float() = float(arg1) / 100; // percentage -> ratio
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CSettingsView::on_comboBoxRendererType_currentTextChanged(const QString &arg1)
|
void CSettingsView::on_comboBoxRendererType_currentTextChanged(const QString &arg1)
|
||||||
{
|
{
|
||||||
Settings node = settings.write["video"]["driver"];
|
Settings node = settings.write["video"]["driver"];
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "../StdInc.h"
|
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui
|
||||||
{
|
{
|
||||||
@ -67,11 +66,11 @@ private slots:
|
|||||||
|
|
||||||
void on_comboBoxAlliedPlayerAI_currentTextChanged(const QString &arg1);
|
void on_comboBoxAlliedPlayerAI_currentTextChanged(const QString &arg1);
|
||||||
|
|
||||||
void on_checkBoxAutoSavePrefix_stateChanged(int arg1);
|
void on_checkBoxAutoSavePrefix_stateChanged(int arg1);
|
||||||
|
|
||||||
void on_spinBoxAutoSaveLimit_valueChanged(int arg1);
|
void on_spinBoxAutoSaveLimit_valueChanged(int arg1);
|
||||||
|
|
||||||
void on_lineEditAutoSavePrefix_textEdited(const QString &arg1);
|
void on_lineEditAutoSavePrefix_textEdited(const QString &arg1);
|
||||||
|
|
||||||
void on_spinBoxReservedArea_valueChanged(int arg1);
|
void on_spinBoxReservedArea_valueChanged(int arg1);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user