Mod doc set style de same

This commit is contained in:
Simon De Backer
2020-07-24 22:44:10 +02:00
parent d087a8be66
commit c0df06c2ee
2 changed files with 88 additions and 75 deletions

View File

@@ -24,20 +24,22 @@
#include <QDir> #include <QDir>
/** /**
* @brief FileElementCollectionItem::FileElementCollectionItem @brief FileElementCollectionItem::FileElementCollectionItem
* Constructor Constructor
*/ */
FileElementCollectionItem::FileElementCollectionItem() FileElementCollectionItem::FileElementCollectionItem()
{} {}
/** /**
* @brief FileElementCollectionItem::setRootPath @brief FileElementCollectionItem::setRootPath
* Set path has root path for this file item. Set path has root path for this file item.
* Use this function only to set the beginning of a file collection. Use this function only to set the beginning of a file collection.
* @param path @param path
* @return true if path exist. @return true if path exist.
*/ */
bool FileElementCollectionItem::setRootPath(const QString& path, bool set_data, bool hide_element) bool FileElementCollectionItem::setRootPath(const QString& path,
bool set_data,
bool hide_element)
{ {
QDir dir(path); QDir dir(path);
if (dir.exists()) if (dir.exists())
@@ -51,8 +53,8 @@ bool FileElementCollectionItem::setRootPath(const QString& path, bool set_data,
} }
/** /**
* @brief FileElementCollectionItem::fileSystemPath @brief FileElementCollectionItem::fileSystemPath
* @return the file system path of this item @return the file system path of this item
*/ */
QString FileElementCollectionItem::fileSystemPath() const QString FileElementCollectionItem::fileSystemPath() const
{ {
@@ -63,13 +65,13 @@ QString FileElementCollectionItem::fileSystemPath() const
if (feci) if (feci)
return feci->fileSystemPath() + "/" + m_path; return feci->fileSystemPath() + "/" + m_path;
else else
return QString(); return QString();//Null string
} }
/** /**
* @brief FileElementCollectionItem::dirPath @brief FileElementCollectionItem::dirPath
* @return the dir path of this item (if this item is a dir return the path, @return the dir path of this item (if this item is a dir return the path,
* if item is an element return the path of the parent directory) if item is an element return the path of the parent directory)
*/ */
QString FileElementCollectionItem::dirPath() const QString FileElementCollectionItem::dirPath() const
{ {
@@ -78,12 +80,12 @@ QString FileElementCollectionItem::dirPath() const
else if (parent() && parent()->type() == FileElementCollectionItem::Type) else if (parent() && parent()->type() == FileElementCollectionItem::Type)
return static_cast<FileElementCollectionItem*>(parent())->fileSystemPath(); return static_cast<FileElementCollectionItem*>(parent())->fileSystemPath();
else else
return QString(); return QString();//Null string
} }
/** /**
* @brief FileElementCollectionItem::isDir @brief FileElementCollectionItem::isDir
* @return true if this item represent a directory @return true if this item represent a directory
*/ */
bool FileElementCollectionItem::isDir() const bool FileElementCollectionItem::isDir() const
{ {
@@ -95,8 +97,8 @@ bool FileElementCollectionItem::isDir() const
} }
/** /**
* @brief FileElementCollectionItem::isElement @brief FileElementCollectionItem::isElement
* @return true if this item represent an element @return true if this item represent an element
*/ */
bool FileElementCollectionItem::isElement() const bool FileElementCollectionItem::isElement() const
{ {
@@ -104,8 +106,8 @@ bool FileElementCollectionItem::isElement() const
} }
/** /**
* @brief FileElementCollectionItem::localName @brief FileElementCollectionItem::localName
* @return the located name of this item @return the located name of this item
*/ */
QString FileElementCollectionItem::localName() QString FileElementCollectionItem::localName()
{ {
@@ -145,10 +147,11 @@ QString FileElementCollectionItem::localName()
} }
/** /**
* @brief FileElementCollectionItem::localName @brief FileElementCollectionItem::localName
* Surcharged method, unlike the default method, avoid to create an elementLocation and so, gain time. Surcharged method, unlike the default method,
* @param location avoid to create an elementLocation and so, gain time.
* @return @param location
@return
*/ */
QString FileElementCollectionItem::localName(const ElementsLocation &location) QString FileElementCollectionItem::localName(const ElementsLocation &location)
{ {
@@ -166,8 +169,8 @@ QString FileElementCollectionItem::localName(const ElementsLocation &location)
} }
/** /**
* @brief FileElementCollectionItem::name @brief FileElementCollectionItem::name
* @return The collection name of this item @return The collection name of this item
*/ */
QString FileElementCollectionItem::name() const QString FileElementCollectionItem::name() const
{ {
@@ -178,8 +181,8 @@ QString FileElementCollectionItem::name() const
} }
/** /**
* @brief FileElementCollectionItem::collectionPath @brief FileElementCollectionItem::collectionPath
* @return The path of this item relative to the collection. @return The path of this item relative to the collection.
*/ */
QString FileElementCollectionItem::collectionPath() const QString FileElementCollectionItem::collectionPath() const
{ {
@@ -201,8 +204,8 @@ QString FileElementCollectionItem::collectionPath() const
} }
/** /**
* @brief FileElementCollectionItem::isCollectionRoot @brief FileElementCollectionItem::isCollectionRoot
* @return true if this item represent the root of collection @return true if this item represent the root of collection
*/ */
bool FileElementCollectionItem::isCollectionRoot() const bool FileElementCollectionItem::isCollectionRoot() const
{ {
@@ -213,8 +216,8 @@ bool FileElementCollectionItem::isCollectionRoot() const
} }
/** /**
* @brief FileElementCollectionItem::isCommonCollection @brief FileElementCollectionItem::isCommonCollection
* @return True if this item represent the common collection @return True if this item represent the common collection
*/ */
bool FileElementCollectionItem::isCommonCollection() const bool FileElementCollectionItem::isCommonCollection() const
{ {
@@ -222,8 +225,8 @@ bool FileElementCollectionItem::isCommonCollection() const
} }
/** /**
* @brief FileElementCollectionItem::isCustomCollection @brief FileElementCollectionItem::isCustomCollection
* @return True if this item represent the custom collection @return True if this item represent the custom collection
*/ */
bool FileElementCollectionItem::isCustomCollection() const bool FileElementCollectionItem::isCustomCollection() const
{ {
@@ -231,9 +234,10 @@ bool FileElementCollectionItem::isCustomCollection() const
} }
/** /**
* @brief FileElementCollectionItem::addChildAtPath @brief FileElementCollectionItem::addChildAtPath
* Ask to this item item to add a child with collection name @collection_name Ask to this item item to add a child
* @param collection_name with collection name @collection_name
@param collection_name
*/ */
void FileElementCollectionItem::addChildAtPath(const QString &collection_name) void FileElementCollectionItem::addChildAtPath(const QString &collection_name)
{ {
@@ -247,8 +251,8 @@ void FileElementCollectionItem::addChildAtPath(const QString &collection_name)
} }
/** /**
* @brief FileElementCollectionItem::setUpData @brief FileElementCollectionItem::setUpData
* SetUp the data of this item SetUp the data of this item
*/ */
void FileElementCollectionItem::setUpData() void FileElementCollectionItem::setUpData()
{ {
@@ -277,9 +281,10 @@ void FileElementCollectionItem::setUpData()
} }
/** /**
* @brief FileElementCollectionItem::setUpIcon @brief FileElementCollectionItem::setUpIcon
* SetUp the icon of this item. SetUp the icon of this item.
* Because icon use several memory, we use this method for setup icon instead setUpData. Because icon use several memory,
we use this method for setup icon instead setUpData.
*/ */
void FileElementCollectionItem::setUpIcon() void FileElementCollectionItem::setUpIcon()
{ {
@@ -304,13 +309,18 @@ void FileElementCollectionItem::setUpIcon()
} }
/** /**
* @brief FileElementCollectionItem::setPathName @brief FileElementCollectionItem::setPathName
* Set the name of this item in the file system path. Set the name of this item in the file system path.
* This item must have a parent, because they should be a child item of another. This item must have a parent,
* For create a new file collection see setRootPath. because they should be a child item of another.
* @param path_name For create a new file collection see setRootPath.
@param path_name
@param set_data
@param hide_element
*/ */
void FileElementCollectionItem::setPathName(const QString& path_name, bool set_data, bool hide_element) void FileElementCollectionItem::setPathName(const QString& path_name,
bool set_data,
bool hide_element)
{ {
m_path = path_name; m_path = path_name;
@@ -320,9 +330,10 @@ void FileElementCollectionItem::setPathName(const QString& path_name, bool set_d
} }
/** /**
* @brief FileElementCollectionItem::populate @brief FileElementCollectionItem::populate
* Create the childs of this item Create the childs of this item
* @param set_data : if true, call setUpData for every child of this item @param set_data : if true, call setUpData for every child of this item
@param hide_element
*/ */
void FileElementCollectionItem::populate(bool set_data, bool hide_element) void FileElementCollectionItem::populate(bool set_data, bool hide_element)
{ {

View File

@@ -21,8 +21,9 @@
#include "elementspanel.h" #include "elementspanel.h"
/** /**
This class embeds an elements panel under a toolbar providing various actions @brief The ElementsPanelWidget class
to manage elements. This class embeds an elements panel under a toolbar
providing various actions to manage elements.
@see ElementsPanel @see ElementsPanel
*/ */
class ElementsPanelWidget : public QWidget { class ElementsPanelWidget : public QWidget {
@@ -93,6 +94,7 @@ class ElementsPanelWidget : public QWidget {
}; };
/** /**
@brief ElementsPanelWidget::elementsPanel
@return The elements panel embedded within this widget. @return The elements panel embedded within this widget.
*/ */
inline ElementsPanel &ElementsPanelWidget::elementsPanel() const { inline ElementsPanel &ElementsPanelWidget::elementsPanel() const {