covericonview.h 1.78 KB
Newer Older
1 2
/**
 * Copyright (C) 2005 Michael Pyne <mpyne@kde.org>
Arnold Dumas's avatar
Arnold Dumas committed
3
 * Copyright (C) 2014 Arnold Dumas <contact@arnolddumas.fr>
4 5 6 7 8 9 10 11 12 13 14 15 16
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 * PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program.  If not, see <http://www.gnu.org/licenses/>.
 */
Michael Pyne's avatar
Michael Pyne committed
17

18 19
#ifndef COVERICONVIEW_H
#define COVERICONVIEW_H
Michael Pyne's avatar
Michael Pyne committed
20

21
#include <klistwidget.h>
Michael Pyne's avatar
Michael Pyne committed
22 23 24

#include "covermanager.h"

25
// The WebImageFetcher dialog also has a class named CoverIconViewItem and I
Michael Pyne's avatar
Michael Pyne committed
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
Michael Pyne's avatar
Michael Pyne committed
28
// and such.
Scott Wheeler's avatar
Scott Wheeler committed
29

Michael Pyne's avatar
Michael Pyne committed
30 31
namespace CoverUtility
{
32
    class CoverIconViewItem : public QListWidgetItem
Michael Pyne's avatar
Michael Pyne committed
33 34
    {
    public:
35
        CoverIconViewItem(coverKey id, KListWidget *parent);
Michael Pyne's avatar
Michael Pyne committed
36

37
        coverKey id() const { return m_id; }
Michael Pyne's avatar
Michael Pyne committed
38 39

    private:
40
        coverKey m_id;
Michael Pyne's avatar
Michael Pyne committed
41
    };
42
}
Michael Pyne's avatar
Michael Pyne committed
43 44 45 46

using CoverUtility::CoverIconViewItem;

/**
47
 * This class subclasses QListWidget in order to provide cover drag-and-drop
Michael Pyne's avatar
Michael Pyne committed
48 49
 * support.
 *
50
 * @author Michael Pyne <mpyne@kde.org>
Michael Pyne's avatar
Michael Pyne committed
51
 */
52
class CoverIconView : public KListWidget
Michael Pyne's avatar
Michael Pyne committed
53 54
{
public:
55
    explicit CoverIconView(QWidget *parent, const char *name = 0);
Michael Pyne's avatar
Michael Pyne committed
56 57 58 59

    CoverIconViewItem *currentItem() const;

protected:
60
    // virtual Q3DragObject *dragObject();
Michael Pyne's avatar
Michael Pyne committed
61 62
};

63
#endif /* COVERICONVIEW_H */
Michael Pyne's avatar
Michael Pyne committed
64

65
// vim: set et sw=4 tw=0 sta: