📄 qnpwidget.3qt
字号:
.TH QNPWidget 3qt "10 November 2000" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2000 Trolltech AS. All rights reserved. See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQNPWidget \- A QWidget that is a Web-browser plugin window [Qt NSPlugin Extension].SH SYNOPSIS.br.PP\fC#include <qnp.h>\fR.PPInherits QWidget..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQNPWidget\fR () ".br.ti -1c.BI "\fB~QNPWidget\fR () ".br.ti -1c.BI "void \fBsetWindow\fR ( bool ) ".br.ti -1c.BI "void \fBunsetWindow\fR () ".br.ti -1c.BI "virtual void \fBenterInstance\fR () ".br.ti -1c.BI "virtual void \fBleaveInstance\fR () ".br.ti -1c.BI "QNPInstance* \fBinstance\fR () ".br.in -1c.SH DESCRIPTIONThis class is defined in the \fBQt NSPlugin Extension\fR, which can be found in the \fCqt/extensions\fR directory. It is not included in the main Qt API..PPA QWidget that is a Web-browser plugin window.PPDerive 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..PPA common way to develop a plugin widget is to develop it as a stand-alone application window, then make it a \fIchild\fR of a plugin widget to use it as a browser plugin. The technique is:.PP.nf.brclass MyPluginWindow : public QNPWidget {.br QWidget* child;.brpublic:.br MyPluginWindow().br {.br // Some widget that is normally used as a top-level widget.br child = new MyIndependentlyDevelopedWidget();.br.br // Use the background color of the web page.br child->setBackgroundColor( backgroundColor() );.br.br // Fill the plugin widget.br child->setGeometry( 0, 0, width(), height() );.br }.br.br void resizeEvent(QResizeEvent*).br {.br // Fill the plugin widget.br child->resize(size());.br }.br};.fi.PPThe default implementation is an empty window..PPExamples:.(lqtimage/qtimage.cpp grapher/grapher.cpp trivial/trivial.cpp.)l.SH MEMBER FUNCTION DOCUMENTATION.SH "QNPWidget::QNPWidget ()"Creates a QNPWidget..SH "QNPWidget::~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..SH "void QNPWidget::enterInstance () \fC[virtual]\fR"Called when the mouse enters the plugin window. Default does nothing..SH "QNPInstance* QNPWidget::instance ()"Returns the instance for which this widget is the window..SH "void QNPWidget::leaveInstance () \fC[virtual]\fR"Called when the mouse leaves the plugin window. Default does nothing..SH "void QNPWidget::setWindow ( bool delold )"For internal use only..SH "void QNPWidget::unsetWindow ()"For internal use only..SH "SEE ALSO".BR http://doc.trolltech.com/qnpwidget.html.SH COPYRIGHTCopyright 1992-2000 Trolltech AS, http://www.trolltech.com/. See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -