--- a/tools/qdoc3/node.h Tue Jan 26 12:42:25 2010 +0200
+++ b/tools/qdoc3/node.h Tue Feb 02 00:43:10 2010 +0200
@@ -89,6 +89,7 @@
Example,
HeaderFile,
File,
+ Image,
Group,
Module,
Page,
@@ -151,6 +152,7 @@
virtual bool isInnerNode() const = 0;
virtual bool isReimp() const { return false; }
+ virtual bool isFunction() const { return false; }
Type type() const { return typ; }
virtual SubType subType() const { return NoSubType; }
InnerNode *parent() const { return par; }
@@ -239,6 +241,9 @@
NodeList overloads(const QString &funcName) const;
const QStringList& includes() const { return inc; }
+ QStringList primaryKeys();
+ QStringList secondaryKeys();
+
protected:
InnerNode(Type type, InnerNode *parent, const QString& name);
@@ -362,6 +367,8 @@
const ClassNode* classNode() const { return cnode; }
virtual QString fileBase() const;
+ static bool qmlOnly;
+
private:
const ClassNode* cnode;
};
@@ -374,7 +381,7 @@
bool attached);
virtual ~QmlPropGroupNode() { }
- const QString& element() const { return name(); }
+ const QString& element() const { return parent()->name(); }
void setDefault() { isdefault = true; }
bool isDefault() const { return isdefault; }
bool isAttached() const { return att; }
@@ -396,14 +403,16 @@
void setDataType(const QString& dataType) { dt = dataType; }
void setStored(bool stored) { sto = toTrool(stored); }
void setDesignable(bool designable) { des = toTrool(designable); }
+ void setWritable(bool writable) { wri = toTrool(writable); }
const QString &dataType() const { return dt; }
QString qualifiedDataType() const { return dt; }
bool isStored() const { return fromTrool(sto,true); }
bool isDesignable() const { return fromTrool(des,false); }
+ bool isWritable() const { return fromTrool(wri,true); }
bool isAttached() const { return att; }
- const QString& element() const { return parent()->name(); }
+ const QString& element() const { return static_cast<QmlPropGroupNode*>(parent())->element(); }
private:
enum Trool { Trool_True, Trool_False, Trool_Default };
@@ -414,26 +423,9 @@
QString dt;
Trool sto;
Trool des;
+ Trool wri;
bool att;
};
-
-class QmlSignalNode : public LeafNode
-{
- public:
- QmlSignalNode(QmlClassNode* parent, const QString& name);
- virtual ~QmlSignalNode() { }
-
- const QString& element() const { return parent()->name(); }
-};
-
-class QmlMethodNode : public LeafNode
-{
- public:
- QmlMethodNode(QmlClassNode* parent, const QString& name);
- virtual ~QmlMethodNode() { }
-
- const QString& element() const { return parent()->name(); }
-};
#endif
class EnumItem
@@ -547,6 +539,7 @@
enum Virtualness { NonVirtual, ImpureVirtual, PureVirtual };
FunctionNode(InnerNode *parent, const QString &name);
+ FunctionNode(Type type, InnerNode *parent, const QString &name, bool attached);
virtual ~FunctionNode() { }
void setReturnType(const QString& returnType) { rt = returnType; }
@@ -572,6 +565,7 @@
bool isStatic() const { return sta; }
bool isOverload() const { return ove; }
bool isReimp() const { return reimp; }
+ bool isFunction() const { return true; }
int overloadNumber() const;
int numOverloads() const;
const QList<Parameter>& parameters() const { return params; }
@@ -583,6 +577,10 @@
QStringList reconstructParams(bool values = false) const;
QString signature(bool values = false) const;
+ const QString& element() const { return parent()->name(); }
+ bool isAttached() const { return att; }
+
+ void debug() const;
private:
void setAssociatedProperty(PropertyNode *property);
@@ -603,6 +601,7 @@
bool sta : 1;
bool ove : 1;
bool reimp: 1;
+ bool att: 1;
QList<Parameter> params;
const FunctionNode *rf;
const PropertyNode *ap;
@@ -623,6 +622,7 @@
void addSignal(FunctionNode *function, FunctionRole role);
void setStored(bool stored) { sto = toTrool(stored); }
void setDesignable(bool designable) { des = toTrool(designable); }
+ void setWritable(bool writable) { wri = toTrool(writable); }
void setOverriddenFrom(const PropertyNode *baseProperty);
const QString &dataType() const { return dt; }
@@ -635,6 +635,7 @@
NodeList notifiers() const { return functions(Notifier); }
bool isStored() const { return fromTrool(sto, storedDefault()); }
bool isDesignable() const { return fromTrool(des, designableDefault()); }
+ bool isWritable() const { return fromTrool(wri, writableDefault()); }
const PropertyNode *overriddenFrom() const { return overrides; }
private:
@@ -645,11 +646,13 @@
bool storedDefault() const { return true; }
bool designableDefault() const { return !setters().isEmpty(); }
+ bool writableDefault() const { return !setters().isEmpty(); }
QString dt;
NodeList funcs[NumFunctionRoles];
Trool sto;
Trool des;
+ Trool wri;
const PropertyNode *overrides;
};