summaryrefslogtreecommitdiffstats
path: root/examples/demo/dnd/dnd.h
blob: 3487d9cc99a2f586bc394e9bcf1fd9de9740e917 (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 <tqmap.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