Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

Node Class

The Node class is a node in the Tree. More...

 #include <Node>

Inherited by: InnerNode and LeafNode.

Public Types

enum Access { Public, Protected, Private }
enum FlagValue { FlagValueDefault, FlagValueFalse, FlagValueTrue }
enum LinkType { StartLink, NextLink, PreviousLink, ContentsLink, IndexLink, InheritsLink }
enum PageType { NoPageType, ApiPage, ArticlePage, ExamplePage, ..., OnBeyondZebra }
enum Status { Compat, Obsolete, Deprecated, Preliminary, ..., Internal }
enum SubType { NoSubType, Example, HeaderFile, File, ..., LastSubtype }
enum ThreadSafeness { UnspecifiedSafeness, NonReentrant, Reentrant, ThreadSafe }
enum Type { Namespace, Class, Fake, Enum, ..., LastType }

Public Functions

virtual ~Node()
Access access() const
QString accessString() const
virtual void addGroupMember(Node *)
virtual void addPageKeywords(const QString &)
virtual void addQmlModuleMember(Node *)
virtual const Node * applyModuleIdentifier(const Node *) const
virtual ClassNode * classNode()
virtual void clearCurrentChild()
void clearRelated()
ClassNode * declarativeCppNode()
QString ditaXmlHref()
const Doc & doc() const
QString extractClassName(const QString & string) const
virtual QString fileBase() const
QString fullDocumentName() const
QString guid() const
virtual bool hasProperty(const QString &) const
QString idForNode() const
virtual QString idNumber()
virtual const ImportList * importList() const
Status inheritedStatus() const
ThreadSafeness inheritedThreadSafeness() const
virtual bool isAbstract() const
virtual bool isAttached() const
virtual bool isCollisionNode() const
virtual bool isFunction() const
bool isIndexNode() const
virtual bool isInnerNode() const = 0
bool isInternal() const
virtual bool isLeaf() const
virtual bool isQmlNode() const
virtual bool isQmlPropertyGroup() const
virtual bool isQtQuickNode() const
virtual bool isReimp() const
QMap<LinkType, QPair<QString, QString> > links() const
const Location & location() const
QString moduleName() const
const QString & name() const
virtual QString nameForLists() const
QString nodeSubtypeString() const
QString nodeTypeString() const
virtual QString outputFileName() const
const QString & outputSubdirectory() const
PageType pageType() const
QString pageTypeString() const
InnerNode * parent() const
QmlClassNode * qmlClassNode()
virtual QString qmlModuleIdentifier() const
virtual QString qmlModuleName() const
virtual QString qmlModuleVersion() const
virtual QString qmlTypeName() const
InnerNode * relates() const
virtual void setAbstract(bool)
void setAccess(Access access)
void setDoc(const Doc & doc, bool replace = false)
virtual void setImportList(const ImportList &)
void setIndexNodeFlag()
void setLink(LinkType linkType, const QString & link, const QString & desc)
void setLocation(const Location & location)
void setModuleName(const QString & module)
virtual void setOutputFileName(const QString &)
void setPageType(PageType t)
void setPageType(const QString & t)
void setParent(InnerNode * n)
virtual bool setQmlModule(const ArgLocPair & arg)
void setRelates(InnerNode * pseudoParent)
void setSince(const QString & since)
void setStatus(Status status)
void setTemplateStuff(const QString & templateStuff)
void setThreadSafeness(ThreadSafeness safeness)
void setUrl(const QString & url)
QString since() const
Status status() const
virtual SubType subType() const
QString templateStuff() const
ThreadSafeness threadSafeness() const
virtual QString title() const
Type type() const
QString url() const

Static Public Members

QString cleanId(QString str)
void clearPropertyGroupCount()
bool fromFlagValue(FlagValue fv, bool defaultValue)
int incPropertyGroupCount()
QString nodeSubtypeString(unsigned t)
QString nodeTypeString(unsigned t)
QString pageTypeString(unsigned t)
FlagValue toFlagValue(bool b)

Protected Functions

Node(Type type, InnerNode * parent, const QString & name)

Detailed Description

The Node class is a node in the Tree.

A Node represents a class or function or something else from the source code..

Member Type Documentation

enum Node::Access

enum Node::FlagValue

enum Node::LinkType

enum Node::PageType

enum Node::Status

enum Node::SubType

enum Node::ThreadSafeness

enum Node::Type

Member Function Documentation

Node::Node(Type type, InnerNode * parent, const QString & name) [protected]

Construct a node with the given type and having the given parent and name. The new node is added to the parent's child list.

Node::~Node() [virtual]

When this Node is destroyed, if it has a parent Node, it removes itself from the parent node's child list.

Access Node::access() const

See also setAccess().

QString Node::accessString() const

Returns a string representing the access specifier.

void Node::addGroupMember(Node *) [virtual]

void Node::addPageKeywords(const QString &) [virtual]

void Node::addQmlModuleMember(Node *) [virtual]

const Node * Node::applyModuleIdentifier(const Node *) const [virtual]

ClassNode * Node::classNode() [virtual]

QString Node::cleanId(QString str) [static]

Returns the str as an NCName, which means the name can be used as the value of an id attribute. Search for NCName on the internet for details of what can be an NCName.

void Node::clearCurrentChild() [virtual]

void Node::clearPropertyGroupCount() [static]

Reset the number of property groups seen in the current file to 0, because we are starting a new file.

void Node::clearRelated()

ClassNode * Node::declarativeCppNode()

If this node is a QML node, find its QML class node, and return a pointer to the C++ class node from the QML class node. That pointer will be null if the QML class node is a component. It will be non-null if the QML class node is a QML element.

QString Node::ditaXmlHref()

Composes a string to be used as an href attribute in DITA XML. It is composed of the file name and the UUID separated by a '#'. If this node is a class node, the file name is taken from this node; if this node is a function node, the file name is taken from the parent node of this node.

const Doc & Node::doc() const

See also setDoc().

QString Node::extractClassName(const QString & string) const

Extract a class name from the type string and return it.

QString Node::fileBase() const [virtual]

Returns the sanitized file name without the path. If the the file is an html file, the html suffix is removed. Why?

bool Node::fromFlagValue(FlagValue fv, bool defaultValue) [static]

Converts the enum fv back to a boolean value. If fv is neither the true enum value nor the false enum value, the boolean value returned is defaultValue.

Note that runtimeDesignabilityFunction() should be called first. If that function returns the name of a function, it means the function must be called at runtime to determine whether the property is Designable.

QString Node::fullDocumentName() const

Construct the full document name for this node and return it.

QString Node::guid() const

Returns this node's Universally Unique IDentifier as a QString. Creates the UUID first, if it has not been created.

bool Node::hasProperty(const QString &) const [virtual]

QString Node::idForNode() const

Creates a string that can be used as a UUID for the node, depending on the type and subtype of the node. Uniquenss is not guaranteed, but it is expected that strings created here will be unique within an XML document. Hence, the returned string can be used as the value of an id attribute.

QString Node::idNumber() [virtual]

const ImportList * Node::importList() const [virtual]

See also setImportList().

int Node::incPropertyGroupCount() [static]

Increment the number of property groups seen in the current file, and return the new value.

Status Node::inheritedStatus() const

Returns the inheritance status.

ThreadSafeness Node::inheritedThreadSafeness() const

If this node has a parent, the parent's thread safeness value is returned. Otherwise, this node's thread safeness value is returned. Why?

bool Node::isAbstract() const [virtual]

bool Node::isAttached() const [virtual]

bool Node::isCollisionNode() const [virtual]

bool Node::isFunction() const [virtual]

bool Node::isIndexNode() const

bool Node::isInnerNode() const [pure virtual]

bool Node::isInternal() const

Returns true if the node's status is Internal, or if its parent is a class with internal status.

bool Node::isLeaf() const [virtual]

bool Node::isQmlNode() const [virtual]

bool Node::isQmlPropertyGroup() const [virtual]

bool Node::isQtQuickNode() const [virtual]

bool Node::isReimp() const [virtual]

QMap<LinkType, QPair<QString, QString> > Node::links() const

const Location & Node::location() const

See also setLocation().

QString Node::moduleName() const

Find the module (QtCore, QtGui, etc.) to which the class belongs. We do this by obtaining the full path to the header file's location and examine everything between "src/" and the filename. This is semi-dirty because we are assuming a particular directory structure.

This function is only really useful if the class's module has not been defined in the header file with a QT_MODULE macro or with an

See also setModuleName().

const QString & Node::name() const

QString Node::nameForLists() const [virtual]

QString Node::nodeSubtypeString() const

Returns this node's subtype as a string for use as an attribute value in XML or HTML. This is only useful in the case where the node type is Fake.

QString Node::nodeSubtypeString(unsigned t) [static]

Returns the node subtype t as a string for use as an attribute value in XML or HTML. This is only useful in the case where the node type is Fake.

QString Node::nodeTypeString() const

Returns this node's type as a string for use as an attribute value in XML or HTML.

QString Node::nodeTypeString(unsigned t) [static]

Returns the node type t as a string for use as an attribute value in XML or HTML.

QString Node::outputFileName() const [virtual]

See also setOutputFileName().

const QString & Node::outputSubdirectory() const

PageType Node::pageType() const

See also setPageType().

QString Node::pageTypeString() const

Returns this node's page type as a string, for use as an attribute value in XML or HTML.

QString Node::pageTypeString(unsigned t) [static]

Returns the page type t as a string, for use as an attribute value in XML or HTML.

InnerNode * Node::parent() const

See also setParent().

QmlClassNode * Node::qmlClassNode()

If this node is a QML class node, return a pointer to it. If it is a child of a QML class node, return a pointer to the QML class node. Otherwise, return 0;

QString Node::qmlModuleIdentifier() const [virtual]

QString Node::qmlModuleName() const [virtual]

QString Node::qmlModuleVersion() const [virtual]

QString Node::qmlTypeName() const [virtual]

InnerNode * Node::relates() const

See also setRelates().

void Node::setAbstract(bool) [virtual]

See also isAbstract().

void Node::setAccess(Access access)

See also access().

void Node::setDoc(const Doc & doc, bool replace = false)

Sets this Node's Doc to doc. If replace is false and this Node already has a Doc, a warning is reported that the Doc is being overridden, and it reports where the previous Doc was found. If replace is true, the Doc is replaced silently.

See also doc().

void Node::setImportList(const ImportList &) [virtual]

See also importList().

void Node::setIndexNodeFlag()

void Node::setLink(LinkType linkType, const QString & link, const QString & desc)

This function creates a pair that describes a link. The pair is composed from link and desc. The linkType is the map index the pair is filed under.

void Node::setLocation(const Location & location)

See also location().

void Node::setModuleName(const QString & module)

See also moduleName().

void Node::setOutputFileName(const QString &) [virtual]

See also outputFileName().

void Node::setPageType(PageType t)

See also pageType().

void Node::setPageType(const QString & t)

Set the page type according to the string t.

void Node::setParent(InnerNode * n)

See also parent().

bool Node::setQmlModule(const ArgLocPair & arg) [virtual]

This function splits arg on the blank character to get a QML module name and version number. It then spilts the version number on the '.' character to get a major version number and a minor vrsion number. Both version numbers must be present. It stores these components separately. If all three are found, true is returned. If any of the three is not found or is not correct, false is returned.

void Node::setRelates(InnerNode * pseudoParent)

Sets the pointer to the node that this node relates to.

See also relates().

void Node::setSince(const QString & since)

Sets the information about the project and version a node was introduced in. The string is simplified, removing excess whitespace before being stored.

See also since().

void Node::setStatus(Status status)

See also status().

void Node::setTemplateStuff(const QString & templateStuff)

See also templateStuff().

void Node::setThreadSafeness(ThreadSafeness safeness)

See also threadSafeness().

void Node::setUrl(const QString & url)

Sets the node's URL to url

See also url().

QString Node::since() const

See also setSince().

Status Node::status() const

See also setStatus().

SubType Node::subType() const [virtual]

QString Node::templateStuff() const

See also setTemplateStuff().

ThreadSafeness Node::threadSafeness() const

Returns the thread safeness value for whatever this node represents. But if this node has a parent and the thread safeness value of the parent is the same as the thread safeness value of this node, what is returned is the value UnspecifiedSafeness. Why?

See also setThreadSafeness().

QString Node::title() const [virtual]

FlagValue Node::toFlagValue(bool b) [static]

Converts the boolean value b to an enum representation of the boolean type, which includes an enum value for the default value of the item, i.e. true, false, or default.

Type Node::type() const

QString Node::url() const

Returns the node's URL.

See also setUrl().

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web