Helper class to extract a category tree from librepcb::WorkspaceLibraryDb.
More...
#include <categorytreebuilder.h>
template<typename ElementType>
class librepcb::editor::CategoryTreeBuilder< ElementType >
Helper class to extract a category tree from librepcb::WorkspaceLibraryDb.
◆ CategoryTreeBuilder() [1/3]
◆ CategoryTreeBuilder() [2/3]
◆ CategoryTreeBuilder() [3/3]
◆ ~CategoryTreeBuilder()
◆ buildTree()
QStringList buildTree |
( |
const tl::optional< Uuid > & |
category, |
|
|
bool * |
success = nullptr |
|
) |
| const |
Build the parents tree for a specific category.
- Parameters
-
category | The category to get the tree from. If tl::nullopt, it is assumed to represent the root category. |
success | If not sullptr, this is set to whether the tree was successfully built or not. |
- Returns
- All category names. The top level category comes first (root category if
nulloptIsRootCategory=true
passed to the constructor), then down the tree, with the passed category as the last element. In case of invalid categories, the returned list is either empty or contains error messages.
- Exceptions
-
In | case of database errors. |
◆ operator=()
◆ getParentNames()
bool getParentNames |
( |
const tl::optional< Uuid > & |
category, |
|
|
QStringList & |
names, |
|
|
QSet< FilePath > & |
filePaths |
|
) |
| const |
|
private |
◆ mDb
◆ mLocaleOrder
const QStringList& mLocaleOrder |
|
private |
◆ mNulloptIsRootCategory
const bool mNulloptIsRootCategory |
|
private |
The documentation for this class was generated from the following files: