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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
#include "plugin.h"
#include "../widget/filechooser.h"
static const char *filechooser_pixmap[] = {
"22 22 8 1",
" c Gray100",
". c Gray97",
"X c #4f504f",
"o c #00007f",
"O c Gray0",
"+ c none",
"@ c Gray0",
"# c Gray0",
"++++++++++++++++++++++",
"++++++++++++++++++++++",
"++++++++++++++++++++++",
"++++++++++++++++++++++",
"+OOOOOOOOOOOOOOOOOOOO+",
"OOXXXXXXXXXXXXXXXXXXOO",
"OXX. OO OO O",
"OX. oo O O",
"OX. oo O .O",
"OX ooo oooo O O",
"OX oo oo oo O O",
"OX oooo oo oo O O",
"OX oo oo oo oo O O",
"OX oo oo oo oo O O",
"OX oooo oooo O O",
"OX OO OO O",
"OO..................OO",
"+OOOOOOOOOOOOOOOOOOOO+",
"++++++++++++++++++++++",
"++++++++++++++++++++++",
"++++++++++++++++++++++",
"++++++++++++++++++++++"
};
CustomWidgetPlugin::CustomWidgetPlugin()
{
}
QStringList CustomWidgetPlugin::keys() const
{
QStringList list;
list << "FileChooser";
return list;
}
QWidget* CustomWidgetPlugin::create( const QString &key, QWidget* parent, const char* name )
{
if ( key == "FileChooser" )
return new FileChooser( parent, name );
return 0;
}
QString CustomWidgetPlugin::group( const QString& feature ) const
{
if ( feature == "FileChooser" )
return "Input";
return QString::null;
}
QIconSet CustomWidgetPlugin::iconSet( const QString& ) const
{
return QIconSet( QPixmap( filechooser_pixmap ) );
}
QString CustomWidgetPlugin::includeFile( const QString& feature ) const
{
if ( feature == "FileChooser" )
return "filechooser.h";
return QString::null;
}
QString CustomWidgetPlugin::toolTip( const QString& feature ) const
{
if ( feature == "FileChooser" )
return "File Chooser Widget";
return QString::null;
}
QString CustomWidgetPlugin::whatsThis( const QString& feature ) const
{
if ( feature == "FileChooser" )
return "A widget to choose a file or directory";
return QString::null;
}
bool CustomWidgetPlugin::isContainer( const QString& ) const
{
return FALSE;
}
Q_EXPORT_PLUGIN( CustomWidgetPlugin )
|