LibrePCB Developers Documentation
CategoryListEditorWidget Class Reference

The CategoryListEditorWidget class. More...

#include <categorylisteditorwidget.h>

Inherits QWidget.

+ Collaboration diagram for CategoryListEditorWidget:

Public Types

enum class  Categories
 

Signals

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

Public Member Functions

 CategoryListEditorWidget ()=delete
 
 CategoryListEditorWidget (const Workspace &ws, Categories categories, QWidget *parent=nullptr) noexcept
 
 CategoryListEditorWidget (const CategoryListEditorWidget &other)=delete
 
virtual ~CategoryListEditorWidget () noexcept
 
const QSet< Uuid > & getUuids () const noexcept
 
void setReadOnly (bool readOnly) noexcept
 
void setRequiresMinimumOneEntry (bool v) noexcept
 
void setUuids (const QSet< Uuid > &uuids) noexcept
 
void openAddCategoryDialog () noexcept
 
CategoryListEditorWidgetoperator= (const CategoryListEditorWidget &rhs)=delete
 

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
 
QStringList buildTree (const tl::optional< Uuid > &category) const
 
tl::optional< UuidchooseCategoryWithDialog () noexcept
 

Private Attributes

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

Detailed Description

Member Enumeration Documentation

◆ Categories

enum class Categories
strong
Enumerator
Component 
Package 

Constructor & Destructor Documentation

◆ CategoryListEditorWidget() [1/3]

◆ CategoryListEditorWidget() [2/3]

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

◆ CategoryListEditorWidget() [3/3]

◆ ~CategoryListEditorWidget()

~CategoryListEditorWidget ( )
virtualnoexcept

Member Function Documentation

◆ getUuids()

const QSet< Uuid > & getUuids ( ) const
inlinenoexcept

◆ setReadOnly()

void setReadOnly ( bool  readOnly)
noexcept

◆ setRequiresMinimumOneEntry()

void setRequiresMinimumOneEntry ( bool  v)
noexcept

◆ setUuids()

void setUuids ( const QSet< Uuid > &  uuids)
noexcept

◆ openAddCategoryDialog()

void openAddCategoryDialog ( )
inlinenoexcept
+ Here is the call graph for this function:

◆ operator=()

CategoryListEditorWidget & operator= ( const CategoryListEditorWidget rhs)
delete

◆ 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:

◆ 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

◆ addItem() [3/3]

void addItem ( const tl::optional< Uuid > &  category,
const QString &  text 
)
privatenoexcept

◆ updateColor()

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

◆ buildTree()

QStringList buildTree ( const tl::optional< Uuid > &  category) const
private
+ Here is the call graph for this function:

◆ chooseCategoryWithDialog()

tl::optional< Uuid > chooseCategoryWithDialog ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ mWorkspace

const Workspace& mWorkspace
private

◆ mCategories

const Categories mCategories
private

◆ mUi

QScopedPointer<Ui::CategoryListEditorWidget> mUi
private

◆ mRequiresMinimumOneEntry

bool mRequiresMinimumOneEntry
private

◆ mUuids

QSet<Uuid> mUuids
private

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