2#include <NDEVR/Translator.h>
4#include <QSyntaxHighlighter>
5#include <QRegularExpression>
8 class LanguageEditorUI;
26 struct HighlightingRule
28 QRegularExpression pattern;
29 QTextCharFormat format;
31 QVector<HighlightingRule> m_highlighting_rules;
44#if SUPPORTS_GOOGLE_TRANSLATE
45 QString googleTranslate(
const QString& keyword,
const QString& from,
const QString& to)
const;
55 Ui::LanguageEditorUI*
ui;
Allows the user to adjust translation values for a given language.
Definition LanguageEditor.h:37
void setReferenceTranslation(const Translator &translator)
Translator m_translator
Definition LanguageEditor.h:56
void setEditingTranslation(const Translator &translator)
Translator m_reference_translator
Definition LanguageEditor.h:57
LanguageEditor(QWidget *parent=nullptr)
bool m_has_change
Definition LanguageEditor.h:54
Ui::LanguageEditorUI * ui
Definition LanguageEditor.h:55
Translator m_original_translator
Definition LanguageEditor.h:58
virtual ~LanguageEditor()
void updateTranslationView()
Syntactically highlights translations.
Definition LanguageEditor.h:17
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