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

The AttributeListEditorWidget class. More...

#include <attributelisteditorwidget.h>

Inherits QWidget.

+ Collaboration diagram for AttributeListEditorWidget:

Signals

void edited (const AttributeList &attributes)
 

Public Member Functions

 AttributeListEditorWidget (QWidget *parent=nullptr) noexcept
 
 AttributeListEditorWidget (const AttributeListEditorWidget &other)=delete
 
 ~AttributeListEditorWidget () noexcept
 
const AttributeListgetAttributeList () const noexcept
 
void setAttributeList (const AttributeList &list) noexcept
 
AttributeListEditorWidgetoperator= (const AttributeListEditorWidget &rhs)=delete
 

Private Types

enum  Column
 

Private Member Functions

void currentCellChanged (int currentRow, int currentColumn, int previousRow, int previousColumn) noexcept
 
void tableCellChanged (int row, int column) noexcept
 
void attributeTypeChanged (const AttributeType *type) noexcept
 
void attributeUnitChanged (const AttributeUnit *unit) noexcept
 
void btnAddRemoveClicked () noexcept
 
void btnUpClicked () noexcept
 
void btnDownClicked () noexcept
 
void updateTable (const Attribute *selected=nullptr) noexcept
 
void setTableRowContent (int row, const QString &key, const AttributeType &type, const QString &value, const AttributeUnit *unit) noexcept
 
void getTableRowContent (int row, QString &key, const AttributeType *&type, QString &value, const AttributeUnit *&unit) const noexcept
 
void addAttribute (const QString &key, const AttributeType &type, const QString &value, const AttributeUnit *unit) noexcept
 
void removeAttribute (int index) noexcept
 
void moveAttributeUp (int index) noexcept
 
void moveAttributeDown (int index) noexcept
 
AttributeKey setKey (int index, const QString &key) noexcept
 
void setType (int index, const AttributeType &type) noexcept
 
QString setValue (int index, const QString &value) noexcept
 
void setUnit (int index, const AttributeUnit *unit) noexcept
 
int getRowOfTableCellWidget (QObject *obj) const noexcept
 
AttributeKey convertStringToKeyOrThrow (const QString &key) const
 
void throwIfValueInvalid (const AttributeType &type, const QString &value) const
 
int newAttributeRow () const noexcept
 
int indexToRow (int index) const noexcept
 
int rowToIndex (int row) const noexcept
 
bool isExistingAttributeRow (int row) const noexcept
 
bool isNewAttributeRow (int row) const noexcept
 

Private Attributes

QTableWidget * mTable
 
AttributeList mAttributeList
 
const AttributemSelectedAttribute
 do NOT dereference it (could be dangling)! More...
 

Detailed Description

The AttributeListEditorWidget class.

Author
ubruhin
Date
2017-03-10

Member Enumeration Documentation

enum Column
private
Enumerator
COLUMN_KEY 
COLUMN_TYPE 
COLUMN_VALUE 
COLUMN_UNIT 
COLUMN_BUTTONS 
_COLUMN_COUNT 

Constructor & Destructor Documentation

AttributeListEditorWidget ( QWidget *  parent = nullptr)
explicitnoexcept

+ Here is the call graph for this function:

Member Function Documentation

const AttributeList& getAttributeList ( ) const
inlinenoexcept
void setAttributeList ( const AttributeList list)
noexcept
AttributeListEditorWidget& operator= ( const AttributeListEditorWidget rhs)
delete
void edited ( const AttributeList attributes)
signal

+ Here is the caller graph for this function:

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

+ Here is the caller graph for this function:

void tableCellChanged ( int  row,
int  column 
)
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void attributeTypeChanged ( const AttributeType type)
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void attributeUnitChanged ( const AttributeUnit unit)
privatenoexcept

+ 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 updateTable ( const Attribute selected = nullptr)
privatenoexcept

+ Here is the call graph for this function:

void setTableRowContent ( int  row,
const QString &  key,
const AttributeType type,
const QString &  value,
const AttributeUnit unit 
)
privatenoexcept

+ Here is the call graph for this function:

void getTableRowContent ( int  row,
QString &  key,
const AttributeType *&  type,
QString &  value,
const AttributeUnit *&  unit 
) const
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void addAttribute ( const QString &  key,
const AttributeType type,
const QString &  value,
const AttributeUnit unit 
)
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void removeAttribute ( int  index)
privatenoexcept

+ Here is the caller graph for this function:

void moveAttributeUp ( int  index)
privatenoexcept

+ Here is the caller graph for this function:

void moveAttributeDown ( int  index)
privatenoexcept

+ Here is the caller graph for this function:

AttributeKey setKey ( int  index,
const QString &  key 
)
privatenoexcept

+ Here is the call graph for this function:

void setType ( int  index,
const AttributeType type 
)
privatenoexcept

+ Here is the call graph for this function:

QString setValue ( int  index,
const QString &  value 
)
privatenoexcept

+ Here is the call graph for this function:

void setUnit ( int  index,
const AttributeUnit unit 
)
privatenoexcept

+ Here is the call graph for this function:

int getRowOfTableCellWidget ( QObject *  obj) const
privatenoexcept

+ Here is the caller graph for this function:

AttributeKey convertStringToKeyOrThrow ( const QString &  key) const
private

+ Here is the call graph for this function:

void throwIfValueInvalid ( const AttributeType type,
const QString &  value 
) const
private

+ Here is the call graph for this function:

int newAttributeRow ( ) const
inlineprivatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int indexToRow ( int  index) const
inlineprivatenoexcept
int rowToIndex ( int  row) const
inlineprivatenoexcept

+ Here is the caller graph for this function:

bool isExistingAttributeRow ( int  row) const
inlineprivatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool isNewAttributeRow ( 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
AttributeList mAttributeList
private
const Attribute* mSelectedAttribute
private

do NOT dereference it (could be dangling)!


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