| 1 |
/**************************************************************************************** |
| 2 |
* Copyright (c) 2009 Nikolaj Hald Nielsen <nhn@kde.org> * |
| 3 |
* * |
| 4 |
* This program is free software; you can redistribute it and/or modify it under * |
| 5 |
* the terms of the GNU General Public License as published by the Free Software * |
| 6 |
* Foundation; either version 2 of the License, or (at your option) any later * |
| 7 |
* version. * |
| 8 |
* * |
| 9 |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY * |
| 10 |
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * |
| 11 |
* PARTICULAR PURPOSE. See the GNU General Public License for more details. * |
| 12 |
* * |
| 13 |
* You should have received a copy of the GNU General Public License along with * |
| 14 |
* this program. If not, see <http://www.gnu.org/licenses/>. * |
| 15 |
****************************************************************************************/ |
| 16 |
|
| 17 |
#ifndef GLOBALCURRENTTRACKACTIONS_H |
| 18 |
#define GLOBALCURRENTTRACKACTIONS_H |
| 19 |
|
| 20 |
#include "amarok_export.h" |
| 21 |
#include "core/meta/Meta.h" |
| 22 |
#include "core/support/SmartPointerList.h" |
| 23 |
|
| 24 |
#include <QAction> |
| 25 |
|
| 26 |
|
| 27 |
class GlobalCurrentTrackActions; |
| 28 |
|
| 29 |
namespace The { |
| 30 |
AMAROK_EXPORT GlobalCurrentTrackActions* globalCurrentTrackActions(); |
| 31 |
} |
| 32 |
|
| 33 |
/** |
| 34 |
A global list of actions that is made available to all playing tracks. |
| 35 |
|
| 36 |
@author Nikolaj Hald Nielsen <nhn@kde.org> |
| 37 |
*/ |
| 38 |
class AMAROK_EXPORT GlobalCurrentTrackActions |
| 39 |
{ |
| 40 |
friend GlobalCurrentTrackActions* The::globalCurrentTrackActions(); |
| 41 |
|
| 42 |
public: |
| 43 |
void addAction( QAction * action ); |
| 44 |
QList<QAction *> actions(); |
| 45 |
|
| 46 |
private: |
| 47 |
GlobalCurrentTrackActions(); |
| 48 |
~GlobalCurrentTrackActions(); |
| 49 |
|
| 50 |
SmartPointerList<QAction> m_actions; |
| 51 |
}; |
| 52 |
|
| 53 |
#endif |