LibrePCB Developers Documentation
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::Workspace &ws, const IF_GraphicsLayerProvider *layerProvider, QWidget *parent=nullptr) noexcept
 
 ~ComponentChooserDialog () noexcept
 
const tl::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 tl::optional< Uuid > &uuid) noexcept
 
void setSelectedComponent (const tl::optional< Uuid > &uuid) noexcept
 
void updatePreview (const FilePath &fp) noexcept
 
void accept () noexcept override
 
const QStringList & localeOrder () const noexcept
 

Private Attributes

const workspace::WorkspacemWorkspace
 
const IF_GraphicsLayerProvidermLayerProvider
 
QScopedPointer< Ui::ComponentChooserDialog > mUi
 
QScopedPointer< QAbstractItemModel > mCategoryTreeModel
 
tl::optional< UuidmSelectedCategoryUuid
 
tl::optional< UuidmSelectedComponentUuid
 
QScopedPointer< ComponentmComponent
 
QScopedPointer< GraphicsScenemGraphicsScene
 
QList< std::shared_ptr< Symbol > > mSymbols
 
QList< std::shared_ptr< SymbolPreviewGraphicsItem > > mSymbolGraphicsItems
 

Detailed Description

Constructor & Destructor Documentation

◆ ComponentChooserDialog() [1/3]

◆ ComponentChooserDialog() [2/3]

◆ ComponentChooserDialog() [3/3]

ComponentChooserDialog ( const workspace::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 tl::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:
+ Here is the caller graph for this function:

◆ setSelectedCategory()

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

◆ setSelectedComponent()

void setSelectedComponent ( const tl::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:
+ Here is the caller graph for this function:

◆ accept()

void accept ( )
overrideprivatenoexcept
+ Here is the caller graph for this function:

◆ 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::Workspace& mWorkspace
private

◆ mLayerProvider

const IF_GraphicsLayerProvider* mLayerProvider
private

◆ mUi

QScopedPointer<Ui::ComponentChooserDialog> mUi
private

◆ mCategoryTreeModel

QScopedPointer<QAbstractItemModel> mCategoryTreeModel
private

◆ mSelectedCategoryUuid

tl::optional<Uuid> mSelectedCategoryUuid
private

◆ mSelectedComponentUuid

tl::optional<Uuid> mSelectedComponentUuid
private

◆ mComponent

QScopedPointer<Component> mComponent
private

◆ mGraphicsScene

QScopedPointer<GraphicsScene> mGraphicsScene
private

◆ mSymbols

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

◆ mSymbolGraphicsItems

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

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