KDeclarative

translationcontext.h
1 /*
2  SPDX-FileCopyrightText: 2014 Kevin Ottens <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6 
7 #ifndef TRANSLATIONCONTEXT_H
8 #define TRANSLATIONCONTEXT_H
9 
10 #include <QObject>
11 
12 class TranslationContext : public QObject
13 {
14  Q_OBJECT
15  Q_PROPERTY(QString domain READ domain WRITE setDomain NOTIFY domainChanged)
16 
17 public:
18  explicit TranslationContext(QObject* parent = nullptr);
19  virtual ~TranslationContext();
20 
21  QString domain() const;
22 
23 public Q_SLOTS:
24  void setDomain(const QString &domain);
25 
26 Q_SIGNALS:
27  void domainChanged(const QString &domain);
28 
29 public:
30  Q_INVOKABLE QString i18n(const QString &message, const QString &param1 = QString(), const QString &param2 = QString(), const QString &param3 = QString(), const QString &param4 = QString(), const QString &param5 = QString(), const QString &param6 = QString(), const QString &param7 = QString(), const QString &param8 = QString(), const QString &param9 = QString(), const QString &param10 = QString()) const;
31 
32  Q_INVOKABLE QString i18nc(const QString &context, const QString &message, const QString &param1 = QString(), const QString &param2 = QString(), const QString &param3 = QString(), const QString &param4 = QString(), const QString &param5 = QString(), const QString &param6 = QString(), const QString &param7 = QString(), const QString &param8 = QString(), const QString &param9 = QString(), const QString &param10 = QString()) const;
33 
34  Q_INVOKABLE QString i18np(const QString &singular, const QString &plural, const QString &param1 = QString(), const QString &param2 = QString(), const QString &param3 = QString(), const QString &param4 = QString(), const QString &param5 = QString(), const QString &param6 = QString(), const QString &param7 = QString(), const QString &param8 = QString(), const QString &param9 = QString(), const QString &param10 = QString()) const;
35 
36  Q_INVOKABLE QString i18ncp(const QString &context, const QString &singular, const QString &plural, const QString &param1 = QString(), const QString &param2 = QString(), const QString &param3 = QString(), const QString &param4 = QString(), const QString &param5 = QString(), const QString &param6 = QString(), const QString &param7 = QString(), const QString &param8 = QString(), const QString &param9 = QString(), const QString &param10 = QString()) const;
37 
38 private:
39  Q_DISABLE_COPY(TranslationContext)
40 
41  QString m_domain;
42 };
43 
44 #endif // TRANSLATIONCONTEXT_H
QString i18np(const char *singular, const char *plural, const TYPE &arg...)
Q_SIGNALSQ_SIGNALS
Q_OBJECTQ_OBJECT
QString i18nc(const char *context, const char *text, const TYPE &arg...)
Q_PROPERTY(...)
QString i18ncp(const char *context, const char *singular, const char *plural, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
Q_DISABLE_COPY(Class)
Q_INVOKABLEQ_INVOKABLE
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 25 2021 22:44:28 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.