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

@@ -40,6 +40,11 @@
namespace ClassView {
namespace Constants {
/*!
\class Utils
\brief The Utils class provides some common utilities.
*/
//! Default icon sort order
const int IconSortOrder[] = {
CPlusPlus::Icons::NamespaceIconType,
@@ -69,6 +74,13 @@ Utils::Utils()
{
}
/*!
Converts internal location container to QVariant compatible.
\a locations specifies a set of symbol locations.
Returns a list of variant locations that can be added to the data of an
item.
*/
QList<QVariant> Utils::locationsToRole(const QSet<SymbolLocation> &locations)
{
QList<QVariant> locationsVar;
@@ -78,6 +90,13 @@ QList<QVariant> Utils::locationsToRole(const QSet<SymbolLocation> &locations)
return locationsVar;
}
/*!
Converts QVariant location container to internal.
\a locationsVar contains a list of variant locations from the data of an
item.
Returns a set of symbol locations.
*/
QSet<SymbolLocation> Utils::roleToLocations(const QList<QVariant> &locationsVar)
{
QSet<SymbolLocation> locations;
@@ -89,6 +108,10 @@ QSet<SymbolLocation> Utils::roleToLocations(const QList<QVariant> &locationsVar)
return locations;
}
/*!
Returns sort order value for the \a icon.
*/
int Utils::iconTypeSortOrder(int icon)
{
static QHash<int, int> sortOrder;
@@ -107,6 +130,12 @@ int Utils::iconTypeSortOrder(int icon)
return sortOrder[icon];
}
/*!
Sets symbol information specified by \a information to \a item.
\a information provides the name, type, and icon for the item.
Returns the filled item.
*/
QStandardItem *Utils::setSymbolInformationToItem(const SymbolInformation &information,
QStandardItem *item)
{
@@ -119,6 +148,10 @@ QStandardItem *Utils::setSymbolInformationToItem(const SymbolInformation &inform
return item;
}
/*!
Returns symbol information for \a item.
*/
SymbolInformation Utils::symbolInformationFromItem(const QStandardItem *item)
{
Q_ASSERT(item);
@@ -141,6 +174,10 @@ SymbolInformation Utils::symbolInformationFromItem(const QStandardItem *item)
return SymbolInformation(name, type, iconType);
}
/*!
Updates \a item to \a target, so that it is sorted and can be fetched.
*/
void Utils::fetchItemToTarget(QStandardItem *item, const QStandardItem *target)
{
if (!item || !target)
@@ -178,6 +215,9 @@ void Utils::fetchItemToTarget(QStandardItem *item, const QStandardItem *target)
}
}
/*!
Moves \a item to \a target (sorted).
*/
void Utils::moveItemToTarget(QStandardItem *item, const QStandardItem *target)
{
if (!item || !target)