git-svn-id: svn://db.shs.com.ru/libs@625 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2019-11-05 13:00:29 +00:00
parent 15f1045580
commit 5e2b563d57
18 changed files with 94 additions and 62 deletions

View File

@@ -12,10 +12,10 @@ action_show_all_docks(this), action_hide_all_docks(this), first_show(true) {
action_clear_recent = new QAction(QIcon(":/icons/edit-clear.png"), tr("Clear recent list"), this);
connect(action_clear_recent, SIGNAL(triggered()), this, SLOT(clearRecent()));
qRegisterMetaType<Qt::DockWidgetArea>("Qt::DockWidgetArea");
action_show_all_tools.setText(trUtf8("Show all"));
action_show_all_docks.setText(trUtf8("Show all"));
action_hide_all_tools.setText(trUtf8("Hide all"));
action_hide_all_docks.setText(trUtf8("Hide all"));
action_show_all_tools.setText(tr("Show all"));
action_show_all_docks.setText(tr("Show all"));
action_hide_all_tools.setText(tr("Hide all"));
action_hide_all_docks.setText(tr("Hide all"));
action_show_all_tools.setIcon(QIcon(":/icons/layer-visible-on.png"));
action_show_all_docks.setIcon(QIcon(":/icons/layer-visible-on.png"));
action_hide_all_tools.setIcon(QIcon(":/icons/layer-visible-off.png"));
@@ -133,7 +133,7 @@ QMenu * EMainWindow::createPopupMenu() {
lbl = new QLabel();
lbl->setFrameShape(QFrame::StyledPanel);
lbl->setFrameShadow(QFrame::Sunken);
lbl->setText(trUtf8("Toolbars"));
lbl->setText(tr("Toolbars"));
lbl->setFont(f);
lbl->setAlignment(Qt::AlignCenter);
wa->setDefaultWidget(lbl);
@@ -158,7 +158,7 @@ QMenu * EMainWindow::createPopupMenu() {
lbl = new QLabel();
lbl->setFrameShape(QFrame::StyledPanel);
lbl->setFrameShadow(QFrame::Sunken);
lbl->setText(trUtf8("Docks"));
lbl->setText(tr("Docks"));
lbl->setFont(f);
lbl->setAlignment(Qt::AlignCenter);
wa->setDefaultWidget(lbl);
@@ -376,7 +376,7 @@ void EMainWindow::newFile() {
void EMainWindow::openFile() {
if (!checkSave()) return;
QString ret = QFileDialog::getOpenFileName(this, trUtf8("Select file to open"), file_name, loadFilter());
QString ret = QFileDialog::getOpenFileName(this, tr("Select file to open"), file_name, loadFilter());
if (ret.isEmpty()) return;
if (load(ret))
addToRecent(ret);
@@ -385,7 +385,7 @@ void EMainWindow::openFile() {
void EMainWindow::openFiles() {
if (!checkSave()) return;
QStringList ret = QFileDialog::getOpenFileNames(this, trUtf8("Select files to open"), file_name, loadFilter());
QStringList ret = QFileDialog::getOpenFileNames(this, tr("Select files to open"), file_name, loadFilter());
foreach (QString s, ret) {
if (load(s))
addToRecent(s);
@@ -395,7 +395,7 @@ void EMainWindow::openFiles() {
bool EMainWindow::saveFile(bool ask) {
if (ask) {
int ret = QMessageBox::question(this, windowTitle(), trUtf8("Save changes%1?").arg(!file_name.isEmpty() ? (trUtf8(" in") + " \"" + file_name + "\"") : ""), QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Save);
int ret = QMessageBox::question(this, windowTitle(), tr("Save changes%1?").arg(!file_name.isEmpty() ? (tr(" in") + " \"" + file_name + "\"") : ""), QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Save);
if (ret == QMessageBox::Cancel) return false;
if (ret == QMessageBox::Save) return saveFile();
return true;
@@ -408,7 +408,7 @@ bool EMainWindow::saveFile(bool ask) {
bool EMainWindow::saveAsFile() {
QString ret = QFileDialog::getSaveFileName(this, trUtf8("Select file to save"), file_name, saveFilter());
QString ret = QFileDialog::getSaveFileName(this, tr("Select file to save"), file_name, saveFilter());
if (ret.isEmpty()) return false;
if (save(ret))
addToRecent(ret);