2#include <NDEVR/Translator.h>
4#include <QSyntaxHighlighter>
5#include <QRegularExpression>
8 class LanguageEditorUI;
24 struct HighlightingRule
26 QRegularExpression pattern;
27 QTextCharFormat format;
29 QVector<HighlightingRule> m_highlighting_rules;
39#if SUPPORTS_GOOGLE_TRANSLATE
40 QString googleTranslate(
const QString& keyword,
const QString& from,
const QString& to)
const;
50 Ui::LanguageEditorUI*
ui;
Definition LanguageEditor.h:32
void setReferenceTranslation(const Translator &translator)
Translator m_translator
Definition LanguageEditor.h:51
void setEditingTranslation(const Translator &translator)
Translator m_reference_translator
Definition LanguageEditor.h:52
LanguageEditor(QWidget *parent=nullptr)
bool m_has_change
Definition LanguageEditor.h:49
Ui::LanguageEditorUI * ui
Definition LanguageEditor.h:50
Translator m_original_translator
Definition LanguageEditor.h:53
virtual ~LanguageEditor()
void updateTranslationView()
Definition LanguageEditor.h:14
void highlightBlock(const QString &text) override
void setSearchString(const QString &search_string)
LanguageHighlighter(QTextDocument *parent=0)
Contains logic for translating a string into a defined language.
Definition Translator.h:45
Definition FontEditor.h:6