summaryrefslogtreecommitdiffstats
path: root/examples/demo/dnd/iconview.h
blob: 94c0110d9f2f3ab890df9bd62f757024408f5c44 (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 <tqstring.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
{
    TQ_OBJECT

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

    TQDragObject *dragObject();

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