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

The AddComponentDialog class. More...

#include <addcomponentdialog.h>

Inherits QDialog.

+ Collaboration diagram for AddComponentDialog:

Public Member Functions

 AddComponentDialog (workspace::Workspace &workspace, Project &project, QWidget *parent=nullptr)
 
 ~AddComponentDialog () noexcept
 
tl::optional< UuidgetSelectedComponentUuid () const noexcept
 
tl::optional< UuidgetSelectedSymbVarUuid () const noexcept
 
tl::optional< UuidgetSelectedDeviceUuid () const noexcept
 

Private Slots

void searchEditTextChanged (const QString &text) noexcept
 
void treeCategories_currentItemChanged (const QModelIndex &current, const QModelIndex &previous) noexcept
 
void treeComponents_currentItemChanged (QTreeWidgetItem *current, QTreeWidgetItem *previous) noexcept
 
void treeComponents_itemDoubleClicked (QTreeWidgetItem *item, int column) noexcept
 
void on_cbxSymbVar_currentIndexChanged (int index) noexcept
 

Private Member Functions

void searchComponents (const QString &input)
 
void setSelectedCategory (const tl::optional< Uuid > &categoryUuid)
 
void setSelectedComponent (const library::Component *cmp)
 
void setSelectedSymbVar (const library::ComponentSymbolVariant *symbVar)
 
void setSelectedDevice (const library::Device *dev)
 
void accept () noexcept
 

Private Attributes

workspace::WorkspacemWorkspace
 
ProjectmProject
 
Ui::AddComponentDialog * mUi
 
GraphicsScenemComponentPreviewScene
 
GraphicsScenemDevicePreviewScene
 
QScopedPointer
< DefaultGraphicsLayerProvider
mGraphicsLayerProvider
 
workspace::ComponentCategoryTreeModelmCategoryTreeModel
 
tl::optional< UuidmSelectedCategoryUuid
 
const library::ComponentmSelectedComponent
 
const
library::ComponentSymbolVariant
mSelectedSymbVar
 
const library::DevicemSelectedDevice
 
const library::PackagemSelectedPackage
 
QList
< library::SymbolPreviewGraphicsItem * > 
mPreviewSymbolGraphicsItems
 
library::FootprintPreviewGraphicsItemmPreviewFootprintGraphicsItem
 

Detailed Description

The AddComponentDialog class.

Todo:
This class is VERY provisional!
Author
ubruhin
Date
2015-02-16

Constructor & Destructor Documentation

AddComponentDialog ( workspace::Workspace workspace,
Project project,
QWidget *  parent = nullptr 
)
explicit

+ Here is the call graph for this function:

~AddComponentDialog ( )
noexcept

Member Function Documentation

tl::optional< Uuid > getSelectedComponentUuid ( ) const
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

tl::optional< Uuid > getSelectedSymbVarUuid ( ) const
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

tl::optional< Uuid > getSelectedDeviceUuid ( ) const
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void searchEditTextChanged ( const QString &  text)
privateslotnoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void treeCategories_currentItemChanged ( const QModelIndex &  current,
const QModelIndex &  previous 
)
privateslotnoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void treeComponents_currentItemChanged ( QTreeWidgetItem *  current,
QTreeWidgetItem *  previous 
)
privateslotnoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void treeComponents_itemDoubleClicked ( QTreeWidgetItem *  item,
int  column 
)
privateslotnoexcept

+ Here is the caller graph for this function:

void on_cbxSymbVar_currentIndexChanged ( int  index)
privateslotnoexcept

+ Here is the call graph for this function:

void searchComponents ( const QString &  input)
private

+ Here is the call graph for this function:

void setSelectedCategory ( const tl::optional< Uuid > &  categoryUuid)
private

+ Here is the call graph for this function:

void setSelectedComponent ( const library::Component cmp)
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void setSelectedSymbVar ( const library::ComponentSymbolVariant symbVar)
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void setSelectedDevice ( const library::Device dev)
private

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void accept ( )
privatenoexcept

Member Data Documentation

workspace::Workspace& mWorkspace
private
Project& mProject
private
Ui::AddComponentDialog* mUi
private
GraphicsScene* mComponentPreviewScene
private
GraphicsScene* mDevicePreviewScene
private
QScopedPointer<DefaultGraphicsLayerProvider> mGraphicsLayerProvider
private
workspace::ComponentCategoryTreeModel* mCategoryTreeModel
private
tl::optional<Uuid> mSelectedCategoryUuid
private
const library::Component* mSelectedComponent
private
const library::ComponentSymbolVariant* mSelectedSymbVar
private
const library::Device* mSelectedDevice
private
const library::Package* mSelectedPackage
private
QList<library::SymbolPreviewGraphicsItem*> mPreviewSymbolGraphicsItems
private
library::FootprintPreviewGraphicsItem* mPreviewFootprintGraphicsItem
private

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