📄 qaxbindable.3qt
字号:
'\" t.TH QAxBindable 3qt "2 September 2005" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS. All rights reserved. See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQAxBindable \- Interface between a QWidget and an ActiveX client.SH SYNOPSISThis class is part of the \fBQt ActiveQt Extension\fR..PP\fC#include <qaxbindable.h>\fR.PP.SS "Public Members".in +1c.ti -1c.BI "\fBQAxBindable\fR ()".br.ti -1c.BI "virtual \fB~QAxBindable\fR ()".br.ti -1c.BI "virtual QAxAggregated * \fBcreateAggregate\fR ()".br.in -1c.SS "Static Public Members".in +1c.ti -1c.BI "void \fBreportError\fR ( int code, const QString & src, const QString & desc, const QString & context = QString::null )".br.in -1c.SS "Protected Members".in +1c.ti -1c.BI "bool \fBrequestPropertyChange\fR ( const char * property )".br.ti -1c.BI "void \fBpropertyChanged\fR ( const char * property )".br.ti -1c.BI "IUnknown * \fBclientSite\fR () const".br.in -1c.SH DESCRIPTIONThis class is defined in the \fBQt ActiveQt Extension\fR, which can be found in the \fCqt/extensions\fR directory. It is not included in the main Qt API..PPThe QAxBindable class provides an interface between a QWidget and an ActiveX client..PPThe functions provided by this class allow an ActiveX control to communicate property changes to a client application. Inherit your control class from both QWidget (directly or indirectly) and this class to get access to this class's functions. The meta object compiler requires you to inherit from QWidget \fIfirst\fR..PP.nf.br class MyActiveX : public QWidget, public QAxBindable.br {.br Q_OBJECT.br Q_PROPERTY( int value READ value WRITE setValue ).br public:.br MyActiveX( QWidget *parent = 0, const char *name = 0 );.br ....br.br int value() const;.br void setValue( int );.br };.br.fi.PPWhen implementing the property write function, use requestPropertyChange() to get permission from the ActiveX client application to change this property. When the property changes, call propertyChanged() to notify the ActiveX client application about the change. If a fatal error occurs in the control, use the static reportError() function to notify the client..PPUse the interface returned by clientSite() to call the ActiveX client. To implement additional COM interfaces in your ActiveX control, reimplement createAggregate() to return a new object of a QAxAggregated subclass..SH MEMBER FUNCTION DOCUMENTATION.SH "QAxBindable::QAxBindable ()"Constructs an empty QAxBindable object..SH "QAxBindable::~QAxBindable ()\fC [virtual]\fR"Destroys the QAxBindable object..SH "IUnknown * QAxBindable::clientSite () const\fC [protected]\fR"Returns a pointer to the client site interface for this ActiveX object, or null if no client site has been set..PPCall QueryInterface() on the returned interface to get the interface you want to call..SH "QAxAggregated * QAxBindable::createAggregate ()\fC [virtual]\fR"Reimplement this function when you want to implement additional COM interfaces in the ActiveX control, or when you want to provide alternative implementations of COM interfaces. Return a new object of a QAxAggregated subclass..PPThe default implementation returns the null pointer..SH "void QAxBindable::propertyChanged ( const char * property )\fC [protected]\fR"Call this function to notify the client that is hosting this ActiveX control that the property \fIproperty\fR has been changed..PPThis function is usually called at the end of the property's write function..PPSee also requestPropertyChange()..SH "void QAxBindable::reportError ( int code, const QString & src, const QString & desc, const QString & context = QString::null )\fC [static]\fR"Reports an error to the client application. \fIcode\fR is a control-defined error code. \fIdesc\fR is a human-readable description of the error intended for the application user. \fIsrc\fR is the name of the source for the error, typically the ActiveX server name. \fIcontext\fR can be the location of a help file with more information about the error. If \fIcontext\fR ends with a number in brackets, e.g. [12], this number will be interpreted as the context ID in the help file..SH "bool QAxBindable::requestPropertyChange ( const char * property )\fC [protected]\fR"Call this function to request permission to change the property \fIproperty\fR from the client that is hosting this ActiveX control. Returns TRUE if the client allows the change; otherwise returns FALSE..PPThis function is usually called first in the write function for \fIproperty\fR, and writing is abandoned if the function returns FALSE..PP.nf.br void MyActiveQt::setText( const QString &text ).br {.br if ( !requestPropertyChange( "text" ) ).br return;.br.br // update property.br.br propertyChanged( "text" );.br }.br.fi.PPSee also propertyChanged()..SH "SEE ALSO".BR http://doc.trolltech.com/qaxbindable.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com. See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qaxbindable.3qt) and the Qtversion (3.3.5).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -