137 ITypeInfo *typeInfo = 0;
138 IDispatch *dispatch = 0;
139 that->queryInterface(IID_IDispatch, (
void**)&dispatch);
141 dispatch->GetTypeInfo(0, LOCALE_SYSTEM_DEFAULT, &typeInfo);
149 stream <<
"<h1 align=center>" << coClass <<
" Reference</h1>" <<
endl;
150 stream <<
"<p>The " << coClass <<
" COM object is a " << that->qObject()->metaObject()->className();
151 stream <<
" with the CLSID " << that->control() <<
".</p>" <<
endl;
155 const char *inter = 0;
163 stream <<
"<h3>Event Interfaces</h3>" <<
endl;
180 for (
int islot = mo->
methodOffset(); islot < slotCount; ++islot) {
191 if (returntype.isEmpty())
196 stream <<
"<li>" << returntype <<
" <a href=\"#" << name <<
"\"><b>" << name <<
"</b></a>" << prototype <<
";</li>" <<
endl;
205 detail +=
QLatin1String(
"<p>Connect a signal to this slot:<pre>\n");
212 detail +=
QLatin1String(
"<p>Or call the function directly:<pre>\n");
219 if (returntype ==
"IDispatch*" || returntype ==
"IUnknown*") {
220 functionToCall =
"querySubObject";
221 returntype =
"QAxObject *";
223 if (returntype !=
"void")
230 if (returntype !=
"void" && returntype !=
"QAxObject *" && returntype !=
"QVariant")
234 detail +=
QLatin1String(
"<p>This function has parameters of unsupported types and cannot be called directly.");
237 methodDetails << detail;
245 ITypeLib *typeLib = 0;
248 typeInfo->GetContainingTypeLib(&typeLib, &index);
256 for (
int isignal = mo->
methodOffset(); isignal < signalCount; ++isignal) {
264 stream <<
"<li>void <a href=\"#" << name <<
"\"><b>" << name <<
"</b></a>" << prototype <<
";</li>" <<
endl;
275 typeLib->GetTypeInfo(++interCount, &typeInfo);
278 detail += typeLibDocu;
284 detail +=
QLatin1String(
"<p>Connect a slot to this signal:<pre>\n");
290 methodDetails << detail;
304 dispatch->GetTypeInfo(0, LOCALE_SYSTEM_DEFAULT, &typeInfo);
308 for (
int iprop = 0; iprop < propCount; ++iprop) {
313 stream <<
"<li>" <<
type <<
" <a href=\"#" << name <<
"\"><b>" << name <<
"</b></a>;</li>" <<
endl;
326 detail +=
QLatin1String(
"<p>Read this property's value using QObject::property:<pre>\n");
334 }
else if (
type ==
"IDispatch*" ||
type ==
"IUnknown*") {
335 detail +=
QLatin1String(
"<p>Get the subobject using querySubObject:<pre>\n");
340 detail +=
QLatin1String(
"<p>This property is of an unsupported type.\n");
343 detail +=
QLatin1String(
"Set this property' value using QObject::setProperty:<pre>\n");
345 detail +=
QLatin1String(
"\tint newValue = ... // string representation of values also supported\n");
353 if (isupper(name.
at(0))) {
354 setterSlot =
"Set" +
name;
357 nameUp[0] = toupper(nameUp.
at(0));
358 setterSlot =
"set" + nameUp;
368 propDetails << detail;
375 stream <<
"<hr><h2>Member Type Documentation</h2>" <<
endl;
376 for (
int i = 0; i < enumCount; ++i) {
378 stream <<
"<h3><a name=" << enumdata.
name() <<
"></a>" << enumdata.
name() <<
"</h3>" <<
endl;
380 for (
int e = 0; e < enumdata.
keyCount(); ++e) {
386 if (methodDetails.
count()) {
387 stream <<
"<hr><h2>Member Function Documentation</h2>" <<
endl;
388 for (
int i = 0; i < methodDetails.
count(); ++i)
391 if (propDetails.
count()) {
392 stream <<
"<hr><h2>Property Documentation</h2>" <<
endl;
393 for (
int i = 0; i < propDetails.
count(); ++i)
QTextStream & endl(QTextStream &stream)
Writes ' ' to the stream and flushes the stream.
The QByteArray class provides an array of bytes.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
int count(const T &t) const
Returns the number of occurrences of value in the list.
The QString class provides a Unicode character string.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
const T & at(int i) const
Returns the item at index position i in the list.
Type
This enum type defines the types of variable that a QVariant can contain.
QByteArray left(int len) const
Returns a byte array that contains the leftmost len bytes of this byte array.
const char * constData() const
Returns a pointer to the data stored in the byte array.
static QByteArray prototype(const QList< QByteArray > ¶meterTypes, const QList< QByteArray > ¶meterNames, bool *ok)
The QTextStream class provides a convenient interface for reading and writing text.
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
static QString docuFromName(ITypeInfo *typeInfo, const QString &name)
static QByteArray namedPrototype(const QList< QByteArray > ¶meterTypes, const QList< QByteArray > ¶meterNames, int numDefArgs=0)
char at(int i) const
Returns the character at index position i in the byte array.
static Type nameToType(const char *name)
Converts the string representation of the storage type given in name, to its enum representation...
static QByteArray number(int, int base=10)
Returns a byte array containing the string equivalent of the number n to base base (10 by default)...
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
static QByteArray toType(const QByteArray &t)