Last change
on this file since 208 was 160, checked in by dmik, 19 years ago |
Imported table and iconview modules and a bunch of dependent examples from the official release 3.3.1 from Trolltech.
|
-
Property svn:keywords
set to
Id
|
File size:
726 bytes
|
Line | |
---|
1 | #include <qpixmap.h>
|
---|
2 | #include <qmap.h>
|
---|
3 | #include "dndbase.h"
|
---|
4 |
|
---|
5 | #ifndef DNDDEMO_H
|
---|
6 | #define DNDDEMO_H
|
---|
7 |
|
---|
8 | class IconItem
|
---|
9 | {
|
---|
10 | public:
|
---|
11 | IconItem( const QString& name = QString::null, const QString& icon = QString::null );
|
---|
12 |
|
---|
13 | QString name() { return _name; }
|
---|
14 | QPixmap *pixmap() { return &_pixmap; }
|
---|
15 |
|
---|
16 | Q_DUMMY_COMPARISON_OPERATOR( IconItem )
|
---|
17 |
|
---|
18 | protected:
|
---|
19 | QPixmap loadPixmap( const QString& name );
|
---|
20 |
|
---|
21 | private:
|
---|
22 | QString _name;
|
---|
23 | QPixmap _pixmap;
|
---|
24 | };
|
---|
25 |
|
---|
26 | class DnDDemo : public DnDDemoBase
|
---|
27 | {
|
---|
28 | Q_OBJECT
|
---|
29 |
|
---|
30 | public:
|
---|
31 | DnDDemo( QWidget* parent = 0, const char* name = 0 );
|
---|
32 | ~DnDDemo();
|
---|
33 |
|
---|
34 | IconItem findItem( const QString& tag );
|
---|
35 |
|
---|
36 | private:
|
---|
37 | QMap<QString,IconItem> items;
|
---|
38 | };
|
---|
39 |
|
---|
40 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.