⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qaxfactory.3qt

📁 这个是Linux的qt源代码
💻 3QT
字号:
'\" t.TH QAxFactory 3qt "10 November 2003" "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 NAMEQAxFactory \- Defines a factory for the creation of ActiveX components.SH SYNOPSISThis class is part of the \fBQt ActiveQt Extension\fR..PP\fC#include <qaxfactory.h>\fR.PP.SS "Public Members".in +1c.ti -1c.BI "\fBQAxFactory\fR ( const QUuid & libid, const QUuid & appid )".br.ti -1c.BI "virtual \fB~QAxFactory\fR ()".br.ti -1c.BI "virtual QStringList \fBfeatureList\fR () const = 0".br.ti -1c.BI "virtual QWidget * \fBcreate\fR ( const QString & key, QWidget * parent = 0, const char * name = 0 ) = 0".br.ti -1c.BI "virtual QUuid \fBclassID\fR ( const QString & key ) const = 0".br.ti -1c.BI "virtual QUuid \fBinterfaceID\fR ( const QString & key ) const = 0".br.ti -1c.BI "virtual QUuid \fBeventsID\fR ( const QString & key ) const = 0".br.ti -1c.BI "QUuid \fBtypeLibID\fR () const".br.ti -1c.BI "QUuid \fBappID\fR () const".br.ti -1c.BI "void \fBregisterClass\fR ( const QString & key, QSettings * settings ) const".br.ti -1c.BI "void \fBunregisterClass\fR ( const QString & key, QSettings * settings ) const".br.ti -1c.BI "QString \fBexposeToSuperClass\fR ( const QString & key ) const".br.ti -1c.BI "bool \fBstayTopLevel\fR ( const QString & key ) const".br.ti -1c.BI "bool \fBhasStockEvents\fR ( const QString & key ) const".br.ti -1c.BI "bool \fBisService\fR () const".br.in -1c.SS "Static Public Members".in +1c.ti -1c.BI "bool \fBisServer\fR ()".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 QAxFactory class defines a factory for the creation of ActiveX components..PP.PPImplement this factory once in your ActiveX server to provide information about the components the server can create. If your server supports just a single ActiveX control, you can use the default factory implementation instead of implementing the factory yourself. Use the QAXFACTORY_DEFAULT macro in any implementation file (e.g. main.cpp) to instantiate and export the default factory:.PP.nf.br    #include <qapplication.h>.br    #include <qaxfactory.h>.br.br    #include "theactivex.h".br.br    QAXFACTORY_DEFAULT(.br        TheActiveX,                               // widget class.br        "{01234567-89AB-CDEF-0123-456789ABCDEF}", // class ID.br        "{01234567-89AB-CDEF-0123-456789ABCDEF}", // interface ID.br        "{01234567-89AB-CDEF-0123-456789ABCDEF}", // event interface ID.br        "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID.br        "{01234567-89AB-CDEF-0123-456789ABCDEF}"  // application ID.br        ).br.fi.PPIf you implement your own factory reimplement the pure virtual functions to provide the unique identifiers for the ActiveX controls, and use the QAXFACTORY_EXPORT macro to instantiate and export it:.PP.nf.br    QStringList ActiveQtFactory::featureList() const.br    {.br        QStringList list;.br        list << "ActiveX1";.br        list << "ActiveX2";.br        ....br        return list;.br    }.br.br    QWidget *ActiveQtFactory::create( const QString &key, QWidget *parent, const char *name ).br    {.br        if ( key == "ActiveX1" ).br            return new ActiveX1( parent, name );.br        if ( key == "ActiveX2" ).br            return new ActiveX2( parent, name );.br        ....br        return 0;.br    }.br.br    QUuid ActiveQtFactory::classID( const QString &key ) const.br    {.br        if ( key == "ActiveX1" ).br            return "{01234567-89AB-CDEF-0123-456789ABCDEF}";.br        ....br        return QUuid();.br    }.br.br    QUuid ActiveQtFactory::interfaceID( const QString &key ) const.br    {.br        if ( key == "ActiveX1" ).br            return "{01234567-89AB-CDEF-0123-456789ABCDEF}";.br        ....br        return QUuid();.br    }.br.br    QUuid ActiveQtFactory::eventsID( const QString &key ) const.br    {.br        if ( key == "ActiveX1" ).br            return "{01234567-89AB-CDEF-0123-456789ABCDEF}";.br        ....br        return QUuid();.br    }.br.br    QAXFACTORY_EXPORT(.br        MyFactory,                                // factory class.br        "{01234567-89AB-CDEF-0123-456789ABCDEF}", // type library ID.br        "{01234567-89AB-CDEF-0123-456789ABCDEF}"  // application ID.br        ).br.fi.PPOnly one QAxFactory implementation may be instantiated and exported by an ActiveX server application..PPA factory can also reimplement the registerClass() and unregisterClass() functions to set additional flags for an ActiveX control in the registry. To limit the number of methods or properties a widget class exposes from its parent classes reimplement exposeToSuperClass()..SH MEMBER FUNCTION DOCUMENTATION.SH "QAxFactory::QAxFactory ( const QUuid & libid, const QUuid & appid )"Constructs a QAxFactory object that returns \fIlibid\fR and \fIappid\fR in the implementation of the respective interface functions..SH "QAxFactory::~QAxFactory ()\fC [virtual]\fR"Destroys the QAxFactory object..SH "QUuid QAxFactory::appID () const"Reimplement this function to return the ActiveX server's application identifier..SH "QUuid QAxFactory::classID ( const QString & key ) const\fC [pure virtual]\fR"Reimplement this function to return the class identifier for each \fIkey\fR returned by the featureList() implementation, or an empty QUuid if this factory doesn't support the value of \fIkey\fR..SH "QWidget * QAxFactory::create ( const QString & key, QWidget * parent = 0, const char * name = 0 )\fC [pure virtual]\fR"Reimplement this function to return a new widget for each \fIkey\fR returned by the featureList() implementation. Propagate \fIparent\fR and \fIname\fR to the QWidget constructor. Return 0 if this factory doesn't support the value of \fIkey\fR..SH "QUuid QAxFactory::eventsID ( const QString & key ) const\fC [pure virtual]\fR"Reimplement this function to return the identifier of the event interface for each \fIkey\fR returned by the featureList() implementation, or an empty QUuid if this factory doesn't support the value of \fIkey\fR..SH "QString QAxFactory::exposeToSuperClass ( const QString & key ) const"Reimplement this function to return the name of the super class of \fIkey\fR up to which methods and properties should be exposed by the ActiveX control..PPThe default implementation returns "QWidget" which means that all the functions and properties of all the super classes including QWidget will be exposed..PPTo only expose the functions and properties of the class itself, reimplement this function to return \fIkey\fR..SH "QStringList QAxFactory::featureList () const\fC [pure virtual]\fR"Reimplement this function to return a list of the widgets (class names) supported by this factory..SH "bool QAxFactory::hasStockEvents ( const QString & key ) const"Reimplement this function to return TRUE if the ActiveX control \fIkey\fR should support the standard ActiveX events.TPClick.TPDblClick.TPKeyDown.TPKeyPress.TPKeyUp.TPMouseDown.TPMouseUp.TPMouseMove.PPThe default implementation returns FALSE..SH "QUuid QAxFactory::interfaceID ( const QString & key ) const\fC [pure virtual]\fR"Reimplement this function to return the interface identifier for each \fIkey\fR returned by the featureList() implementation, or an empty QUuid if this factory doesn't support the value of \fIkey\fR..SH "bool QAxFactory::isServer ()\fC [static]\fR"Returns TRUE if the application has been started (by COM) as an ActiveX server, otherwise returns FALSE..PP.nf.br    int main( int argc, char**argv ).br    {.br        QApplication app( argc, argv );.br.br        if ( !QAxFactory::isServer() ) {.br            // initialize for stand-alone execution.br        }.br.br        return app.exec() // standard event processing.br    }.br.br.fi.SH "bool QAxFactory::isService () const"Reimplement this function to return TRUE if the server is running as a persistent service (e.g. an NT service) and should not terminate even when all objects provided have been released..PPThe default implementation returns FALSE..SH "void QAxFactory::registerClass ( const QString & key, QSettings * settings ) const"Registers additional values for the class \fIkey\fR in the system registry using the \fIsettings\fR object. The standard values have already been registed by the framework, but additional values, e.g. implemented categories, can be added in an implementation of this function..PP.nf.br    settings->writeEntry( "/CLSID/" + classID(key) + "/Implemented Categories/{00000000-0000-0000-000000000000}/.", QString::null );.br.fi.PPIf you reimplement this function you must also reimplement unregisterClass() to remove the additional registry values..PPSee also QSettings..SH "bool QAxFactory::stayTopLevel ( const QString & key ) const"Reimplement this function to return TRUE if the ActiveX control \fIkey\fR should be a top level window, e.g. a dialog. The default implementation returns FALSE..SH "QUuid QAxFactory::typeLibID () const"Reimplement this function to return the ActiveX server's type library identifier..SH "void QAxFactory::unregisterClass ( const QString & key, QSettings * settings ) const"Unregisters any additional values for the class \fIkey\fR from the system registry using the \fIsettings\fR object..PP.nf.br    settings->removeEntry( "/CLSID/" + classID(key) + "/Implemented Categories/{00000000-0000-0000-000000000000}/." );.br.fi.PPSee also registerClass() and QSettings..SH "SEE ALSO".BR http://doc.trolltech.com/qaxfactory.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 (qaxfactory.3qt) and the Qtversion (3.2.3).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -