summaryrefslogtreecommitdiffstats
path: root/examples/demo/dnd/iconview.h
blob: b02949a83fb0eab3ecc01a0b4e5426aaf33bcdbb (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 <ntqiconview.h>
#include <ntqstring.h>

#include "dnd.h"

class IconViewItem : public TQIconViewItem
{
public:
    IconViewItem( TQIconView * parent, const TQString & text, const TQPixmap & icon, const TQString& tag )
        : TQIconViewItem( parent, text, icon ), _tag( tag ) {}
    virtual ~IconViewItem() {}

    TQString tag() { return _tag; }

private:
    TQString _tag;
};

class IconView : public TQIconView
{
    Q_OBJECT

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

    TQDragObject *dragObject();

public slots:
    void slotNewItem( TQDropEvent *t, const TQValueList<TQIconDragItem>& );
};