summaryrefslogtreecommitdiffstats
path: root/examples/demo/dnd/dnd.h
blob: 311360daf22ae21d9d065ebe365dd5cbdec5d437 (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 <qpixmap.h>
#include <qmap.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; }

    Q_DUMMY_COMPARISON_OPERATOR( IconItem )

protected:
    TQPixmap loadPixmap( const TQString& name );

private:
    TQString _name;
    TQPixmap _pixmap;
};

class DnDDemo : public DnDDemoBase
{
    Q_OBJECT

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

    IconItem findItem( const TQString& tag );

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

#endif