LibrePCB Developers Documentation
Loading...
Searching...
No Matches
ComponentChooserDialog Class Referencefinal

The ComponentChooserDialog class. More...

#include <componentchooserdialog.h>

Inherits QDialog.

+ Collaboration diagram for ComponentChooserDialog:

Public Member Functions

 ComponentChooserDialog ()=delete
 
 ComponentChooserDialog (const ComponentChooserDialog &other)=delete
 
 ComponentChooserDialog (const Workspace &ws, const IF_GraphicsLayerProvider *layerProvider, QWidget *parent=nullptr) noexcept
 
 ~ComponentChooserDialog () noexcept
 
const std::optional< Uuid > & getSelectedComponentUuid () const noexcept
 
ComponentChooserDialogoperator= (const ComponentChooserDialog &rhs)=delete
 

Private Member Functions

void searchEditTextChanged (const QString &text) noexcept
 
void treeCategories_currentItemChanged (const QModelIndex &current, const QModelIndex &previous) noexcept
 
void listComponents_currentItemChanged (QListWidgetItem *current, QListWidgetItem *previous) noexcept
 
void listComponents_itemDoubleClicked (QListWidgetItem *item) noexcept
 
void searchComponents (const QString &input)
 
void setSelectedCategory (const std::optional< Uuid > &uuid) noexcept
 
void setSelectedComponent (const std::optional< Uuid > &uuid) noexcept
 
void updatePreview (const FilePath &fp) noexcept
 
void accept () noexcept override
 
const QStringList & localeOrder () const noexcept
 

Private Attributes

const WorkspacemWorkspace
 
const IF_GraphicsLayerProvidermLayerProvider
 
QScopedPointer< Ui::ComponentChooserDialog > mUi
 
QScopedPointer< QAbstractItemModel > mCategoryTreeModel
 
bool mCategorySelected
 
std::optional< UuidmSelectedCategoryUuid
 
std::optional< UuidmSelectedComponentUuid
 
std::shared_ptr< ComponentmComponent
 
QScopedPointer< GraphicsScenemGraphicsScene
 
QList< std::shared_ptr< Symbol > > mSymbols
 
QList< std::shared_ptr< SymbolGraphicsItem > > mSymbolGraphicsItems
 

Detailed Description

Constructor & Destructor Documentation

◆ ComponentChooserDialog() [1/3]

◆ ComponentChooserDialog() [2/3]

◆ ComponentChooserDialog() [3/3]

ComponentChooserDialog ( const Workspace ws,
const IF_GraphicsLayerProvider layerProvider,
QWidget *  parent = nullptr 
)
noexcept
+ Here is the call graph for this function:

◆ ~ComponentChooserDialog()

~ComponentChooserDialog ( )
noexcept
+ Here is the call graph for this function:

Member Function Documentation

◆ getSelectedComponentUuid()

const std::optional< Uuid > & getSelectedComponentUuid ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ operator=()

ComponentChooserDialog & operator= ( const ComponentChooserDialog rhs)
delete

◆ searchEditTextChanged()

void searchEditTextChanged ( const QString &  text)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ treeCategories_currentItemChanged()

void treeCategories_currentItemChanged ( const QModelIndex &  current,
const QModelIndex &  previous 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listComponents_currentItemChanged()

void listComponents_currentItemChanged ( QListWidgetItem *  current,
QListWidgetItem *  previous 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listComponents_itemDoubleClicked()

void listComponents_itemDoubleClicked ( QListWidgetItem *  item)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ searchComponents()

void searchComponents ( const QString &  input)
private
+ Here is the call graph for this function:

◆ setSelectedCategory()

void setSelectedCategory ( const std::optional< Uuid > &  uuid)
privatenoexcept
+ Here is the call graph for this function:

◆ setSelectedComponent()

void setSelectedComponent ( const std::optional< Uuid > &  uuid)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updatePreview()

void updatePreview ( const FilePath fp)
privatenoexcept
+ Here is the call graph for this function:

◆ accept()

void accept ( )
overrideprivatenoexcept

◆ localeOrder()

const QStringList & localeOrder ( ) const
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

◆ mLayerProvider

const IF_GraphicsLayerProvider* mLayerProvider
private

◆ mUi

QScopedPointer<Ui::ComponentChooserDialog> mUi
private

◆ mCategoryTreeModel

QScopedPointer<QAbstractItemModel> mCategoryTreeModel
private

◆ mCategorySelected

bool mCategorySelected
private

◆ mSelectedCategoryUuid

std::optional<Uuid> mSelectedCategoryUuid
private

◆ mSelectedComponentUuid

std::optional<Uuid> mSelectedComponentUuid
private

◆ mComponent

std::shared_ptr<Component> mComponent
private

◆ mGraphicsScene

QScopedPointer<GraphicsScene> mGraphicsScene
private

◆ mSymbols

QList<std::shared_ptr<Symbol> > mSymbols
private

◆ mSymbolGraphicsItems

QList<std::shared_ptr<SymbolGraphicsItem> > mSymbolGraphicsItems
private

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