You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
700 B
41 lines
700 B
13 years ago
|
#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
|