classQNPWidget.html
QNPWidget Class Reference
The QNPWidget class provides a QWidget that is a Web-browser plugin window. More...
#include <qnp.h>
Inheritance diagram for QNPWidget:

Public Member Functions | |
QNPWidget () | |
~QNPWidget () | |
void | enterEvent (QEvent *) |
void | leaveEvent (QEvent *) |
virtual void | enterInstance () |
virtual void | leaveInstance () |
QNPInstance * | instance () |
Detailed Description
The QNPWidget class provides a QWidget that is a Web-browser plugin window.Netscape Plugin
Derive from QNPWidget to create a widget that can be used as a Browser plugin window, or create one and add child widgets. Instances of QNPWidget may only be created when QNPInstance::newWindow() is called by the browser.
A common way to develop a plugin widget is to develop it as a stand-alone application window, then make it a child of a plugin widget to use it as a browser plugin. The technique is:
class MyPluginWindow : public QNPWidget { QWidget* child; public: MyPluginWindow() { // Some widget that is normally used as a top-level widget child = new MyIndependentlyDevelopedWidget(); // Use the background color of the web page child->setBackgroundColor( backgroundColor() ); // Fill the plugin widget child->setGeometry( 0, 0, width(), height() ); } void resizeEvent(QResizeEvent*) { // Fill the plugin widget child->resize(size()); } };
The default implementation is an empty window.
Constructor & Destructor Documentation
|
Creates a QNPWidget. |
|
Destroys the window. This will be called by the plugin binding code when the window is no longer required. The Web-browser will delete windows when they leave the page. The bindings will change the QWidget::winId() of the window when the window is resized, but this should not affect normal widget behavior. |
Member Function Documentation
|
Called when the mouse enters the plugin window. Does nothing by default. Reimplemented in iARSWidget. |
|
Returns the instance for which this widget is the window. |
|
Called when the mouse leaves the plugin window. Does nothing by default. Reimplemented in iARSWidget. |
The documentation for this class was generated from the following files:
- qnp.h
- qnp.cpp
Generated on Thu Nov 25 15:42:55 2004 for iARS(internetAudioRenderingSystem) by
