1 /**
2  * Copyright (C) 2005 Michael Pyne <mpyne@kde.org>
3  * Copyright (C) 2014 Arnold Dumas <contact@arnolddumas.fr>
4  *
5  * This program is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License as published by the Free Software
7  * Foundation; either version 2 of the License, or (at your option) any later
8  * version.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT ANY
11  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12  * PARTICULAR PURPOSE. See the GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef JUK_COVERICONVIEW_H
19 #define JUK_COVERICONVIEW_H
20 
21 #include <QListWidget>
22 
23 #include "covermanager.h"
24 
25 // The WebImageFetcher dialog also has a class named CoverIconViewItem and I
26 // don't like the idea of naming it "CoverIVI" or something, so just namespace
27 // it out.  I would merge them except for webimagefetcher's dependence on KIO
28 // and such.
29 
30 namespace CoverUtility
31 {
32     class CoverIconViewItem : public QListWidgetItem
33     {
34     public:
35         CoverIconViewItem(coverKey id, QListWidget *parent);
36 
id()37         coverKey id() const { return m_id; }
38 
39     private:
40         coverKey m_id;
41     };
42 }
43 
44 using CoverUtility::CoverIconViewItem;
45 
46 /**
47  * This class subclasses QListWidget in order to provide cover drag-and-drop
48  * support.
49  *
50  * @author Michael Pyne <mpyne@kde.org>
51  */
52 class CoverIconView : public QListWidget
53 {
54 public:
55     explicit CoverIconView(QWidget *parent, const char *name = 0);
56 
57     CoverIconViewItem *currentItem() const;
58 
59 protected:
60     // virtual Q3DragObject *dragObject();
61 };
62 
63 #endif /* JUK_COVERICONVIEW_H */
64 
65 // vim: set et sw=4 tw=0 sta:
66