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, CategoryTreeFilter::Flags filter) 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
 
bool isVisible () 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
 
bool matchesFilter (const WorkspaceLibraryDb &lib, CategoryTreeFilter::Flags filter) 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
 
template<>
bool matchesFilter (const WorkspaceLibraryDb &lib, CategoryTreeFilter::Flags filter) const
 
template<>
bool matchesFilter (const WorkspaceLibraryDb &lib, CategoryTreeFilter::Flags filter) const
 

Private Attributes

CategoryTreeItemmParent
 
tl::optional< UuidmUuid
 
QString mName
 
QString mDescription
 
unsigned int mDepth
 
QString mExceptionMessage
 
bool mIsVisible
 
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,
CategoryTreeFilter::Flags  filter 
)
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:

bool isVisible ( ) const
inlinenoexcept
CategoryTreeItem& operator= ( const CategoryTreeItem< ElementType > &  rhs)
delete
FilePath getLatestCategory ( const WorkspaceLibraryDb lib) const
private
QSet<Uuid> getCategoryChilds ( const WorkspaceLibraryDb lib) const
private
bool matchesFilter ( const WorkspaceLibraryDb lib,
CategoryTreeFilter::Flags  filter 
) 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:

bool matchesFilter ( const WorkspaceLibraryDb lib,
CategoryTreeFilter::Flags  filter 
) const
private

+ Here is the call graph for this function:

bool matchesFilter ( const WorkspaceLibraryDb lib,
CategoryTreeFilter::Flags  filter 
) const
private

+ Here is the call graph for this function:

Member Data Documentation

CategoryTreeItem* mParent
private
tl::optional<Uuid> mUuid
private
QString mName
private
QString mDescription
private
unsigned int mDepth
private

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

QString mExceptionMessage
private
bool mIsVisible
private
QList<ChildType> mChilds
private

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