Commit 06ba109c authored by Leena Miettinen's avatar Leena Miettinen
Browse files

Doc: edit qmldesigner designercore API docs



Do not use the \returns command as it does not exist.
Do not use the \arg or \param commands (use \a instead).
Do not use the \see command (use \sa instead).
Remove \brief command from function descriptions for
consistency (as it is optional).
Fix punctuation, grammar, and style issues.

Change-Id: I11173b84146cccf7fe9ba29a521cea93e03a4424
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 574539b5
......@@ -53,11 +53,8 @@ FirstDefinitionFinder::FirstDefinitionFinder(const QString &text):
}
/*!
\brief Finds the first object definition inside the object given by offset
\arg the offset of the object to search in
\return the offset of the first object definition
Finds the first object definition inside the object specified by \a offset.
Returns the offset of the first object definition.
*/
qint32 FirstDefinitionFinder::operator()(quint32 offset)
{
......
......@@ -82,11 +82,11 @@ enum {
\brief The NodeInstanceView class is the central class to create and manage
instances of the ModelNode class.
This view is used to instance the ModelNodes. Many AbstractViews hold a
NodeInstanceView to get values from tghe NodeInstances back.
For this purpose this view can be rendered offscreen.
This view is used to instantiate the model nodes. Many abstract views hold a
node instance view to get values from the node instances.
For this purpose, this view can be rendered offscreen.
\see NodeInstance ModelNode
\sa NodeInstance, ModelNode
*/
namespace QmlDesigner {
......@@ -97,8 +97,7 @@ namespace QmlDesigner {
The class will be rendered offscreen if not set otherwise.
\see ~NodeInstanceView setRenderOffScreen
\sa ~NodeInstanceView, setRenderOffScreen()
*/
NodeInstanceView::NodeInstanceView(QObject *parent, NodeInstanceServerInterface::RunModus runModus)
: AbstractView(parent),
......@@ -109,8 +108,8 @@ NodeInstanceView::NodeInstanceView(QObject *parent, NodeInstanceServerInterface:
}
/*! \brief Destructor
/*!
Destructs a node instance view object.
*/
NodeInstanceView::~NodeInstanceView()
{
......@@ -118,15 +117,7 @@ NodeInstanceView::~NodeInstanceView()
delete nodeInstanceServer();
}
/*! \name Overloaded Notifiers
* This methodes notify the view that something has happen in the model
*/
//\{
/*! \brief Notifing the view that it was attached to a model.
For every ModelNode in the model a NodeInstance will be created.
\param model Model to which the view is attached
*/
bool isSkippedRootNode(const ModelNode &node)
{
......@@ -149,6 +140,11 @@ bool isSkippedNode(const ModelNode &node)
return false;
}
/*!
Notifies the view that it was attached to \a model. For every model node in
the model, a NodeInstance will be created.
*/
void NodeInstanceView::modelAttached(Model *model)
{
AbstractView::modelAttached(model);
......@@ -223,8 +219,7 @@ void NodeInstanceView::nodeCreated(const ModelNode &createdNode)
nodeInstanceServer()->completeComponent(createComponentCompleteCommand(QList<NodeInstance>() << instance));
}
/*! \brief Notifing the view that a node was created.
\param removedNode
/*! Notifies the view that \a removedNode will be removed.
*/
void NodeInstanceView::nodeAboutToBeRemoved(const ModelNode &removedNode)
{
......@@ -358,31 +353,27 @@ void NodeInstanceView::signalHandlerPropertiesChanged(const QVector<SignalHandle
{
}
/*! \brief Notifing the view that a AbstractProperty value was changed to a ModelNode.
/*!
Notifies the view that abstract property values specified by \a propertyList
were changed for a model node.
The property will be set for the NodeInstance.
The property will be set for the node instance.
\param state ModelNode to which the Property belongs
\param property AbstractProperty which was changed
\param newValue New Value of the property
\param oldValue Old Value of the property
\see AbstractProperty NodeInstance ModelNode
\sa AbstractProperty, NodeInstance, ModelNode
*/
void NodeInstanceView::variantPropertiesChanged(const QList<VariantProperty>& propertyList, PropertyChangeFlags /*propertyChange*/)
{
nodeInstanceServer()->changePropertyValues(createChangeValueCommand(propertyList));
}
/*! \brief Notifing the view that a ModelNode has a new Parent.
Note that also the ModelNode::childNodes() list was changed. The
NodeInstance tree will be changed to reflect the ModelNode tree change.
/*!
Notifies the view that the property parent of the model node \a node has
changed from \a oldPropertyParent to \a newPropertyParent.
\param node ModelNode which parent was changed.
\param oldParent Old parent of the node.
\param newParent New parent of the node.
\note Also the \c {ModelNode::childNodes()} list was changed. The
Node instance tree will be changed to reflect the model node tree change.
\see NodeInstance ModelNode
\sa NodeInstance, ModelNode
*/
void NodeInstanceView::nodeReparented(const ModelNode &node, const NodeAbstractProperty &newPropertyParent, const NodeAbstractProperty &oldPropertyParent, AbstractView::PropertyChangeFlags /*propertyChange*/)
......@@ -431,14 +422,13 @@ void NodeInstanceView::nodeOrderChanged(const NodeListProperty & listProperty,
nodeInstanceServer()->reparentInstances(ReparentInstancesCommand(containerList));
}
/*! \brief Notifing the view that the selection has been changed.
/*!
Notifies the view that the list of selected model nodes has changed to
\a selectedNodeList from \a lastSelectedNodeList.
Do nothing.
\param selectedNodeList List of ModelNode which has been selected
\param lastSelectedNodeList List of ModelNode which was selected
\see ModelNode NodeInstance
\sa ModelNode, NodeInstance
*/
void NodeInstanceView::selectedNodesChanged(const QList<ModelNode> &/*selectedNodeList*/,
const QList<ModelNode> &/*lastSelectedNodeList*/)
......@@ -558,9 +548,10 @@ void NodeInstanceView::removeAllInstanceNodeRelationships()
m_nodeInstanceHash.clear();
}
/*! \brief Returns a List of all NodeInstances
/*!
Returns a list of all node instances.
\see NodeInstance
\sa NodeInstance
*/
QList<NodeInstance> NodeInstanceView::instances() const
......@@ -568,13 +559,13 @@ QList<NodeInstance> NodeInstanceView::instances() const
return m_nodeInstanceHash.values();
}
/*! \brief Returns the NodeInstance for this ModelNode
/*!
Returns the node instance for \a node, which must be valid.
Returns a invalid NodeInstance if no NodeInstance for this ModelNode exists.
Returns an invalid node instance if no node instance for this model node
exists.
\param node ModelNode must be valid.
\returns NodeStance for ModelNode.
\see NodeInstance
\sa NodeInstance
*/
NodeInstance NodeInstanceView::instanceForNode(const ModelNode &node) const
{
......@@ -606,20 +597,20 @@ bool NodeInstanceView::hasInstanceForId(qint32 id)
}
/*! \brief Returns the root NodeInstance of this view.
/*!
Returns the root node instance of this view.
\returns Root NodeIntance for this view.
\see NodeInstance
\sa NodeInstance
*/
NodeInstance NodeInstanceView::rootNodeInstance() const
{
return m_rootNodeInstance;
}
/*! \brief Returns the view NodeInstance of this view.
/*!
Returns the \a instance of this view.
This can be the root NodeInstance if it is specified in the qml file.
This can be the root node instance if it is specified in the QML file.
\code
QGraphicsView {
QGraphicsScene {
......@@ -628,19 +619,18 @@ NodeInstance NodeInstanceView::rootNodeInstance() const
}
\endcode
If there is node view in the qml file:
If there is node view in the QML file:
\code
Item {}
\endcode
Than there will be a new NodeInstance for this QGraphicsView
generated which is not the root instance of this NodeInstanceView.
Then a new node instance for this QGraphicsView is
generated which is not the root instance of this node instance view.
This is the way to get this QGraphicsView NodeInstance.
This is the way to get this QGraphicsView node instance.
\returns Root NodeIntance for this view.
\see NodeInstance
\sa NodeInstance
*/
......
......@@ -141,7 +141,7 @@ properties.
*/
/*!
\brief Constructs a copy of the given meta info.
Constructs a copy of \a metaInfo.
*/
MetaInfo::MetaInfo(const MetaInfo &metaInfo) :
m_p(metaInfo.m_p)
......@@ -149,12 +149,12 @@ MetaInfo::MetaInfo(const MetaInfo &metaInfo) :
}
/*!
\brief Creates a meta information object with just the qml types registered statically.
You almost always want to use Model::metaInfo() instead!
Creates a meta information object with just the QML types registered statically.
You almost always want to use Model::metaInfo() instead.
You almost certainly want to access the meta information for the model.
\see Model::metaInfo()
\sa Model::metaInfo()
*/
MetaInfo::MetaInfo() :
m_p(new MetaInfoPrivate(this))
......@@ -166,7 +166,8 @@ MetaInfo::~MetaInfo()
}
/*!
\brief Assigns other to this meta information and returns a reference to this meta information.
Assigns \a other to this meta information and returns a reference to this
meta information.
*/
MetaInfo& MetaInfo::operator=(const MetaInfo &other)
{
......@@ -180,11 +181,11 @@ ItemLibraryInfo *MetaInfo::itemLibraryInfo() const
}
/*!
\brief Access to the global meta information object.
Accesses the global meta information object.
You almost always want to use Model::metaInfo() instead.
Internally all meta information objects share this "global" object
where static qml type information is stored.
Internally, all meta information objects share this \e global object
where static QML type information is stored.
*/
MetaInfo MetaInfo::global()
{
......@@ -196,7 +197,7 @@ MetaInfo MetaInfo::global()
}
/*!
\brief Clears the global meta information object.
Clears the global meta information object.
This method should be called once on application shutdown to free static data structures.
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment