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

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

    TQDragObject *dragObject();

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