1 | // Copyright (C) 2020 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | #ifndef QQMLDEBUGTRANSLATIONSERVICE_H |
4 | #define QQMLDEBUGTRANSLATIONSERVICE_H |
5 | |
6 | // |
7 | // W A R N I N G |
8 | // ------------- |
9 | // |
10 | // This file is not part of the Qt API. It exists purely as an |
11 | // implementation detail. This header file may change from version to |
12 | // version without notice, or even be removed. |
13 | // |
14 | // We mean it. |
15 | // |
16 | #include <QtCore/qglobal.h> |
17 | |
18 | #include <private/qqmldebugserviceinterfaces_p.h> |
19 | |
20 | #include <QtCore/qbytearray.h> |
21 | #include <QtCore/qstring.h> |
22 | #include <QtCore/qurl.h> |
23 | #include <QtGui/qcolor.h> |
24 | |
25 | QT_BEGIN_NAMESPACE |
26 | |
27 | class QQmlDebugTranslationServicePrivate; |
28 | class QQmlDebugTranslationServiceImpl : public QQmlDebugTranslationService |
29 | { |
30 | Q_OBJECT |
31 | public: |
32 | QQmlDebugTranslationServiceImpl(QObject *parent = nullptr); |
33 | ~QQmlDebugTranslationServiceImpl(); |
34 | |
35 | void foundTranslationBinding(const TranslationBindingInformation &translationBindingInformation) override; |
36 | |
37 | void messageReceived(const QByteArray &message) override; |
38 | void engineAboutToBeAdded(QJSEngine *engine) override; |
39 | void engineAboutToBeRemoved(QJSEngine *engine) override; |
40 | |
41 | Q_SIGNALS: |
42 | void language(const QUrl &context, const QLocale &locale); |
43 | void state(const QString &stateName); |
44 | void stateList(); |
45 | void watchTextElides(bool); |
46 | void translationIssues(); |
47 | void elidedTranslations(); |
48 | void sendTranslatableTextOccurrences(); |
49 | |
50 | private: |
51 | QQmlDebugTranslationServicePrivate *d; |
52 | }; |
53 | |
54 | QT_END_NAMESPACE |
55 | |
56 | #endif // QQMLDEBUGTRANSLATIONSERVICE_H |
57 |