diff --git a/src/profile.cpp b/src/profile.cpp index 22b74de..a92208a 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -1,70 +1,70 @@ /* Copyright 2014-2015 Harald Sitter This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) version 3, or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), which shall act as a proxy defined in Section 6 of version 3 of the license. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see . */ #include "profile.h" #include "profile_p.h" namespace PulseAudioQt { Profile::Profile(QObject *parent) - : QObject(parent) + : PulseObject(parent) , d(new ProfilePrivate(this)) { } Profile::~Profile() { } ProfilePrivate::ProfilePrivate(Profile *q) : q(q) , m_name() , m_description() , m_priority(0) , m_availability(Profile::Unknown) { } ProfilePrivate::~ProfilePrivate() { } QString Profile::name() const { return d->m_name; } QString Profile::description() const { return d->m_description; } quint32 Profile::priority() const { return d->m_priority; } Profile::Availability Profile::availability() const { return d->m_availability; } } // PulseAudioQt diff --git a/src/profile.h b/src/profile.h index fed1fea..fc5c4d0 100644 --- a/src/profile.h +++ b/src/profile.h @@ -1,73 +1,74 @@ /* Copyright 2014-2015 Harald Sitter This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) version 3, or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), which shall act as a proxy defined in Section 6 of version 3 of the license. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see . */ #ifndef PROFILE_H #define PROFILE_H #include #include #include "kf5pulseaudioqt_export.h" +#include "pulseobject.h" namespace PulseAudioQt { -class KF5PULSEAUDIOQT_EXPORT Profile : public QObject +class KF5PULSEAUDIOQT_EXPORT Profile : public PulseObject { Q_OBJECT Q_PROPERTY(QString name READ name NOTIFY nameChanged) Q_PROPERTY(QString description READ description NOTIFY descriptionChanged) Q_PROPERTY(quint32 priority READ priority NOTIFY priorityChanged) Q_PROPERTY(Availability availability READ availability NOTIFY availabilityChanged) public: enum Availability { Unknown, Available, Unavailable }; Q_ENUM(Availability) ~Profile(); template void setInfo(const PAInfo *info); QString name() const; QString description() const; quint32 priority() const; Availability availability() const; Q_SIGNALS: void nameChanged(); void descriptionChanged(); void priorityChanged(); void availabilityChanged(); protected: explicit Profile(QObject *parent); class ProfilePrivate *const d; friend class Device; friend class CardPrivate; }; } // PulseAudioQt #endif // PROFILE_H