1QWidgetPlugin(3qt) QWidgetPlugin(3qt)
2
3
4
6 QWidgetPlugin - Abstract base for custom QWidget plugins
7
9 #include <qwidgetplugin.h>
10
11 Public Members
12 QWidgetPlugin ()
13 ~QWidgetPlugin ()
14 virtual QStringList keys () const = 0
15 virtual QWidget * create ( const QString & key, QWidget * parent = 0,
16 const char * name = 0 ) = 0
17 virtual QString group ( const QString & key ) const
18 virtual QIconSet iconSet ( const QString & key ) const
19 virtual QString includeFile ( const QString & key ) const
20 virtual QString toolTip ( const QString & key ) const
21 virtual QString whatsThis ( const QString & key ) const
22 virtual bool isContainer ( const QString & key ) const
23
25 The QWidgetPlugin class provides an abstract base for custom QWidget
26 plugins.
27
28 The widget plugin is a simple plugin interface that makes it easy to
29 create custom widgets that can be included in forms using Qt Designer
30 and used by applications.
31
32 Writing a widget plugin is achieved by subclassing this base class,
33 reimplementing the pure virtual functions keys(), create(), group(),
34 iconSet(), includeFile(), toolTip(), whatsThis() and isContainer(), and
35 exporting the class with the Q_EXPORT_PLUGIN macro.
36
37 See the Qt Designer manual's, 'Creating Custom Widgets' section in the
38 'Creating Custom Widgets' chapter, for a complete example of a
39 QWidgetPlugin.
40
41 See also the Plugins documentation and the QWidgetFactory class that is
42 supplied with Qt Designer.
43
44 See also Plugins.
45
48 Constructs a widget plugin. This is invoked automatically by the
49 Q_EXPORT_PLUGIN macro.
50
52 Destroys the widget plugin.
53
54 You never have to call this explicitly. Qt destroys a plugin
55 automatically when it is no longer used.
56
58 const char * name = 0 ) [pure virtual]
59 Creates and returns a QWidget object for the widget key key. The widget
60 key is the class name of the required widget. The name and parent
61 arguments are passed to the custom widget's constructor.
62
63 See also keys().
64
66 Returns the group (toolbar name) that the custom widget of class key
67 should be part of when Qt Designer loads it.
68
69 The default implementation returns QString::null.
70
72 Returns the iconset that Qt Designer should use to represent the custom
73 widget of class key in the toolbar.
74
75 The default implementation returns an null iconset.
76
78 Returns the name of the include file that Qt Designer and uic should
79 use to include the custom widget of class key in generated code.
80
81 The default implementation returns QString::null.
82
84 Returns TRUE if the custom widget of class key can contain other
85 widgets, e.g. like QFrame; otherwise returns FALSE.
86
87 The default implementation returns FALSE.
88
90 Returns the list of widget keys this plugin supports.
91
92 These keys must be the class names of the custom widgets that are
93 implemented in the plugin.
94
95 See also create().
96
98 Returns the text of the tooltip that Qt Designer should use for the
99 custom widget of class key's toolbar button.
100
101 The default implementation returns QString::null.
102
104 Returns the text of the whatsThis text that Qt Designer should use when
105 the user requests whatsThis help for the custom widget of class key.
106
107 The default implementation returns QString::null.
108
109
111 http://doc.trolltech.com/qwidgetplugin.html
112 http://www.trolltech.com/faq/tech.html
113
115 Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
116 license file included in the distribution for a complete license
117 statement.
118
120 Generated automatically from the source code.
121
123 If you find a bug in Qt, please report it as described in
124 http://doc.trolltech.com/bughowto.html. Good bug reports help us to
125 help you. Thank you.
126
127 The definitive Qt documentation is provided in HTML format; it is
128 located at $QTDIR/doc/html and can be read using Qt Assistant or with a
129 web browser. This man page is provided as a convenience for those users
130 who prefer man pages, although this format is not officially supported
131 by Trolltech.
132
133 If you find errors in this manual page, please report them to qt-
134 bugs@trolltech.com. Please include the name of the manual page
135 (qwidgetplugin.3qt) and the Qt version (3.3.8).
136
137
138
139Trolltech AS 2 February 2007 QWidgetPlugin(3qt)