Retranslate history

--HG--
branch : feature
This commit is contained in:
Valentina Zhuravska 2016-01-08 13:55:37 +02:00
parent 31582e06da
commit b283fb2a76
4 changed files with 23 additions and 1 deletions

View file

@ -380,5 +380,4 @@ void ConfigurationPage::RetranslateUi()
askPointDeletionCheck->setText(tr("Confirm item deletion"));
toolBarGroup->setTitle(tr("Toolbar"));
toolBarStyleCheck->setText(tr("The text appears under the icon. (recommended for beginners.)"));
}

View file

@ -502,3 +502,23 @@ void DialogHistory::closeEvent(QCloseEvent *event)
emit ShowHistoryTool(id, false);
DialogTool::closeEvent(event);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogHistory::changeEvent(QEvent *event)
{
if (event->type() == QEvent::LanguageChange)
{
// retranslate designer form (single inheritance approach)
ui->retranslateUi(this);
RetranslateUi();
}
// remember to call base class implementation
QDialog::changeEvent(event);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogHistory::RetranslateUi()
{
UpdateHistory();
}

View file

@ -68,6 +68,7 @@ signals:
void ShowHistoryTool(quint32 id, bool enable);
protected:
virtual void closeEvent ( QCloseEvent * event ) Q_DECL_OVERRIDE;
virtual void changeEvent(QEvent* event) Q_DECL_OVERRIDE;
private:
Q_DISABLE_COPY(DialogHistory)
@ -89,6 +90,7 @@ private:
void ShowPoint();
QString PointName(quint32 pointId);
quint32 AttrUInt(const QDomElement &domElement, const QString &name);
void RetranslateUi();
};
#endif // DIALOGHISTORY_H

View file

@ -1129,6 +1129,7 @@ void MainWindow::changeEvent(QEvent *event)
redoAction->setText(tr("&Redo"));
helpLabel->setText(QObject::tr("Create new pattern piece to start working."));
patternPieceLabel->setText(tr("Pattern Piece: "));
UpdateWindowTitle();
}
// remember to call base class implementation
QMainWindow::changeEvent(event);