summaryrefslogtreecommitdiffstats
path: root/examples/demo/dnd/dnd.h
blob: e47b53d109ac91067b9b7aff67808ff1c63b6106 (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
32
33
34
35
36
37
38
39
40
#include <ntqpixmap.h>
#include <ntqmap.h>
#include "dndbase.h"

#ifndef DNDDEMO_H
#define DNDDEMO_H

class IconItem
{
public:
    IconItem( const TQString& name = TQString::null, const TQString& icon = TQString::null );

    TQString name() { return _name; }
    TQPixmap *pixmap() { return &_pixmap; }

    TQ_DUMMY_COMPARISON_OPERATOR( IconItem )

protected:
    TQPixmap loadPixmap( const TQString& name );

private:
    TQString _name;
    TQPixmap _pixmap;
};

class DnDDemo : public DnDDemoBase
{
    TQ_OBJECT

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

    IconItem findItem( const TQString& tag );

private:
    TQMap<TQString,IconItem> items;
};

#endif