summaryrefslogtreecommitdiffstats
path: root/examples/demo/dnd/iconview.h
blob: cd917f7920a4934d33b4f5866a156bda5dc65a13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <qiconview.h>
#include <qstring.h>

#include "dnd.h"

class IconViewItem : public QIconViewItem
{
public:
    IconViewItem( QIconView * parent, const QString & text, const QPixmap & icon, const QString& tag )
        : QIconViewItem( parent, text, icon ), _tag( tag ) {}
    virtual ~IconViewItem() {}

    QString tag() { return _tag; }

private:
    QString _tag;
};

class IconView : public QIconView
{
    Q_OBJECT

public:
    IconView( QWidget* parent = 0, const char* name = 0 );
    ~IconView();

    QDragObject *dragObject();

public slots:
    void slotNewItem( QDropEvent *t, const QValueList<QIconDragItem>& );
};