File indexing completed on 2024-05-05 03:51:30

0001 /****************************************************************************
0002 **
0003 ** Copyright (C) 2016 by Sandro S. Andrade <sandroandrade@kde.org>
0004 **
0005 ** This program is free software; you can redistribute it and/or
0006 ** modify it under the terms of the GNU General Public License as
0007 ** published by the Free Software Foundation; either version 2 of
0008 ** the License or (at your option) version 3 or any later version
0009 ** accepted by the membership of KDE e.V. (or its successor approved
0010 ** by the membership of KDE e.V.), which shall act as a proxy
0011 ** defined in Section 14 of version 3 of the license.
0012 **
0013 ** This program is distributed in the hope that it will be useful,
0014 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
0015 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0016 ** GNU General Public License for more details.
0017 **
0018 ** You should have received a copy of the GNU General Public License
0019 ** along with this program.  If not, see <http://www.gnu.org/licenses/>.
0020 **
0021 ****************************************************************************/
0022 
0023 #include "isoundcontroller.h"
0024 
0025 namespace Minuet
0026 {
0027 ISoundController::ISoundController(QObject *parent) : IPlugin(parent)
0028 {
0029     setPlaybackLabel(QStringLiteral("00:00.00"));
0030     setState(StoppedState);
0031 }
0032 
0033 ISoundController::State ISoundController::state() const
0034 {
0035     return m_state;
0036 }
0037 
0038 QString ISoundController::playbackLabel() const
0039 {
0040     return m_playbackLabel;
0041 }
0042 
0043 void ISoundController::setPlaybackLabel(const QString &playbackLabel)
0044 {
0045     if (m_playbackLabel != playbackLabel) {
0046         m_playbackLabel = playbackLabel;
0047         emit playbackLabelChanged(m_playbackLabel);
0048     }
0049 }
0050 
0051 void ISoundController::setState(State state)
0052 {
0053     if (m_state != state) {
0054         m_state = state;
0055         emit stateChanged(m_state);
0056     }
0057 }
0058 
0059 }
0060 
0061 #include "moc_isoundcontroller.cpp"