diff options
-rw-r--r-- | src/tts/qvoice.cpp | 15 | ||||
-rw-r--r-- | src/tts/qvoice.h | 3 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/tts/qvoice.cpp b/src/tts/qvoice.cpp index d138f94..8a578fd 100644 --- a/src/tts/qvoice.cpp +++ b/src/tts/qvoice.cpp @@ -69,6 +69,21 @@ void QVoice::operator=(const QVoice &other) d->data = other.d->data; } +bool QVoice::operator==(const QVoice &other) +{ + if (d->name != other.d->name || + d->gender != other.d->gender || + d->age != other.d->age || + d->data != other.d->data) + return false; + return true; +} + +bool QVoice::operator!=(const QVoice &other) +{ + return !operator==(other); +} + void QVoice::setName(const QString &name) { d->name = name; diff --git a/src/tts/qvoice.h b/src/tts/qvoice.h index ab4a122..e7f1021 100644 --- a/src/tts/qvoice.h +++ b/src/tts/qvoice.h @@ -71,6 +71,9 @@ public: void operator=(const QVoice &other); + bool operator==(const QVoice &other); + bool operator!=(const QVoice &other); + QString name() const; Gender gender() const; Age age() const; |