| 1 | // Copyright (C) 2022 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 | |
| 5 | |
| 6 | #ifndef QVOICE_P_H |
| 7 | #define QVOICE_P_H |
| 8 | |
| 9 | // |
| 10 | // W A R N I N G |
| 11 | // ------------- |
| 12 | // |
| 13 | // This file is not part of the Qt API. It exists for the convenience |
| 14 | // of other Qt classes. This header file may change from version to |
| 15 | // version without notice, or even be removed. |
| 16 | // |
| 17 | // We mean it. |
| 18 | // |
| 19 | |
| 20 | #include <qvoice.h> |
| 21 | |
| 22 | #include <QString> |
| 23 | #include <QLocale> |
| 24 | #include <QVariant> |
| 25 | #include <private/qglobal_p.h> |
| 26 | |
| 27 | QT_BEGIN_NAMESPACE |
| 28 | |
| 29 | class QVoicePrivate : public QSharedData |
| 30 | { |
| 31 | public: |
| 32 | QVoicePrivate() = default; |
| 33 | QVoicePrivate(const QVoicePrivate &other); |
| 34 | QVoicePrivate(const QString &n, const QLocale &l, QVoice::Gender g, |
| 35 | QVoice::Age a, const QVariant &d); |
| 36 | ~QVoicePrivate() = default; |
| 37 | |
| 38 | QString name; |
| 39 | QLocale locale; |
| 40 | QVoice::Gender gender = QVoice::Unknown; |
| 41 | QVoice::Age age = QVoice::Other; |
| 42 | // Various data depending on the platform: |
| 43 | // On OS X the VoiceIdentifier is stored. |
| 44 | // On unix the synthesizer (output module) is stored. |
| 45 | QVariant data; |
| 46 | }; |
| 47 | |
| 48 | QVoicePrivate::QVoicePrivate(const QVoicePrivate &other) |
| 49 | : QSharedData(other), name(other.name), locale(other.locale) |
| 50 | , gender(other.gender), age(other.age), data(other.data) |
| 51 | { |
| 52 | } |
| 53 | |
| 54 | QVoicePrivate::QVoicePrivate(const QString &n, const QLocale &l, QVoice::Gender g, |
| 55 | QVoice::Age a, const QVariant &d) |
| 56 | :name(n), locale(l), gender(g), age(a), data(d) |
| 57 | { |
| 58 | } |
| 59 | |
| 60 | QT_END_NAMESPACE |
| 61 | |
| 62 | #endif |
| 63 | |