File indexing completed on 2024-04-21 04:47:50

0001 /****************************************************************************************
0002  * Copyright (c) 2009 Nikolaj Hald Nielsen <nhn@kde.org>                                *
0003  *                                                                                      *
0004  * This program is free software; you can redistribute it and/or modify it under        *
0005  * the terms of the GNU General Public License as published by the Free Software        *
0006  * Foundation; either version 2 of the License, or (at your option) any later           *
0007  * version.                                                                             *
0008  *                                                                                      *
0009  * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
0010  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
0011  * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
0012  *                                                                                      *
0013  * You should have received a copy of the GNU General Public License along with         *
0014  * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
0015  ****************************************************************************************/
0016 
0017 #ifndef GLOBALCURRENTTRACKACTIONS_H
0018 #define GLOBALCURRENTTRACKACTIONS_H
0019 
0020 #include "amarok_export.h"
0021 #include "core/meta/forward_declarations.h"
0022 
0023 #include <QObject>
0024 
0025 
0026 class GlobalCurrentTrackActions;
0027 class QAction;
0028 
0029 namespace The {
0030     AMAROK_EXPORT GlobalCurrentTrackActions* globalCurrentTrackActions();
0031 }
0032 
0033 /**
0034 A global list of actions that is made available to all playing tracks.
0035 
0036     @author Nikolaj Hald Nielsen <nhn@kde.org> 
0037 */
0038 class AMAROK_EXPORT GlobalCurrentTrackActions : public QObject
0039 {
0040     friend GlobalCurrentTrackActions* The::globalCurrentTrackActions();
0041     
0042 public:
0043     void addAction( QAction * action );
0044     QList<QAction *> actions();
0045     
0046 private:
0047     GlobalCurrentTrackActions();
0048     ~GlobalCurrentTrackActions() override;
0049     
0050     QList<QAction*> m_actions;
0051 };
0052 
0053 #endif