1QNPWidget(3qt)                                                  QNPWidget(3qt)
2
3
4

NAME

6       QNPWidget - QWidget that is a web browser plugin window
7

SYNOPSIS

9       This class is part of the Qt Netscape Extension.
10
11       #include <qnp.h>
12
13       Inherits QWidget.
14
15   Public Members
16       QNPWidget ()
17       ~QNPWidget ()
18       virtual void enterInstance ()
19       virtual void leaveInstance ()
20       QNPInstance * instance ()
21

DESCRIPTION

23       This class is defined in the Qt Netscape Extension, which can be found
24       in the qt/extensions directory. It is not included in the main Qt API.
25
26       The QNPWidget class provides a QWidget that is a web browser plugin
27       window.
28
29       Derive from QNPWidget to create a widget that can be used as a web
30       browser plugin window, or create one and add child widgets. Instances
31       of QNPWidget may only be created when QNPInstance::newWindow() is
32       called by the browser.
33
34       A common way to develop a plugin widget is to develop it as a stand-
35       alone application window, then make it a child of a plugin widget to
36       use it as a browser plugin. The technique is:
37
38       class MyPluginWindow : public QNPWidget
39       {
40           QWidget* child;
41       public:
42           MyPluginWindow()
43           {
44               // Some widget that is normally used as a top-level widget
45               child = new MyIndependentlyDevelopedWidget();
46               // Use the background color of the web page
47               child->setBackgroundColor( backgroundColor() );
48               // Fill the plugin widget
49               child->setGeometry( 0, 0, width(), height() );
50           }
51           void resizeEvent(QResizeEvent*)
52           {
53               // Fill the plugin widget
54               child->resize(size());
55           }
56       };
57
58       The default implementation is an empty window.
59

MEMBER FUNCTION DOCUMENTATION

QNPWidget::QNPWidget ()

62       Creates a QNPWidget.
63

QNPWidget::~QNPWidget ()

65       Destroys the window. This will be called by the plugin binding code
66       when the window is no longer required. The web browser will delete
67       windows when they leave the page. The bindings will change the
68       QWidget::winId() of the window when the window is resized, but this
69       should not affect normal widget behavior.
70

void QNPWidget::enterInstance () [virtual]

72       Called when the mouse enters the plugin window. Does nothing by
73       default.
74
75       Example: grapher/grapher.cpp.
76

QNPInstance * QNPWidget::instance ()

78       Returns the instance for which this widget is the plugin window.
79

void QNPWidget::leaveInstance () [virtual]

81       Called when the mouse leaves the plugin window. Does nothing by
82       default.
83
84       Example: grapher/grapher.cpp.
85
86

SEE ALSO

88       http://doc.trolltech.com/qnpwidget.html
89       http://www.trolltech.com/faq/tech.html
90
92       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
93       license file included in the distribution for a complete license
94       statement.
95

AUTHOR

97       Generated automatically from the source code.
98

BUGS

100       If you find a bug in Qt, please report it as described in
101       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
102       help you. Thank you.
103
104       The definitive Qt documentation is provided in HTML format; it is
105       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
106       web browser. This man page is provided as a convenience for those users
107       who prefer man pages, although this format is not officially supported
108       by Trolltech.
109
110       If you find errors in this manual page, please report them to qt-
111       bugs@trolltech.com.  Please include the name of the manual page
112       (qnpwidget.3qt) and the Qt version (3.3.8).
113
114
115
116Trolltech AS                    2 February 2007                 QNPWidget(3qt)
Impressum