File indexing completed on 2024-05-19 04:49:53
0001 /**************************************************************************************** 0002 * Copyright (c) 2008 Bonne Eggleston <b.eggleston@gmail.com> * 0003 * Copyright (c) 2009 Seb Ruiz <ruiz@kde.org> * 0004 * Copyright (c) 2009 Louis Bayle <louis.bayle@gmail.com> * 0005 * Copyright (c) 2010 Nikolaj Hald Nielsen <nhn@kde.org> * 0006 * * 0007 * This program is free software; you can redistribute it and/or modify it under * 0008 * the terms of the GNU General Public License as published by the Free Software * 0009 * Foundation; either version 2 of the License, or (at your option) version 3 or * 0010 * any later version accepted by the membership of KDE e.V. (or its successor approved * 0011 * by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of * 0012 * version 3 of the license. * 0013 * * 0014 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 0015 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 0016 * PARTICULAR PURPOSE. See the GNU General Public License for more details. * 0017 * * 0018 * You should have received a copy of the GNU General Public License along with * 0019 * this program. If not, see <http://www.gnu.org/licenses/>. * 0020 ****************************************************************************************/ 0021 0022 #ifndef AMAROK_PLAYLISTVIEWCOMMON_H 0023 #define AMAROK_PLAYLISTVIEWCOMMON_H 0024 0025 #include <QAction> 0026 #include <QModelIndex> 0027 #include <QPoint> 0028 #include <KLocalizedString> 0029 0030 namespace Playlist 0031 { 0032 class ViewCommon 0033 { 0034 public: 0035 0036 ViewCommon(); 0037 ~ViewCommon(); 0038 0039 void editTrackInformation(); 0040 void trackMenu( QWidget *, const QModelIndex *, const QPoint &pos ); 0041 QList<QAction*> actionsFor( QWidget *parent, const QModelIndex *index ); 0042 0043 QList<QAction*> trackActionsFor( QWidget *parent, const QModelIndex *index ); 0044 QList<QAction*> albumActionsFor( const QModelIndex *index ); 0045 QList<QAction*> multiSourceActionsFor( QWidget *parent, const QModelIndex *index ); 0046 QList<QAction*> editActionsFor( QWidget *parent, const QModelIndex *index ); 0047 0048 private: 0049 0050 /** Sets the parent to \c parent for all actions that don't already have one set. 0051 This is needed because ActionsCapability expects actions without parent to be freed by the caller. 0052 */ 0053 QList<QAction*> parentCheckActions( QObject *parent, QList<QAction*> actions ); 0054 QAction* m_stopAfterTrackAction; 0055 QAction* m_cueTrackAction; 0056 QAction* m_removeTracTrackAction; 0057 QAction* m_findInSourceAction; 0058 }; 0059 0060 } 0061 0062 #endif