LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UnplacedComponentsDock Class Referencefinal

The UnplacedComponentsDock class. More...

#include <unplacedcomponentsdock.h>

Inherits QDockWidget.

+ Collaboration diagram for UnplacedComponentsDock:

Signals

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

Public Member Functions

 UnplacedComponentsDock (ProjectEditor &editor)
 
 ~UnplacedComponentsDock ()
 
int getUnplacedComponentsCount () const noexcept
 
void setBoard (Board *board)
 

Private Slots

void on_lstUnplacedComponents_currentItemChanged (QListWidgetItem *current, QListWidgetItem *previous)
 
void on_cbxSelectedDevice_currentIndexChanged (int index)
 
void on_cbxSelectedFootprint_currentIndexChanged (int index)
 
void on_btnAdd_clicked ()
 
void on_pushButton_clicked ()
 
void on_btnAddAll_clicked ()
 

Private Member Functions

 UnplacedComponentsDock ()
 
 UnplacedComponentsDock (const UnplacedComponentsDock &other)
 
UnplacedComponentsDockoperator= (const UnplacedComponentsDock &rhs)
 
void updateComponentsList () noexcept
 
void setSelectedComponentInstance (ComponentInstance *cmp) noexcept
 
void setSelectedDeviceAndPackage (const library::Device *device, const library::Package *package) noexcept
 
void setSelectedFootprintUuid (const tl::optional< Uuid > &uuid) noexcept
 
void beginUndoCmdGroup () noexcept
 
void addNextDeviceToCmdGroup (ComponentInstance &cmp, const Uuid &deviceUuid, const tl::optional< Uuid > &footprintUuid) noexcept
 
void commitUndoCmdGroup () noexcept
 
void addDeviceManually (ComponentInstance &cmp, const Uuid &deviceUuid, Uuid footprintUuid) noexcept
 

Private Attributes

ProjectEditormProjectEditor
 
ProjectmProject
 
BoardmBoard
 
Ui::UnplacedComponentsDock * mUi
 
QScopedPointer
< DefaultGraphicsLayerProvider
mGraphicsLayerProvider
 
GraphicsScenemFootprintPreviewGraphicsScene
 
library::FootprintPreviewGraphicsItemmFootprintPreviewGraphicsItem
 
ComponentInstancemSelectedComponent
 
const library::DevicemSelectedDevice
 
const library::PackagemSelectedPackage
 
tl::optional< UuidmSelectedFootprintUuid
 
QMetaObject::Connection mCircuitConnection1
 
QMetaObject::Connection mCircuitConnection2
 
QMetaObject::Connection mBoardConnection1
 
QMetaObject::Connection mBoardConnection2
 
Point mNextPosition
 
bool mDisableListUpdate
 
QHash< Uuid, UuidmLastDeviceOfComponent
 
QHash< Uuid, tl::optional< Uuid > > mLastFootprintOfDevice
 
QScopedPointer< UndoCommandGroupmCurrentUndoCmdGroup
 

Detailed Description

The UnplacedComponentsDock class.

Todo:
This class is very provisional and may contain dangerous bugs...

Constructor & Destructor Documentation

UnplacedComponentsDock ( ProjectEditor editor)
explicit

+ Here is the call graph for this function:

+ Here is the call graph for this function:

UnplacedComponentsDock ( const UnplacedComponentsDock other)
private

Member Function Documentation

int getUnplacedComponentsCount ( ) const
noexcept

+ Here is the caller graph for this function:

void setBoard ( Board board)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void unplacedComponentsCountChanged ( int  count)
signal

+ Here is the caller graph for this function:

void addDeviceTriggered ( ComponentInstance cmp,
const Uuid deviceUuid,
Uuid  footprintUuid 
)
signal

+ Here is the caller graph for this function:

void on_lstUnplacedComponents_currentItemChanged ( QListWidgetItem *  current,
QListWidgetItem *  previous 
)
privateslot

+ Here is the call graph for this function:

void on_cbxSelectedDevice_currentIndexChanged ( int  index)
privateslot

+ Here is the call graph for this function:

void on_cbxSelectedFootprint_currentIndexChanged ( int  index)
privateslot

+ Here is the call graph for this function:

void on_btnAdd_clicked ( )
privateslot

+ Here is the call graph for this function:

void on_pushButton_clicked ( )
privateslot

+ Here is the call graph for this function:

void on_btnAddAll_clicked ( )
privateslot

+ Here is the call graph for this function:

UnplacedComponentsDock& operator= ( const UnplacedComponentsDock rhs)
private
void updateComponentsList ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void setSelectedComponentInstance ( ComponentInstance cmp)
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void setSelectedDeviceAndPackage ( const library::Device device,
const library::Package package 
)
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void setSelectedFootprintUuid ( const tl::optional< Uuid > &  uuid)
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void beginUndoCmdGroup ( )
privatenoexcept

+ Here is the caller graph for this function:

void addNextDeviceToCmdGroup ( ComponentInstance cmp,
const Uuid deviceUuid,
const tl::optional< Uuid > &  footprintUuid 
)
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void commitUndoCmdGroup ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void addDeviceManually ( ComponentInstance cmp,
const Uuid deviceUuid,
Uuid  footprintUuid 
)
privatenoexcept

+ Here is the caller graph for this function:

Member Data Documentation

ProjectEditor& mProjectEditor
private
Project& mProject
private
Board* mBoard
private
Ui::UnplacedComponentsDock* mUi
private
QScopedPointer<DefaultGraphicsLayerProvider> mGraphicsLayerProvider
private
GraphicsScene* mFootprintPreviewGraphicsScene
private
library::FootprintPreviewGraphicsItem* mFootprintPreviewGraphicsItem
private
ComponentInstance* mSelectedComponent
private
const library::Device* mSelectedDevice
private
const library::Package* mSelectedPackage
private
tl::optional<Uuid> mSelectedFootprintUuid
private
QMetaObject::Connection mCircuitConnection1
private
QMetaObject::Connection mCircuitConnection2
private
QMetaObject::Connection mBoardConnection1
private
QMetaObject::Connection mBoardConnection2
private
Point mNextPosition
private
bool mDisableListUpdate
private
QHash<Uuid, Uuid> mLastDeviceOfComponent
private
QHash<Uuid, tl::optional<Uuid> > mLastFootprintOfDevice
private
QScopedPointer<UndoCommandGroup> mCurrentUndoCmdGroup
private

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