LibrePCB Developers Documentation
EditableTableWidget Class Reference

A QTableView subclass which adds buttons to edit the underlying model. More...

#include <editabletablewidget.h>

Inherits QTableView.

+ Collaboration diagram for EditableTableWidget:

Signals

void currentRowChanged (int row)
 
void btnAddClicked (const QVariant &data)
 
void btnRemoveClicked (const QVariant &data)
 
void btnCopyClicked (const QVariant &data)
 
void btnEditClicked (const QVariant &data)
 
void btnMoveUpClicked (const QVariant &data)
 
void btnMoveDownClicked (const QVariant &data)
 
void btnBrowseClicked (const QVariant &data)
 

Public Member Functions

 EditableTableWidget (QWidget *parent=nullptr) noexcept
 
 EditableTableWidget (const EditableTableWidget &other)=delete
 
virtual ~EditableTableWidget () noexcept
 
void setShowCopyButton (bool show) noexcept
 
void setShowEditButton (bool show) noexcept
 
void setShowMoveButtons (bool show) noexcept
 
void setBrowseButtonColumn (int col) noexcept
 
virtual void reset () override
 
EditableTableWidgetoperator= (const EditableTableWidget &rhs)=delete
 

Protected Member Functions

virtual void currentChanged (const QModelIndex &current, const QModelIndex &previous) override
 
virtual void rowsInserted (const QModelIndex &parent, int start, int end) override
 

Private Types

typedef void(EditableTableWidget::* Signal) (const QVariant &data)
 

Private Member Functions

void installButtons (int row) noexcept
 
QToolButton * createButton (const QString &objectName, const QIcon &icon, const QString &text, const QString &toolTip, int width, int height, Signal clickedSignal, const QPersistentModelIndex &index) noexcept
 
void buttonClickedHandler (Signal clickedSignal, const QPersistentModelIndex &index) noexcept
 

Private Attributes

bool mShowCopyButton
 
bool mShowEditButton
 
bool mShowMoveButtons
 
int mBrowseButtonColumn
 

Detailed Description

A QTableView subclass which adds buttons to edit the underlying model.

Member Typedef Documentation

◆ Signal

typedef void(EditableTableWidget::* Signal) (const QVariant &data)
private

Constructor & Destructor Documentation

◆ EditableTableWidget() [1/2]

EditableTableWidget ( QWidget *  parent = nullptr)
explicitnoexcept

◆ EditableTableWidget() [2/2]

EditableTableWidget ( const EditableTableWidget other)
delete

◆ ~EditableTableWidget()

~EditableTableWidget ( )
virtualnoexcept

Member Function Documentation

◆ setShowCopyButton()

void setShowCopyButton ( bool  show)
inlinenoexcept

◆ setShowEditButton()

void setShowEditButton ( bool  show)
inlinenoexcept

◆ setShowMoveButtons()

void setShowMoveButtons ( bool  show)
inlinenoexcept

◆ setBrowseButtonColumn()

void setBrowseButtonColumn ( int  col)
inlinenoexcept
+ Here is the call graph for this function:

◆ reset()

void reset ( )
overridevirtual
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

EditableTableWidget& operator= ( const EditableTableWidget rhs)
delete
+ Here is the caller graph for this function:

◆ currentChanged()

void currentChanged ( const QModelIndex &  current,
const QModelIndex &  previous 
)
overrideprotectedvirtual
+ Here is the caller graph for this function:

◆ rowsInserted()

void rowsInserted ( const QModelIndex &  parent,
int  start,
int  end 
)
overrideprotectedvirtual
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ currentRowChanged

void currentRowChanged ( int  row)
signal
+ Here is the caller graph for this function:

◆ btnAddClicked

void btnAddClicked ( const QVariant &  data)
signal
+ Here is the caller graph for this function:

◆ btnRemoveClicked

void btnRemoveClicked ( const QVariant &  data)
signal
+ Here is the caller graph for this function:

◆ btnCopyClicked

void btnCopyClicked ( const QVariant &  data)
signal
+ Here is the caller graph for this function:

◆ btnEditClicked

void btnEditClicked ( const QVariant &  data)
signal
+ Here is the caller graph for this function:

◆ btnMoveUpClicked

void btnMoveUpClicked ( const QVariant &  data)
signal
+ Here is the caller graph for this function:

◆ btnMoveDownClicked

void btnMoveDownClicked ( const QVariant &  data)
signal
+ Here is the caller graph for this function:

◆ btnBrowseClicked

void btnBrowseClicked ( const QVariant &  data)
signal
+ Here is the caller graph for this function:

◆ installButtons()

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

◆ createButton()

QToolButton * createButton ( const QString &  objectName,
const QIcon &  icon,
const QString &  text,
const QString &  toolTip,
int  width,
int  height,
Signal  clickedSignal,
const QPersistentModelIndex &  index 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buttonClickedHandler()

void buttonClickedHandler ( Signal  clickedSignal,
const QPersistentModelIndex &  index 
)
privatenoexcept
+ Here is the caller graph for this function:

Member Data Documentation

◆ mShowCopyButton

bool mShowCopyButton
private

◆ mShowEditButton

bool mShowEditButton
private

◆ mShowMoveButtons

bool mShowMoveButtons
private

◆ mBrowseButtonColumn

int mBrowseButtonColumn
private

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