2017-08-05 01:38:19 +03:00
|
|
|
#ifndef TRANSLATIONEDITOR_H
|
|
|
|
#define TRANSLATIONEDITOR_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
#include <QLocale>
|
|
|
|
#include <QTreeWidgetItem>
|
|
|
|
#include "lrreporttranslation.h"
|
|
|
|
|
|
|
|
namespace LimeReport {
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class TranslationEditor;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class TranslationEditor : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit TranslationEditor(QWidget *parent = 0);
|
|
|
|
void setReportEngine(ITranslationContainer* translationContainer);
|
|
|
|
~TranslationEditor();
|
|
|
|
void updateUi();
|
|
|
|
void activateLanguage(QLocale::Language language);
|
|
|
|
void activatePage(PageTranslation* pageTranslation);
|
|
|
|
void activateTranslation(const QString& itemName, const QString& propertyName);
|
|
|
|
private slots:
|
|
|
|
void on_tbStrings_itemSelectionChanged();
|
|
|
|
void on_teTranslation_textChanged();
|
|
|
|
void on_cbChecked_toggled(bool checked);
|
2017-08-16 01:18:56 +03:00
|
|
|
void on_twPages_itemSelectionChanged();
|
|
|
|
void on_tbAddLanguage_clicked();
|
|
|
|
void on_tbDeleteLanguage_clicked();
|
|
|
|
void slotItemChecked();
|
|
|
|
void on_lvLanguages_itemSelectionChanged();
|
|
|
|
|
|
|
|
private:
|
|
|
|
QLocale::Language getLanguageByName(const QString& languageName);
|
2017-08-05 01:38:19 +03:00
|
|
|
private:
|
|
|
|
Ui::TranslationEditor *ui;
|
|
|
|
ITranslationContainer* m_translationContainer;
|
|
|
|
QMap<QString, ReportTranslation*> m_reportTranslations;
|
|
|
|
QMap<QString, PageTranslation> m_pageTranslations;
|
|
|
|
ReportTranslation* m_currentReportTranslation;
|
|
|
|
PageTranslation* m_currentPageTranslation;
|
|
|
|
PropertyTranslation* m_currentPropertyTranslation;
|
2019-07-24 03:13:23 +03:00
|
|
|
bool m_translationChanging;
|
2022-07-19 00:43:54 +03:00
|
|
|
QShortcut* m_clrReturn;
|
2017-08-05 01:38:19 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} //namespace LimeReport
|
|
|
|
|
|
|
|
#endif // TRANSLATIONEDITOR_H
|