File indexing completed on 2024-05-12 17:24:21

0001 // SPDX-FileCopyrightText: 2023 Felipe Kinoshita <kinofhek@gmail.com>
0002 // SPDX-License-Identifier: LGPL-2.1-or-later
0003 
0004 #pragma once
0005 
0006 #include <QHash>
0007 #include <QObject>
0008 
0009 class QQuickWindow;
0010 
0011 class Translator : public QObject
0012 {
0013     Q_OBJECT
0014 
0015 public:
0016     explicit Translator(QObject* parent = nullptr);
0017 
0018     Q_INVOKABLE void translate(const QString &message);
0019     Q_SIGNAL void translation(const QString &morse);
0020 
0021 private:
0022     QHash<QChar, QString> m_morseTable;
0023 };