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

The UnplacedComponentsDock class. More...

#include <unplacedcomponentsdock.h>

Inherits QDockWidget.

+ Collaboration diagram for UnplacedComponentsDock:

Classes

struct  DeviceMetadata
 

Signals

void unplacedComponentsCountChanged (int count)
 
void addDeviceTriggered (ComponentInstance &cmp, const Uuid &deviceUuid, Uuid footprintUuid)
 

Public Member Functions

 UnplacedComponentsDock ()=delete
 
 UnplacedComponentsDock (ProjectEditor &editor, QWidget *parent=nullptr) noexcept
 
 UnplacedComponentsDock (const UnplacedComponentsDock &other)=delete
 
 ~UnplacedComponentsDock () noexcept
 
int getUnplacedComponentsCount () const noexcept
 
void setBoard (Board *board)
 
UnplacedComponentsDockoperator= (const UnplacedComponentsDock &rhs)=delete
 

Private Member Functions

void updateComponentsList () noexcept
 
void currentComponentListItemChanged (QListWidgetItem *current, QListWidgetItem *previous) noexcept
 
void currentDeviceIndexChanged (int index) noexcept
 
void currentFootprintIndexChanged (int index) noexcept
 
void setSelectedComponentInstance (ComponentInstance *cmp) noexcept
 
void setSelectedDeviceAndPackage (const std::optional< Uuid > &deviceUuid, Package *package, bool packageOwned) noexcept
 
void setSelectedFootprintUuid (const std::optional< Uuid > &uuid) noexcept
 
void addSelectedDeviceToBoard () noexcept
 
void addSimilarDevicesToBoard () noexcept
 
void addAllDevicesToBoard () noexcept
 
void autoAddDevicesToBoard (const std::optional< Uuid > &libCmpUuidFilter) noexcept
 
std::pair< QList< DeviceMetadata >, int > getAvailableDevices (ComponentInstance &cmp) const noexcept
 Get all available devices for a specific component instance.
 
std::optional< UuidgetSuggestedFootprint (const Uuid &libPkgUuid) const noexcept
 

Private Attributes

ProjectEditormProjectEditor
 
ProjectmProject
 
BoardmBoard
 
QScopedPointer< Ui::UnplacedComponentsDock > mUi
 
bool mDisableListUpdate
 
Point mNextPosition
 
QHash< Uuid, UuidmLastDeviceOfComponent
 
QHash< Uuid, UuidmLastFootprintOfPackage
 
QList< DeviceMetadatamCurrentDevices
 
ComponentInstancemSelectedComponent
 
std::optional< UuidmSelectedDeviceUuid
 
PackagemSelectedPackage
 
bool mSelectedPackageOwned
 
std::optional< UuidmSelectedFootprintUuid
 
QScopedPointer< DefaultGraphicsLayerProvidermGraphicsLayerProvider
 
QScopedPointer< GraphicsScenemPreviewGraphicsScene
 
QScopedPointer< FootprintGraphicsItemmPreviewGraphicsItem
 

Detailed Description

Constructor & Destructor Documentation

◆ UnplacedComponentsDock() [1/3]

◆ UnplacedComponentsDock() [2/3]

UnplacedComponentsDock ( ProjectEditor editor,
QWidget *  parent = nullptr 
)
explicitnoexcept
+ Here is the call graph for this function:

◆ UnplacedComponentsDock() [3/3]

◆ ~UnplacedComponentsDock()

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

Member Function Documentation

◆ getUnplacedComponentsCount()

int getUnplacedComponentsCount ( ) const
noexcept
+ Here is the caller graph for this function:

◆ setBoard()

void setBoard ( Board board)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

UnplacedComponentsDock & operator= ( const UnplacedComponentsDock rhs)
delete

◆ unplacedComponentsCountChanged

void unplacedComponentsCountChanged ( int  count)
signal
+ Here is the caller graph for this function:

◆ addDeviceTriggered

void addDeviceTriggered ( ComponentInstance cmp,
const Uuid deviceUuid,
Uuid  footprintUuid 
)
signal
+ Here is the caller graph for this function:

◆ updateComponentsList()

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

◆ currentComponentListItemChanged()

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

◆ currentDeviceIndexChanged()

void currentDeviceIndexChanged ( int  index)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ currentFootprintIndexChanged()

void currentFootprintIndexChanged ( int  index)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSelectedComponentInstance()

void setSelectedComponentInstance ( ComponentInstance cmp)
privatenoexcept
+ Here is the caller graph for this function:

◆ setSelectedDeviceAndPackage()

void setSelectedDeviceAndPackage ( const std::optional< Uuid > &  deviceUuid,
Package package,
bool  packageOwned 
)
privatenoexcept

◆ setSelectedFootprintUuid()

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

◆ addSelectedDeviceToBoard()

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

◆ addSimilarDevicesToBoard()

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

◆ addAllDevicesToBoard()

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

◆ autoAddDevicesToBoard()

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

◆ getAvailableDevices()

std::pair< QList< UnplacedComponentsDock::DeviceMetadata >, int > getAvailableDevices ( ComponentInstance cmp) const
privatenoexcept

Get all available devices for a specific component instance.

Parameters
cmpThe desired component instance.
Returns
Metadata of all available devices, and the list index of the best match / most relevant device.
+ Here is the call graph for this function:

◆ getSuggestedFootprint()

std::optional< Uuid > getSuggestedFootprint ( const Uuid libPkgUuid) const
privatenoexcept
+ Here is the call graph for this function:

Member Data Documentation

◆ mProjectEditor

ProjectEditor& mProjectEditor
private

◆ mProject

Project& mProject
private

◆ mBoard

Board* mBoard
private

◆ mUi

QScopedPointer<Ui::UnplacedComponentsDock> mUi
private

◆ mDisableListUpdate

bool mDisableListUpdate
private

◆ mNextPosition

Point mNextPosition
private

◆ mLastDeviceOfComponent

QHash<Uuid, Uuid> mLastDeviceOfComponent
private

◆ mLastFootprintOfPackage

QHash<Uuid, Uuid> mLastFootprintOfPackage
private

◆ mCurrentDevices

QList<DeviceMetadata> mCurrentDevices
private

◆ mSelectedComponent

ComponentInstance* mSelectedComponent
private

◆ mSelectedDeviceUuid

std::optional<Uuid> mSelectedDeviceUuid
private

◆ mSelectedPackage

Package* mSelectedPackage
private

◆ mSelectedPackageOwned

bool mSelectedPackageOwned
private

◆ mSelectedFootprintUuid

std::optional<Uuid> mSelectedFootprintUuid
private

◆ mGraphicsLayerProvider

QScopedPointer<DefaultGraphicsLayerProvider> mGraphicsLayerProvider
private

◆ mPreviewGraphicsScene

QScopedPointer<GraphicsScene> mPreviewGraphicsScene
private

◆ mPreviewGraphicsItem

QScopedPointer<FootprintGraphicsItem> mPreviewGraphicsItem
private

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