Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qtranslator.h
Go to the documentation of this file.
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
4#ifndef QTRANSLATOR_H
5#define QTRANSLATOR_H
6
7#include <QtCore/qobject.h>
8#include <QtCore/qbytearray.h>
9
11
12
13#ifndef QT_NO_TRANSLATION
14
15class QLocale;
17
18class Q_CORE_EXPORT QTranslator : public QObject
19{
21public:
22 explicit QTranslator(QObject *parent = nullptr);
24
25 virtual QString translate(const char *context, const char *sourceText,
26 const char *disambiguation = nullptr, int n = -1) const;
27
28 virtual bool isEmpty() const;
29
30 QString language() const;
31 QString filePath() const;
32
33 [[nodiscard]] bool load(const QString & filename,
34 const QString & directory = QString(),
35 const QString & search_delimiters = QString(),
36 const QString & suffix = QString());
37 [[nodiscard]] bool load(const QLocale & locale,
38 const QString & filename,
39 const QString & prefix = QString(),
40 const QString & directory = QString(),
41 const QString & suffix = QString());
42 [[nodiscard]] bool load(const uchar *data, int len,
43 const QString &directory = QString());
44
45private:
46 Q_DISABLE_COPY(QTranslator)
47 Q_DECLARE_PRIVATE(QTranslator)
48};
49
50#endif // QT_NO_TRANSLATION
51
53
54#endif // QTRANSLATOR_H
\inmodule QtCore
Definition qobject.h:103
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qtranslator.h:19
p1 load("image.bmp")
Combined button and popup list for selecting options.
static void * context
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLfloat n
GLenum GLsizei len
#define Q_OBJECT
unsigned char uchar
Definition qtypes.h:32
static bool translate(xcb_connection_t *connection, xcb_window_t child, xcb_window_t parent, int *x, int *y)