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]
template<typename ElementType >
◆ CategoryTreeBuilder() [2/3]
template<typename ElementType >
◆ CategoryTreeBuilder() [3/3]
template<typename ElementType >
◆ ~CategoryTreeBuilder()
template<typename ElementType >
◆ buildTree()
template<typename ElementType >
QStringList buildTree |
( |
const std::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 std::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=()
template<typename ElementType >
◆ getParentNames()
template<typename ElementType >
bool getParentNames |
( |
const std::optional< Uuid > & |
category, |
|
|
QStringList & |
names, |
|
|
QSet< FilePath > & |
filePaths |
|
) |
| const |
|
private |
◆ mDb
template<typename ElementType >
◆ mLocaleOrder
template<typename ElementType >
const QStringList& mLocaleOrder |
|
private |
◆ mNulloptIsRootCategory
template<typename ElementType >
const bool mNulloptIsRootCategory |
|
private |
The documentation for this class was generated from the following files: