Doc: move Class View plugin docs to .cpp files.

QDoc does not find docs in the .h files.
Use \brief only for namespaces, classes, enums, and properties.
Use standard wording for \brief and \fn.
Use \a and \c according to guidelines.

Fix grammar and style.

Change-Id: Ib685a03c97ef38661ecc156f61d70085514357fc
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Leena Miettinen
2013-05-24 17:35:14 +02:00
committed by Erik Verbruggen
parent 5b268822cf
commit 3f843aca67
20 changed files with 610 additions and 492 deletions

View File

@@ -49,8 +49,10 @@ namespace Internal {
///////////////////////////////// NavigationWidgetPrivate //////////////////////////////////
/*!
\struct NavigationWidgetPrivate
\brief Internal data structures / methods for NavigationWidget
\class NavigationWidgetPrivate
The NavigationWidgetPrivate class provides internal data structures and
methods for NavigationWidget.
*/
class NavigationWidgetPrivate
@@ -70,6 +72,47 @@ public:
///////////////////////////////// NavigationWidget //////////////////////////////////
/*!
\class NavigationWidget
The NavigationWidget class is a widget for the class view tree.
*/
/*!
\fn void NavigationWidget::visibilityChanged(bool visibility)
Emits a signal when the widget visibility is changed. \a visibility returns
true if plugin becames visible, otherwise it returns false.
*/
/*!
\fn void NavigationWidget::requestGotoLocation(const QString &name,
int line,
int column)
Emits a signal that requests to open the file with \a name at \a line
and \a column.
\sa Manager::gotoLocation
*/
/*!
\fn void NavigationWidget::requestGotoLocations(const QList<QVariant> &locations)
Emits a signal to request to go to any of the Symbol \a locations in the
list.
\sa Manager::gotoLocations
*/
/*!
\fn void NavigationWidget::requestTreeDataUpdate()
Emits a signal that the widget wants to receive the latest tree info.
\sa Manager::onRequestTreeDataUpdate
*/
NavigationWidget::NavigationWidget(QWidget *parent) :
QWidget(parent),
@@ -128,6 +171,14 @@ void NavigationWidget::showEvent(QShowEvent *event)
QWidget::showEvent(event);
}
/*!
Creates QToolbuttons for the Navigation Pane widget.
Returns the list of created QToolButtons.
\sa NavigationWidgetFactory::createWidget
*/
QList<QToolButton *> NavigationWidget::createToolButtons()
{
QList<QToolButton *> list;
@@ -154,6 +205,10 @@ QList<QToolButton *> NavigationWidget::createToolButtons()
return list;
}
/*!
Returns flat mode state.
*/
bool NavigationWidget::flatMode() const
{
QTC_ASSERT(d->fullProjectsModeButton, return false);
@@ -162,6 +217,10 @@ bool NavigationWidget::flatMode() const
return !d->fullProjectsModeButton->isChecked();
}
/*!
Sets the flat mode state to \a flatMode.
*/
void NavigationWidget::setFlatMode(bool flatMode)
{
QTC_ASSERT(d->fullProjectsModeButton, return);
@@ -170,12 +229,21 @@ void NavigationWidget::setFlatMode(bool flatMode)
d->fullProjectsModeButton->setChecked(!flatMode);
}
/*!
Full projects mode button has been toggled. \a state holds the full
projects mode.
*/
void NavigationWidget::onFullProjectsModeToggled(bool state)
{
// button is 'full projects mode' - so it has to be inverted
Manager::instance()->setFlatMode(!state);
}
/*!
Activates the item with the \a index in the tree view.
*/
void NavigationWidget::onItemActivated(const QModelIndex &index)
{
if (!index.isValid())
@@ -186,6 +254,11 @@ void NavigationWidget::onItemActivated(const QModelIndex &index)
emit requestGotoLocations(list);
}
/*!
Receives new data for the tree. \a result is a pointer to the Class View
model root item. The method does nothing if null is passed.
*/
void NavigationWidget::onDataUpdate(QSharedPointer<QStandardItem> result)
{
if (result.isNull())
@@ -213,6 +286,11 @@ void NavigationWidget::onDataUpdate(QSharedPointer<QStandardItem> result)
<< "TreeView is updated in" << timer.elapsed() << "msecs";
}
/*!
Fetches data for expanded items to make sure that the content will exist.
\a item and \a target do nothing if null is passed.
*/
void NavigationWidget::fetchExpandedItems(QStandardItem *item, const QStandardItem *target) const
{
if (!item || !target)