LibrePCB Developers Documentation
CategoryListEditorWidgetBase Class Referenceabstract

The CategoryListEditorWidgetBase class. More...

#include <categorylisteditorwidget.h>

+ Inheritance diagram for CategoryListEditorWidgetBase:
+ Collaboration diagram for CategoryListEditorWidgetBase:

Signals

void edited ()
 
void categoryAdded (const Uuid &category)
 
void categoryRemoved (const Uuid &category)
 

Public Member Functions

 CategoryListEditorWidgetBase ()=delete
 
 CategoryListEditorWidgetBase (const workspace::Workspace &ws, QWidget *parent=nullptr) noexcept
 
 CategoryListEditorWidgetBase (const CategoryListEditorWidgetBase &other)=delete
 
virtual ~CategoryListEditorWidgetBase () noexcept
 
const QSet< Uuid > & getUuids () const noexcept
 
void setRequiresMinimumOneEntry (bool v) noexcept
 
void setUuids (const QSet< Uuid > &uuids) noexcept
 
void openAddCategoryDialog () noexcept
 
CategoryListEditorWidgetBaseoperator= (const CategoryListEditorWidgetBase &rhs)=delete
 

Protected Member Functions

virtual tl::optional< UuidchooseCategoryWithDialog () noexcept=0
 
virtual FilePath getLatestCategory (const Uuid &category) const =0
 
virtual QList< UuidgetCategoryParents (const Uuid &category) const =0
 
virtual QString getCategoryName (const FilePath &fp) const =0
 

Protected Attributes

const workspace::WorkspacemWorkspace
 
QScopedPointer< Ui::CategoryListEditorWidget > mUi
 
bool mRequiresMinimumOneEntry
 
QSet< UuidmUuids
 

Private Member Functions

void btnAddClicked () noexcept
 
void btnRemoveClicked () noexcept
 
void addItem (const tl::optional< Uuid > &category) noexcept
 
void addItem (const tl::optional< Uuid > &category, const QStringList &lines) noexcept
 
void addItem (const tl::optional< Uuid > &category, const QString &text) noexcept
 
void updateColor () noexcept
 

Detailed Description

Constructor & Destructor Documentation

◆ CategoryListEditorWidgetBase() [1/3]

◆ CategoryListEditorWidgetBase() [2/3]

CategoryListEditorWidgetBase ( const workspace::Workspace ws,
QWidget *  parent = nullptr 
)
explicitnoexcept
+ Here is the call graph for this function:

◆ CategoryListEditorWidgetBase() [3/3]

◆ ~CategoryListEditorWidgetBase()

~CategoryListEditorWidgetBase ( )
virtualnoexcept

Member Function Documentation

◆ getUuids()

const QSet<Uuid>& getUuids ( ) const
inlinenoexcept

◆ setRequiresMinimumOneEntry()

void setRequiresMinimumOneEntry ( bool  v)
noexcept
+ Here is the call graph for this function:

◆ setUuids()

void setUuids ( const QSet< Uuid > &  uuids)
noexcept
+ Here is the call graph for this function:

◆ openAddCategoryDialog()

void openAddCategoryDialog ( )
inlinenoexcept

◆ operator=()

CategoryListEditorWidgetBase& operator= ( const CategoryListEditorWidgetBase rhs)
delete

◆ chooseCategoryWithDialog()

virtual tl::optional<Uuid> chooseCategoryWithDialog ( )
protectedpure virtualnoexcept

Implemented in CategoryListEditorWidget< ElementType >.

+ Here is the caller graph for this function:

◆ getLatestCategory()

virtual FilePath getLatestCategory ( const Uuid category) const
protectedpure virtual

Implemented in CategoryListEditorWidget< ElementType >, CategoryListEditorWidget< ElementType >, and CategoryListEditorWidget< ElementType >.

+ Here is the caller graph for this function:

◆ getCategoryParents()

virtual QList<Uuid> getCategoryParents ( const Uuid category) const
protectedpure virtual

Implemented in CategoryListEditorWidget< ElementType >, CategoryListEditorWidget< ElementType >, and CategoryListEditorWidget< ElementType >.

+ Here is the caller graph for this function:

◆ getCategoryName()

virtual QString getCategoryName ( const FilePath fp) const
protectedpure virtual

Implemented in CategoryListEditorWidget< ElementType >.

+ Here is the caller graph for this function:

◆ btnAddClicked()

void btnAddClicked ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ btnRemoveClicked()

void btnRemoveClicked ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addItem() [1/3]

void addItem ( const tl::optional< Uuid > &  category)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addItem() [2/3]

void addItem ( const tl::optional< Uuid > &  category,
const QStringList &  lines 
)
privatenoexcept
+ Here is the call graph for this function:

◆ addItem() [3/3]

void addItem ( const tl::optional< Uuid > &  category,
const QString &  text 
)
privatenoexcept
+ Here is the call graph for this function:

◆ updateColor()

void updateColor ( )
privatenoexcept
+ Here is the caller graph for this function:

◆ edited

void edited ( )
signal
+ Here is the caller graph for this function:

◆ categoryAdded

void categoryAdded ( const Uuid category)
signal
+ Here is the caller graph for this function:

◆ categoryRemoved

void categoryRemoved ( const Uuid category)
signal
+ Here is the caller graph for this function:

Member Data Documentation

◆ mWorkspace

const workspace::Workspace& mWorkspace
protected

◆ mUi

QScopedPointer<Ui::CategoryListEditorWidget> mUi
protected

◆ mRequiresMinimumOneEntry

bool mRequiresMinimumOneEntry
protected

◆ mUuids

QSet<Uuid> mUuids
protected

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