1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Launcher translation upgrade, still WIP:

- launcher can be re-translated without restart
- mod info (name/description/etc) can have localized versions
This commit is contained in:
Ivan Savenko 2022-12-25 13:19:16 +02:00
parent 9e4cef015d
commit 1696db8a3c
20 changed files with 1153 additions and 513 deletions

View File

@ -1,6 +1,13 @@
{
"name" : "VCMI essential files",
"description" : "Essential files required for VCMI to run correctly",
"translation_uk" : {
"name" : "VCMI - ключові файли",
"description" : "Ключові файли необхідні для повноцінної роботи VCMI",
"author" : "Команда VCMI",
"modType" : "Графіка",
},
"version" : "1.0",
"author" : "VCMI Team",

View File

@ -88,7 +88,7 @@ else()
endif()
find_package(Qt5LinguistTools)
set(launcher_TS translation/launcher_pl.ts translation/launcher_ru.ts translation/launcher_uk.ts)
set(launcher_TS translation/launcher_en.ts translation/launcher_pl.ts translation/launcher_ru.ts translation/launcher_uk.ts)
qt5_add_translation( QM_FILES ${launcher_TS} )
if(WIN32)
@ -160,4 +160,5 @@ else()
install(FILES "eu.vcmi.VCMI.metainfo.xml" DESTINATION share/metainfo)
endif()
endif()
install(DIRECTORY icons DESTINATION ${ICONS_DESTINATION})

View File

@ -35,6 +35,14 @@ Lobby::Lobby(QWidget *parent) :
ui->kickButton->setVisible(false);
}
void Lobby::changeEvent(QEvent *event)
{
if ( event->type() == QEvent::LanguageChange)
{
ui->retranslateUi(this);
}
}
Lobby::~Lobby()
{
delete ui;

View File

@ -19,6 +19,7 @@ class Lobby : public QWidget
{
Q_OBJECT
void changeEvent(QEvent *event) override;
public:
explicit Lobby(QWidget *parent = nullptr);
~Lobby();

View File

@ -27,6 +27,14 @@ LobbyRoomRequest::LobbyRoomRequest(SocketLobby & socket, const QString & room, c
show();
}
void LobbyRoomRequest::changeEvent(QEvent *event)
{
if ( event->type() == QEvent::LanguageChange)
{
ui->retranslateUi(this);
}
}
LobbyRoomRequest::~LobbyRoomRequest()
{
delete ui;

View File

@ -21,6 +21,7 @@ class LobbyRoomRequest : public QDialog
{
Q_OBJECT
void changeEvent(QEvent *event) override;
public:
explicit LobbyRoomRequest(SocketLobby & socket, const QString & room, const QMap<QString, QString> & mods, QWidget *parent = nullptr);
~LobbyRoomRequest();

View File

@ -33,10 +33,6 @@ int main(int argc, char * argv[])
#endif
QApplication vcmilauncher(argc, argv);
//QTranslator translator;
//translator.load("./launcher_uk.qm");
//vcmilauncher.installTranslator(&translator);
MainWindow mainWindow;
mainWindow.show();
result = vcmilauncher.exec();

View File

@ -79,6 +79,14 @@ MainWindow::MainWindow(QWidget * parent)
UpdateDialog::showUpdateDialog(false);
}
void MainWindow::changeEvent(QEvent *event)
{
if ( event->type() == QEvent::LanguageChange)
{
ui->retranslateUi(this);
}
}
MainWindow::~MainWindow()
{
//save window settings
@ -116,3 +124,16 @@ void MainWindow::on_lobbyButton_clicked()
ui->startGameButton->setEnabled(false);
ui->tabListWidget->setCurrentIndex(TabRows::LOBBY);
}
void MainWindow::updateTranslation()
{
std::string languageCode = settings["general"]["language"].String();
QString translationFile = "./launcher_" + QString::fromStdString(languageCode) + ".qm";
qApp->removeTranslator(&translator);
if (!translator.load(translationFile))
logGlobal->error("Failed to load translation");
if (!qApp->installTranslator(&translator))
logGlobal->error("Failed to install translator");
}

View File

@ -26,6 +26,7 @@ class MainWindow : public QMainWindow
{
Q_OBJECT
QTranslator translator;
private:
Ui::MainWindow * ui;
void load();
@ -35,12 +36,14 @@ private:
MODS = 0, SETTINGS = 1, LOBBY = 2
};
void changeEvent(QEvent *event) override;
public:
explicit MainWindow(QWidget * parent = 0);
~MainWindow();
const CModList & getModList() const;
void updateTranslation();
public slots:
void on_startGameButton_clicked();

View File

@ -31,6 +31,22 @@
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1" rowspan="7">
<widget class="Line" name="line">
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>1</number>
</property>
<property name="midLineWidth">
<number>0</number>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QToolButton" name="settingsButton">
<property name="sizePolicy">
@ -75,64 +91,42 @@
</property>
</widget>
</item>
<item row="3" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0">
<widget class="QToolButton" name="lobbyButton">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
<item row="6" column="0">
<widget class="QLabel" name="startGameTitle">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Lobby</string>
<string>Start game</string>
</property>
<property name="icon">
<iconset>
<normaloff>icons:menu-lobby.png</normaloff>icons:menu-lobby.png</iconset>
</property>
<property name="iconSize">
<size>
<width>60</width>
<height>60</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="autoExclusive">
<bool>true</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="4" column="0">
<item row="0" column="2" rowspan="7">
<widget class="QStackedWidget" name="tabListWidget">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>10</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="CModListView" name="modlistView"/>
<widget class="CSettingsView" name="settingsView"/>
<widget class="Lobby" name="lobbyView"/>
</widget>
</item>
<item row="5" column="0">
<widget class="QToolButton" name="startGameButton">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
@ -179,39 +173,48 @@
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="startGameTitle">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Start game</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2" rowspan="6">
<widget class="QStackedWidget" name="tabListWidget">
<property name="enabled">
<bool>true</bool>
</property>
<item row="2" column="0">
<widget class="QToolButton" name="lobbyButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>10</horstretch>
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>0</number>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Lobby</string>
</property>
<property name="icon">
<iconset>
<normaloff>icons:menu-lobby.png</normaloff>icons:menu-lobby.png</iconset>
</property>
<property name="iconSize">
<size>
<width>60</width>
<height>60</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="autoExclusive">
<bool>true</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
<widget class="CModListView" name="modlistView"/>
<widget class="CSettingsView" name="settingsView"/>
<widget class="Lobby" name="lobbyView"/>
</widget>
</item>
<item row="0" column="0">
@ -258,20 +261,60 @@
</property>
</widget>
</item>
<item row="0" column="1" rowspan="6">
<widget class="Line" name="line">
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>1</number>
</property>
<property name="midLineWidth">
<number>0</number>
</property>
<item row="3" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>80</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="0">
<widget class="QToolButton" name="startEditorButton">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Editor</string>
</property>
<property name="iconSize">
<size>
<width>60</width>
<height>60</height>
</size>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonIconOnly</enum>
</property>
<property name="autoRaise">
<bool>false</bool>
</property>
</widget>
</item>
</layout>

View File

@ -10,6 +10,7 @@
#include "StdInc.h"
#include "cmodlist.h"
#include "../lib/CConfigHandler.h"
#include "../../lib/JsonNode.h"
#include "../../lib/filesystem/CFileInputStream.h"
#include "../../lib/GameConstants.h"
@ -157,23 +158,35 @@ QString CModEntry::getName() const
QVariant CModEntry::getValue(QString value) const
{
QString lang = QString::fromStdString(settings["general"]["language"].String());
QString langValue = "translation_" + lang;
// Priorities
// 1) data from newest version
// 2) data from preferred language
bool useRepositoryData = repository.contains(value);
if(repository.contains(value) && localData.contains(value))
{
// value is present in both repo and locally installed. Select one from latest version
QString installedVer = localData["installedVersion"].toString();
QString availableVer = repository["latestVersion"].toString();
if(compareVersions(installedVer, availableVer))
return repository[value];
else
return localData[value];
useRepositoryData = compareVersions(installedVer, availableVer);
}
if(repository.contains(value))
return repository[value];
auto & storage = useRepositoryData ? repository : localData;
if(localData.contains(value))
return localData[value];
if (storage.contains(langValue))
{
auto langStorage = storage[langValue].toMap();
if (langStorage.contains(value))
return langStorage[value];
}
if (storage.contains(value))
return storage[value];
return QVariant();
}

View File

@ -25,16 +25,6 @@ static const QString names[ModFields::COUNT] =
"author"
};
static const QString header[ModFields::COUNT] =
{
"Name",
"", // status icon
"", // status icon
"Type",
"Version",
"Size",
"Author"
};
}
namespace ModStatus
@ -155,13 +145,25 @@ Qt::ItemFlags CModListModel::flags(const QModelIndex &) const
QVariant CModListModel::headerData(int section, Qt::Orientation orientation, int role) const
{
static const QString header[ModFields::COUNT] =
{
QT_TR_NOOP("Name"),
QT_TR_NOOP(""), // status icon
QT_TR_NOOP(""), // status icon
QT_TR_NOOP("Type"),
QT_TR_NOOP("Version"),
QT_TR_NOOP("Size"),
QT_TR_NOOP("Author")
};
if(role == Qt::DisplayRole && orientation == Qt::Horizontal)
return ModFields::header[section];
return QCoreApplication::translate("ModFields", header[section].toStdString().c_str());
return QVariant();
}
void CModListModel::reloadRepositories()
{
//emit headerDataChanged(Qt::Horizontal, 0, -1 );
beginResetModel();
endResetModel();
}

View File

@ -34,6 +34,15 @@ void CModListView::setupModModel()
this, &CModListView::extraResolutionsEnabledChanged);
}
void CModListView::changeEvent(QEvent *event)
{
if ( event->type() == QEvent::LanguageChange)
{
ui->retranslateUi(this);
modModel->reloadRepositories();
}
}
void CModListView::setupFilterModel()
{
filterModel = new CModFilterModel(modModel, this);
@ -227,8 +236,8 @@ QString CModListView::genModInfoText(CModEntry & mod)
QString textTemplate = prefix + "</p><p align=\"justify\">%2</p>";
QString listTemplate = "<p align=\"justify\">%1: %2</p>";
QString noteTemplate = "<p align=\"justify\">%1</p>";
QString compatibleString = prefix + "Mod is compatible</p>";
QString incompatibleString = redPrefix + "Mod is incompatible</p>";
QString compatibleString = prefix + tr("Mod is compatible") + "</p>";
QString incompatibleString = redPrefix + tr("Mod is incompatible") + "</p>";
QString supportedVersions = redPrefix + "%2 %3 %4</p>";
QString result;

View File

@ -64,6 +64,7 @@ class CModListView : public QWidget
QString genChangelogText(CModEntry & mod);
QString genModInfoText(CModEntry & mod);
void changeEvent(QEvent *event) override;
signals:
void extraResolutionsEnabledChanged(bool enabled);

View File

@ -20,6 +20,14 @@ ImageViewer::ImageViewer(QWidget * parent)
ui->setupUi(this);
}
void ImageViewer::changeEvent(QEvent *event)
{
if ( event->type() == QEvent::LanguageChange)
{
ui->retranslateUi(this);
}
}
ImageViewer::~ImageViewer()
{
delete ui;

View File

@ -21,6 +21,7 @@ class ImageViewer : public QDialog
{
Q_OBJECT
void changeEvent(QEvent *event) override;
public:
explicit ImageViewer(QWidget * parent = 0);
~ImageViewer();

View File

@ -11,6 +11,8 @@
#include "csettingsview_moc.h"
#include "ui_csettingsview_moc.h"
#include "mainwindow_moc.h"
#include "../jsonutils.h"
#include "../launcherdirs.h"
#include "../updatedialog_moc.h"
@ -44,6 +46,15 @@ static const std::string knownEncodingsList[] = //TODO: remove hardcode
"CP949" // extension of EUC-KR.
};
/// List of tags of languages that can be selected from Launcher (and have translation for Launcher)
static const std::string languageTagList[] =
{
"en", // english
"pl", // polish
"ru", // russian
"uk", // ukrainian
};
void CSettingsView::setDisplayList()
{
QStringList list;
@ -301,3 +312,19 @@ void CSettingsView::on_updatesButton_clicked()
UpdateDialog::showUpdateDialog(true);
}
void CSettingsView::on_comboBoxLanguage_currentIndexChanged(int index)
{
Settings node = settings.write["general"]["language"];
node->String() = languageTagList[index];
dynamic_cast<MainWindow*>(qApp->activeWindow())->updateTranslation();
}
void CSettingsView::changeEvent(QEvent *event)
{
if ( event->type() == QEvent::LanguageChange)
{
ui->retranslateUi(this);
}
}

View File

@ -25,6 +25,7 @@ public:
void loadSettings();
void setDisplayList();
void changeEvent(QEvent *event) override;
bool isExtraResolutionsModEnabled{};
@ -68,6 +69,8 @@ private slots:
void on_updatesButton_clicked();
void on_comboBoxLanguage_currentIndexChanged(int index);
private:
Ui::CSettingsView * ui;

View File

@ -26,67 +26,35 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item row="1" column="8">
<widget class="QPushButton" name="changeGameDataDir">
<item row="2" column="7" colspan="2">
<widget class="QLineEdit" name="lineEditUserDataDir">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Change</string>
</property>
</widget>
</item>
<item row="3" column="9">
<widget class="QPushButton" name="openTempDir">
<property name="text">
<string>Open</string>
</property>
</widget>
</item>
<item row="2" column="6">
<widget class="QLabel" name="labelUserDataDir">
<property name="text">
<string>User data directory</string>
</property>
</widget>
</item>
<item row="10" column="5">
<spacer name="spacerColumns">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<property name="minimumSize">
<size>
<width>8</width>
<height>20</height>
<width>150</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="10" column="7">
<widget class="QComboBox" name="comboBoxAutoSave">
<property name="currentIndex">
<number>1</number>
<property name="text">
<string notr="true">/home/user/.vcmi</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
<item>
<property name="text">
<string>Off</string>
</property>
</item>
<item>
<property name="text">
<string>On</string>
</property>
</item>
</widget>
</item>
<item row="1" column="9">
<widget class="QPushButton" name="openGameDataDir">
<item row="17" column="1" colspan="4">
<widget class="QLabel" name="LauncherSettings">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Open</string>
<string>Launcher Settings</string>
</property>
</widget>
</item>
@ -103,6 +71,47 @@
</property>
</widget>
</item>
<item row="1" column="8">
<widget class="QPushButton" name="changeGameDataDir">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Change</string>
</property>
</widget>
</item>
<item row="18" column="6">
<widget class="QComboBox" name="comboBoxAutoCheck">
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>Off</string>
</property>
</item>
<item>
<property name="text">
<string>On</string>
</property>
</item>
</widget>
</item>
<item row="3" column="9">
<widget class="QPushButton" name="openTempDir">
<property name="text">
<string>Open</string>
</property>
</widget>
</item>
<item row="10" column="6">
<widget class="QLabel" name="labelEncoding">
<property name="text">
<string>Heroes III character set</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="labelFullScreen">
<property name="text">
@ -110,37 +119,57 @@
</property>
</widget>
</item>
<item row="10" column="4">
<widget class="QComboBox" name="comboBoxNeutralAI">
<property name="currentText">
<string notr="true">BattleAI</string>
<item row="3" column="4">
<widget class="QComboBox" name="comboBoxShowIntro">
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string notr="true">BattleAI</string>
<string>Off</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">StupidAI</string>
<string>On</string>
</property>
</item>
</widget>
</item>
<item row="8" column="7" colspan="3">
<widget class="QSpinBox" name="spinBoxNetworkPort">
<property name="minimum">
<number>1024</number>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>3030</number>
<item row="3" column="6">
<widget class="QLabel" name="labelTempDir">
<property name="text">
<string>Log files directory</string>
</property>
</widget>
</item>
<item row="17" column="1" colspan="4">
<item row="3" column="7" colspan="2">
<widget class="QLineEdit" name="lineEditTempDir">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string notr="true">/home/user/.vcmi</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="12" column="6">
<widget class="QLabel" name="labelAutoSave">
<property name="text">
<string>Autosave</string>
</property>
</widget>
</item>
<item row="19" column="1" colspan="4">
<widget class="QLabel" name="labelRepositories">
<property name="font">
<font>
@ -153,20 +182,123 @@
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QComboBox" name="comboBoxResolution"/>
</item>
<item row="16" column="7">
<item row="18" column="7">
<widget class="QPushButton" name="updatesButton">
<property name="text">
<string>Check for updates</string>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QLabel" name="labelNeutralAI">
<item row="4" column="4">
<widget class="QComboBox" name="comboBoxDisplayIndex"/>
</item>
<item row="18" column="1" colspan="4">
<widget class="QLabel" name="labelAutoCheck">
<property name="text">
<string>Neutral AI</string>
<string>Check repositories on startup</string>
</property>
</widget>
</item>
<item row="2" column="9">
<widget class="QPushButton" name="openUserDataDir">
<property name="text">
<string>Open</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLabel" name="labelPlayerAI">
<property name="text">
<string>Player AI</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="labelDisplayIndex">
<property name="text">
<string>Display index</string>
</property>
</widget>
</item>
<item row="10" column="1" colspan="4">
<widget class="QLabel" name="labelAIInTheBattlefield">
<property name="font">
<font>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
<underline>false</underline>
</font>
</property>
<property name="text">
<string>AI in the battlefield</string>
</property>
</widget>
</item>
<item row="21" column="1" colspan="9">
<widget class="QPlainTextEdit" name="plainTextEditRepos">
<property name="lineWrapMode">
<enum>QPlainTextEdit::NoWrap</enum>
</property>
<property name="plainText">
<string notr="true">http://downloads.vcmi.eu/Mods/repository.json</string>
</property>
</widget>
</item>
<item row="7" column="6" colspan="4">
<widget class="QLabel" name="labelGeneral">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>General</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="labelShowIntro">
<property name="text">
<string>Show intro</string>
</property>
</widget>
</item>
<item row="16" column="1" colspan="4">
<spacer name="spacerRepos">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>8</height>
</size>
</property>
</spacer>
</item>
<item row="14" column="6">
<widget class="QLabel" name="labelBuildVersionDesc">
<property name="text">
<string>Build version</string>
</property>
</widget>
</item>
<item row="1" column="6">
<widget class="QLabel" name="labelGameDir">
<property name="text">
<string>Extra data directory</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="labelResolution">
<property name="text">
<string>Resolution</string>
</property>
</widget>
</item>
@ -192,15 +324,25 @@
</item>
</widget>
</item>
<item row="2" column="9">
<widget class="QPushButton" name="openUserDataDir">
<property name="text">
<string>Open</string>
<item row="12" column="7">
<widget class="QComboBox" name="comboBoxAutoSave">
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>Off</string>
</property>
</item>
<item>
<property name="text">
<string>On</string>
</property>
</item>
</widget>
</item>
<item row="7" column="6" colspan="4">
<widget class="QLabel" name="labelGeneral">
<item row="7" column="1" colspan="4">
<widget class="QLabel" name="labelAIMovingOnTheMap">
<property name="font">
<font>
<weight>75</weight>
@ -208,37 +350,137 @@
</font>
</property>
<property name="text">
<string>General</string>
<string>AI on the map</string>
</property>
</widget>
</item>
<item row="2" column="7" colspan="2">
<widget class="QLineEdit" name="lineEditUserDataDir">
<property name="enabled">
<bool>false</bool>
<item row="8" column="4">
<widget class="QComboBox" name="comboBoxPlayerAI">
<property name="currentText">
<string notr="true">VCAI</string>
</property>
<property name="minimumSize">
<item>
<property name="text">
<string notr="true">VCAI</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">Nullkiller</string>
</property>
</item>
</widget>
</item>
<item row="12" column="5">
<spacer name="spacerColumns">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>150</width>
<height>0</height>
<width>8</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="4">
<widget class="QComboBox" name="comboBoxResolution"/>
</item>
<item row="1" column="9">
<widget class="QPushButton" name="openGameDataDir">
<property name="text">
<string notr="true">/home/user/.vcmi</string>
</property>
<property name="readOnly">
<bool>true</bool>
<string>Open</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLabel" name="labelPlayerAI">
<item row="0" column="1" colspan="4">
<widget class="QLabel" name="labelVideo">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Player AI</string>
<string>Video</string>
</property>
</widget>
</item>
<item row="9" column="7" colspan="3">
<item row="0" column="6" colspan="4">
<widget class="QLabel" name="labelDataDirs">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Data Directories</string>
</property>
</widget>
</item>
<item row="6" column="1" colspan="4">
<spacer name="spacerSections">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>56</width>
<height>8</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="6">
<widget class="QLabel" name="labelUserDataDir">
<property name="text">
<string>User data directory</string>
</property>
</widget>
</item>
<item row="11" column="6">
<widget class="QLabel" name="labelNetworkPort">
<property name="text">
<string>Network port</string>
</property>
</widget>
</item>
<item row="11" column="7">
<widget class="QSpinBox" name="spinBoxNetworkPort">
<property name="minimum">
<number>1024</number>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>3030</number>
</property>
</widget>
</item>
<item row="8" column="6">
<widget class="QLabel" name="labelLanguage">
<property name="text">
<string>VCMI Language</string>
</property>
</widget>
</item>
<item row="14" column="7" colspan="2">
<widget class="QLabel" name="labelBuildVersion">
<property name="text">
<string notr="true"/>
</property>
</widget>
</item>
<item row="10" column="7" colspan="2">
<widget class="QComboBox" name="comboBoxEncoding">
<item>
<property name="text">
@ -272,127 +514,39 @@
</item>
</widget>
</item>
<item row="12" column="1">
<widget class="QLabel" name="labelFriendlyAI">
<property name="minimumSize">
<size>
<width>0</width>
<height>22</height>
</size>
</property>
<property name="text">
<string>Friendly AI</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="labelResolution">
<property name="text">
<string>Resolution</string>
</property>
</widget>
</item>
<item row="7" column="1" colspan="4">
<widget class="QLabel" name="labelAIMovingOnTheMap">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>AI on the map</string>
</property>
</widget>
</item>
<item row="14" column="1" colspan="4">
<spacer name="spacerRepos">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>8</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="4">
<widget class="QComboBox" name="comboBoxDisplayIndex"/>
</item>
<item row="10" column="6">
<widget class="QLabel" name="labelAutoSave">
<property name="text">
<string>Autosave</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="labelDisplayIndex">
<property name="text">
<string>Display index</string>
</property>
</widget>
</item>
<item row="3" column="7" colspan="2">
<widget class="QLineEdit" name="lineEditTempDir">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string notr="true">/home/user/.vcmi</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="16" column="1" colspan="4">
<widget class="QLabel" name="labelAutoCheck">
<property name="text">
<string>Check repositories on startup</string>
</property>
</widget>
</item>
<item row="8" column="6">
<widget class="QLabel" name="labelNetworkPort">
<property name="text">
<string>Network port</string>
</property>
</widget>
</item>
<item row="8" column="4">
<widget class="QComboBox" name="comboBoxPlayerAI">
<property name="currentText">
<string notr="true">VCAI</string>
</property>
<item row="8" column="7" colspan="2">
<widget class="QComboBox" name="comboBoxLanguage">
<item>
<property name="text">
<string notr="true">VCAI</string>
<string>English</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">Nullkiller</string>
<string>Polska (Polish)</string>
</property>
</item>
<item>
<property name="text">
<string>Русский (Russian)</string>
</property>
</item>
<item>
<property name="text">
<string>Українська (Ukrainian)</string>
</property>
</item>
</widget>
</item>
<item row="13" column="4">
<widget class="QComboBox" name="comboBoxEnemyAI">
<property name="editable">
<bool>false</bool>
<item row="11" column="1">
<widget class="QLabel" name="labelNeutralAI">
<property name="text">
<string>Neutral AI</string>
</property>
</widget>
</item>
<item row="11" column="4">
<widget class="QComboBox" name="comboBoxNeutralAI">
<property name="currentText">
<string notr="true">BattleAI</string>
</property>
@ -408,36 +562,16 @@
</item>
</widget>
</item>
<item row="0" column="6" colspan="4">
<widget class="QLabel" name="labelDataDirs">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
<item row="12" column="1">
<widget class="QLabel" name="labelFriendlyAI">
<property name="minimumSize">
<size>
<width>0</width>
<height>22</height>
</size>
</property>
<property name="text">
<string>Data Directories</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="4">
<widget class="QLabel" name="labelVideo">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Video</string>
</property>
</widget>
</item>
<item row="9" column="6">
<widget class="QLabel" name="labelEncoding">
<property name="text">
<string>Heroes III character set</string>
<string>Friendly AI</string>
</property>
</widget>
</item>
@ -461,91 +595,27 @@
</item>
</widget>
</item>
<item row="1" column="6">
<widget class="QLabel" name="labelGameDir">
<property name="text">
<string>Extra data directory</string>
<item row="14" column="4">
<widget class="QComboBox" name="comboBoxEnemyAI">
<property name="editable">
<bool>false</bool>
</property>
</widget>
</item>
<item row="16" column="6">
<widget class="QComboBox" name="comboBoxAutoCheck">
<property name="currentIndex">
<number>1</number>
<property name="currentText">
<string notr="true">BattleAI</string>
</property>
<item>
<property name="text">
<string>Off</string>
<string notr="true">BattleAI</string>
</property>
</item>
<item>
<property name="text">
<string>On</string>
<string notr="true">StupidAI</string>
</property>
</item>
</widget>
</item>
<item row="3" column="6">
<widget class="QLabel" name="labelTempDir">
<property name="text">
<string>Log files directory</string>
</property>
</widget>
</item>
<item row="19" column="1" colspan="9">
<widget class="QPlainTextEdit" name="plainTextEditRepos">
<property name="lineWrapMode">
<enum>QPlainTextEdit::NoWrap</enum>
</property>
<property name="plainText">
<string notr="true">http://downloads.vcmi.eu/Mods/repository.json</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="labelShowIntro">
<property name="text">
<string>Show intro</string>
</property>
</widget>
</item>
<item row="15" column="1" colspan="4">
<widget class="QLabel" name="LauncherSettings">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Launcher Settings</string>
</property>
</widget>
</item>
<item row="12" column="6">
<widget class="QLabel" name="labelBuildVersionDesc">
<property name="text">
<string>Build version</string>
</property>
</widget>
</item>
<item row="6" column="1" colspan="4">
<spacer name="spacerSections">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>56</width>
<height>8</height>
</size>
</property>
</spacer>
</item>
<item row="13" column="1">
<item row="14" column="1">
<widget class="QLabel" name="labelEnemyAI">
<property name="minimumSize">
<size>
@ -558,45 +628,6 @@
</property>
</widget>
</item>
<item row="3" column="4">
<widget class="QComboBox" name="comboBoxShowIntro">
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>Off</string>
</property>
</item>
<item>
<property name="text">
<string>On</string>
</property>
</item>
</widget>
</item>
<item row="12" column="7" colspan="3">
<widget class="QLabel" name="labelBuildVersion">
<property name="text">
<string notr="true"/>
</property>
</widget>
</item>
<item row="9" column="1" colspan="4">
<widget class="QLabel" name="labelAIInTheBattlefield">
<property name="font">
<font>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
<underline>false</underline>
</font>
</property>
<property name="text">
<string>AI in the battlefield</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>

File diff suppressed because it is too large Load Diff