LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CategoryTreeItem< ElementType > Class Template Referencefinal

The CategoryTreeItem class. More...

#include <categorytreeitem.h>

+ Collaboration diagram for CategoryTreeItem< ElementType >:

Public Member Functions

 CategoryTreeItem ()=delete
 
 CategoryTreeItem (const CategoryTreeItem &other)=delete
 
 CategoryTreeItem (const WorkspaceLibraryDb &library, const QStringList localeOrder, CategoryTreeItem *parent, const tl::optional< Uuid > &uuid) noexcept
 
 ~CategoryTreeItem () noexcept
 
const tl::optional< Uuid > & getUuid () const noexcept
 
unsigned int getDepth () const noexcept
 
int getColumnCount () const noexcept
 
CategoryTreeItemgetParent () const noexcept
 
CategoryTreeItemgetChild (int index) const noexcept
 
int getChildCount () const noexcept
 
int getChildNumber () const noexcept
 
QVariant data (int role) const noexcept
 
CategoryTreeItemoperator= (const CategoryTreeItem &rhs)=delete
 

Private Types

using ChildType = QSharedPointer< CategoryTreeItem< ElementType >>
 

Private Member Functions

FilePath getLatestCategory (const WorkspaceLibraryDb &lib) const
 
QSet< UuidgetCategoryChilds (const WorkspaceLibraryDb &lib) const
 
template<>
FilePath getLatestCategory (const WorkspaceLibraryDb &lib) const
 
template<>
FilePath getLatestCategory (const WorkspaceLibraryDb &lib) const
 
template<>
QSet< UuidgetCategoryChilds (const WorkspaceLibraryDb &lib) const
 
template<>
QSet< UuidgetCategoryChilds (const WorkspaceLibraryDb &lib) const
 

Private Attributes

QStringList mLocaleOrder
 
CategoryTreeItemmParent
 
tl::optional< UuidmUuid
 
QScopedPointer< ElementType > mCategory
 
unsigned int mDepth
 
QString mExceptionMessage
 
QList< ChildTypemChilds
 

Detailed Description

template<typename ElementType>
class librepcb::workspace::CategoryTreeItem< ElementType >

The CategoryTreeItem class.

Member Typedef Documentation

using ChildType = QSharedPointer<CategoryTreeItem<ElementType>>
private

Constructor & Destructor Documentation

CategoryTreeItem ( )
delete
CategoryTreeItem ( const CategoryTreeItem< ElementType > &  other)
delete
CategoryTreeItem ( const WorkspaceLibraryDb library,
const QStringList  localeOrder,
CategoryTreeItem< ElementType > *  parent,
const tl::optional< Uuid > &  uuid 
)
noexcept

+ Here is the call graph for this function:

~CategoryTreeItem ( )
noexcept

Member Function Documentation

const tl::optional<Uuid>& getUuid ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

unsigned int getDepth ( ) const
inlinenoexcept
int getColumnCount ( ) const
inlinenoexcept
CategoryTreeItem* getParent ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

CategoryTreeItem* getChild ( int  index) const
inlinenoexcept

+ Here is the caller graph for this function:

int getChildCount ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

int getChildNumber ( ) const
noexcept

+ Here is the caller graph for this function:

QVariant data ( int  role) const
noexcept

+ Here is the caller graph for this function:

CategoryTreeItem& operator= ( const CategoryTreeItem< ElementType > &  rhs)
delete
FilePath getLatestCategory ( const WorkspaceLibraryDb lib) const
private
QSet<Uuid> getCategoryChilds ( const WorkspaceLibraryDb lib) const
private
FilePath getLatestCategory ( const WorkspaceLibraryDb lib) const
private

+ Here is the call graph for this function:

FilePath getLatestCategory ( const WorkspaceLibraryDb lib) const
private

+ Here is the call graph for this function:

QSet< Uuid > getCategoryChilds ( const WorkspaceLibraryDb lib) const
private

+ Here is the call graph for this function:

QSet< Uuid > getCategoryChilds ( const WorkspaceLibraryDb lib) const
private

+ Here is the call graph for this function:

Member Data Documentation

QStringList mLocaleOrder
private
CategoryTreeItem* mParent
private
tl::optional<Uuid> mUuid
private
QScopedPointer<ElementType> mCategory
private
unsigned int mDepth
private

this is to avoid endless recursion in the parent-child relationship

QString mExceptionMessage
private
QList<ChildType> mChilds
private

The documentation for this class was generated from the following files: