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

The ComponentSymbolVariantListWidget class. More...

#include <componentsymbolvariantlistwidget.h>

+ Inheritance diagram for ComponentSymbolVariantListWidget:
+ Collaboration diagram for ComponentSymbolVariantListWidget:

Public Member Functions

 ComponentSymbolVariantListWidget (QWidget *parent=nullptr) noexcept
 
 ComponentSymbolVariantListWidget (const ComponentSymbolVariantListWidget &other)=delete
 
 ~ComponentSymbolVariantListWidget () noexcept
 
void setReferences (UndoStack *undoStack, ComponentSymbolVariantList *variants, IF_ComponentSymbolVariantEditorProvider *editorProvider) noexcept
 
void addDefaultSymbolVariant ()
 
ComponentSymbolVariantListWidgetoperator= (const ComponentSymbolVariantListWidget &rhs)=delete
 

Private Types

enum  Column
 

Private Member Functions

void currentCellChanged (int currentRow, int currentColumn, int previousRow, int previousColumn) noexcept
 
void cellDoubleClicked (int row, int column) noexcept
 
void btnEditClicked () noexcept
 
void btnAddRemoveClicked () noexcept
 
void btnUpClicked () noexcept
 
void btnDownClicked () noexcept
 
void listObjectAdded (const ComponentSymbolVariantList &list, int newIndex, const std::shared_ptr< ComponentSymbolVariant > &ptr) noexceptoverride
 
void listObjectRemoved (const ComponentSymbolVariantList &list, int oldIndex, const std::shared_ptr< ComponentSymbolVariant > &ptr) noexceptoverride
 
void updateTable () noexcept
 
void setTableRowContent (int row, const tl::optional< Uuid > &uuid, const QString &name, const QString &desc, const QString &norm, int symbolCount) noexcept
 
void addVariant (const QString &name, const QString &desc, const QString &norm) noexcept
 
void removeVariant (const Uuid &uuid) noexcept
 
void moveVariantUp (int index) noexcept
 
void moveVariantDown (int index) noexcept
 
void editVariant (const Uuid &uuid) noexcept
 
int getRowOfTableCellWidget (QObject *obj) const noexcept
 
tl::optional< UuidgetUuidOfRow (int row) const noexcept
 
bool allReferencesValid () const noexcept
 
int newVariantRow () const noexcept
 
int indexToRow (int index) const noexcept
 
int rowToIndex (int row) const noexcept
 
bool isExistingVariantRow (int row) const noexcept
 
bool isNewVariantRow (int row) const noexcept
 
- Private Member Functions inherited from SerializableObjectList< T, P >::IF_Observer
virtual void listObjectAdded (const SerializableObjectList< T, P > &list, int newIndex, const std::shared_ptr< T > &ptr) noexcept=0
 
virtual void listObjectRemoved (const SerializableObjectList< T, P > &list, int oldIndex, const std::shared_ptr< T > &ptr) noexcept=0
 

Private Attributes

QTableWidget * mTable
 
UndoStackmUndoStack
 
ComponentSymbolVariantListmVariantList
 
IF_ComponentSymbolVariantEditorProvidermEditorProvider
 
tl::optional< UuidmSelectedVariant
 

Detailed Description

The ComponentSymbolVariantListWidget class.

Author
ubruhin
Date
2017-03-18

Member Enumeration Documentation

enum Column
private
Enumerator
COLUMN_NAME 
COLUMN_DESCRIPTION 
COLUMN_NORM 
COLUMN_SYMBOLCOUNT 
COLUMN_BUTTONS 
_COLUMN_COUNT 

Constructor & Destructor Documentation

ComponentSymbolVariantListWidget ( QWidget *  parent = nullptr)
explicitnoexcept

+ Here is the call graph for this function:

+ Here is the call graph for this function:

Member Function Documentation

void setReferences ( UndoStack undoStack,
ComponentSymbolVariantList variants,
IF_ComponentSymbolVariantEditorProvider editorProvider 
)
noexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void addDefaultSymbolVariant ( )

+ Here is the call graph for this function:

void currentCellChanged ( int  currentRow,
int  currentColumn,
int  previousRow,
int  previousColumn 
)
privatenoexcept

+ Here is the caller graph for this function:

void cellDoubleClicked ( int  row,
int  column 
)
privatenoexcept

+ Here is the caller graph for this function:

void btnEditClicked ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void btnAddRemoveClicked ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void btnUpClicked ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void btnDownClicked ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void listObjectAdded ( const ComponentSymbolVariantList list,
int  newIndex,
const std::shared_ptr< ComponentSymbolVariant > &  ptr 
)
overrideprivatenoexcept

+ Here is the call graph for this function:

void listObjectRemoved ( const ComponentSymbolVariantList list,
int  oldIndex,
const std::shared_ptr< ComponentSymbolVariant > &  ptr 
)
overrideprivatenoexcept

+ Here is the call graph for this function:

void updateTable ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void setTableRowContent ( int  row,
const tl::optional< Uuid > &  uuid,
const QString &  name,
const QString &  desc,
const QString &  norm,
int  symbolCount 
)
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void addVariant ( const QString &  name,
const QString &  desc,
const QString &  norm 
)
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void removeVariant ( const Uuid uuid)
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void moveVariantUp ( int  index)
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void moveVariantDown ( int  index)
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void editVariant ( const Uuid uuid)
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int getRowOfTableCellWidget ( QObject *  obj) const
privatenoexcept

+ Here is the caller graph for this function:

tl::optional< Uuid > getUuidOfRow ( int  row) const
privatenoexcept

+ Here is the caller graph for this function:

bool allReferencesValid ( ) const
inlineprivatenoexcept

+ Here is the caller graph for this function:

int newVariantRow ( ) const
inlineprivatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int indexToRow ( int  index) const
inlineprivatenoexcept

+ Here is the caller graph for this function:

int rowToIndex ( int  row) const
inlineprivatenoexcept

+ Here is the caller graph for this function:

bool isExistingVariantRow ( int  row) const
inlineprivatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool isNewVariantRow ( int  row) const
inlineprivatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

QTableWidget* mTable
private
UndoStack* mUndoStack
private
ComponentSymbolVariantList* mVariantList
private
IF_ComponentSymbolVariantEditorProvider* mEditorProvider
private
tl::optional<Uuid> mSelectedVariant
private

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