mirror of
https://github.com/opentx/opentx.git
synced 2025-07-26 09:45:21 +03:00
Cosmetics
This commit is contained in:
parent
1b6f34069a
commit
6eec7789cc
2 changed files with 23 additions and 38 deletions
|
@ -530,37 +530,22 @@ void MainWindow::closeEvent(QCloseEvent *event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::setLanguage(QString langString)
|
void MainWindow::setLanguage(const QString & langString)
|
||||||
{
|
{
|
||||||
g.locale( langString );
|
g.locale(langString);
|
||||||
|
QMessageBox::information(this, tr("Companion"), tr("The selected language will be used the next time you start Companion."));
|
||||||
QMessageBox msgBox;
|
|
||||||
msgBox.setText(tr("The selected language will be used the next time you start Companion."));
|
|
||||||
msgBox.setIcon(QMessageBox::Information);
|
|
||||||
msgBox.addButton(tr("OK"), QMessageBox::AcceptRole);
|
|
||||||
msgBox.exec();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::setTheme(int index)
|
void MainWindow::setTheme(int index)
|
||||||
{
|
{
|
||||||
g.theme( index );
|
g.theme(index);
|
||||||
|
QMessageBox::information(this, tr("Companion"), tr("The new theme will be loaded the next time you start Companion."));
|
||||||
QMessageBox msgBox;
|
|
||||||
msgBox.setText(tr("The new theme will be loaded the next time you start Companion."));
|
|
||||||
msgBox.setIcon(QMessageBox::Information);
|
|
||||||
msgBox.addButton(tr("OK"), QMessageBox::AcceptRole);
|
|
||||||
msgBox.exec();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::setIconThemeSize(int index)
|
void MainWindow::setIconThemeSize(int index)
|
||||||
{
|
{
|
||||||
g.iconSize( index );
|
g.iconSize(index);
|
||||||
|
QMessageBox::information(this, tr("Companion"), tr("The icon size will be used the next time you start Companion."));
|
||||||
QMessageBox msgBox;
|
|
||||||
msgBox.setText(tr("The icon size will be used the next time you start Companion."));
|
|
||||||
msgBox.setIcon(QMessageBox::Information);
|
|
||||||
msgBox.addButton(tr("OK"), QMessageBox::AcceptRole);
|
|
||||||
msgBox.exec();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::newFile()
|
void MainWindow::newFile()
|
||||||
|
@ -934,7 +919,7 @@ void MainWindow::updateMenus()
|
||||||
updateLanguageActions();
|
updateLanguageActions();
|
||||||
updateIconSizeActions();
|
updateIconSizeActions();
|
||||||
updateIconThemeActions();
|
updateIconThemeActions();
|
||||||
setWindowTitle(tr("OpenTX Companion 2.1 - FW: %1 - Profile: %2").arg(GetCurrentFirmware()->getName()).arg( g.profile[g.id()].name() ));
|
setWindowTitle(tr("OpenTX Companion %1 - Radio: %2 - Profile: %3").arg(C9X_VERSION).arg(GetCurrentFirmware()->getName()).arg(g.profile[g.id()].name()));
|
||||||
}
|
}
|
||||||
|
|
||||||
MdiChild *MainWindow::createMdiChild()
|
MdiChild *MainWindow::createMdiChild()
|
||||||
|
|
|
@ -81,25 +81,25 @@ class MainWindow : public QMainWindow
|
||||||
void closeEvent(QCloseEvent *event);
|
void closeEvent(QCloseEvent *event);
|
||||||
void dragEnterEvent(QDragEnterEvent *event);
|
void dragEnterEvent(QDragEnterEvent *event);
|
||||||
void dropEvent(QDropEvent *event);
|
void dropEvent(QDropEvent *event);
|
||||||
|
void setLanguage(const QString & langString);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void openDocURL();
|
void openDocURL();
|
||||||
|
|
||||||
void setLanguage(QString langString);
|
void setSysLanguage() { setLanguage(""); };
|
||||||
void setSysLanguage() {setLanguage("");};
|
void setCZLanguage() { setLanguage("cs_CZ"); };
|
||||||
void setCZLanguage() {setLanguage("cs_CZ");};
|
void setDELanguage() { setLanguage("de_DE"); };
|
||||||
void setDELanguage() {setLanguage("de_DE");};
|
void setENLanguage() { setLanguage("en"); };
|
||||||
void setENLanguage() {setLanguage("en");};
|
void setFILanguage() { setLanguage("fi_FI"); };
|
||||||
void setFILanguage() {setLanguage("fi_FI");};
|
void setFRLanguage() { setLanguage("fr_FR"); };
|
||||||
void setFRLanguage() {setLanguage("fr_FR");};
|
void setITLanguage() { setLanguage("it_IT"); };
|
||||||
void setITLanguage() {setLanguage("it_IT");};
|
void setHELanguage() { setLanguage("he_IL"); };
|
||||||
void setHELanguage() {setLanguage("he_IL");};
|
void setPLLanguage() { setLanguage("pl_PL"); };
|
||||||
void setPLLanguage() {setLanguage("pl_PL");};
|
void setESLanguage() { setLanguage("es_ES"); };
|
||||||
void setESLanguage() {setLanguage("es_ES");};
|
void setPTLanguage() { setLanguage("pt_PT"); };
|
||||||
void setPTLanguage() {setLanguage("pt_PT");};
|
void setRULanguage() { setLanguage("ru_RU"); };
|
||||||
void setRULanguage() {setLanguage("ru_RU");};
|
void setSELanguage() { setLanguage("sv_SE"); };
|
||||||
void setSELanguage() {setLanguage("sv_SE");};
|
void setNLLanguage() { setLanguage("nl_NL"); };
|
||||||
void setNLLanguage() {setLanguage("nl_NL");};
|
|
||||||
|
|
||||||
void setTheme(int index);
|
void setTheme(int index);
|
||||||
void setClassicTheme() {setTheme(0);};
|
void setClassicTheme() {setTheme(0);};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue