A QTableView subclass which adds buttons to edit the underlying model.
More...
#include <editabletablewidget.h>
Inherits QTableView.
|
virtual bool | edit (const QModelIndex &index, EditTrigger trigger, QEvent *event) override |
|
virtual void | currentChanged (const QModelIndex ¤t, const QModelIndex &previous) override |
|
virtual void | rowsInserted (const QModelIndex &parent, int start, int end) override |
|
|
typedef void(EditableTableWidget::* | Signal) (const QPersistentModelIndex &) |
|
|
void | updateCanRemove () noexcept |
|
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 &itemIndex, bool doesModify, bool doesRemove) noexcept |
|
void | buttonClickedHandler (Signal clickedSignal, const QPersistentModelIndex &itemIndex) noexcept |
|
A QTableView subclass which adds buttons to edit the underlying model.
◆ Signal
typedef void(EditableTableWidget::* Signal) (const QPersistentModelIndex &) |
|
private |
◆ EditableTableWidget() [1/2]
◆ EditableTableWidget() [2/2]
◆ ~EditableTableWidget()
◆ setModel()
void setModel |
( |
QAbstractItemModel * |
model | ) |
|
|
overridevirtualnoexcept |
◆ setReadOnly()
void setReadOnly |
( |
bool |
readOnly | ) |
|
|
noexcept |
◆ setAddButtonOnLastRow()
void setAddButtonOnLastRow |
( |
bool |
btn | ) |
|
|
inlinenoexcept |
◆ setShowCopyButton()
void setShowCopyButton |
( |
bool |
show | ) |
|
|
inlinenoexcept |
◆ setShowEditButton()
void setShowEditButton |
( |
bool |
show | ) |
|
|
inlinenoexcept |
◆ setShowMoveButtons()
void setShowMoveButtons |
( |
bool |
show | ) |
|
|
inlinenoexcept |
◆ setBrowseButtonColumn()
void setBrowseButtonColumn |
( |
int |
col | ) |
|
|
inlinenoexcept |
◆ setMinimumRowCount()
void setMinimumRowCount |
( |
int |
count | ) |
|
|
noexcept |
◆ reset()
◆ operator=()
◆ edit()
bool edit |
( |
const QModelIndex & |
index, |
|
|
EditTrigger |
trigger, |
|
|
QEvent * |
event |
|
) |
| |
|
overrideprotectedvirtual |
◆ currentChanged()
void currentChanged |
( |
const QModelIndex & |
current, |
|
|
const QModelIndex & |
previous |
|
) |
| |
|
overrideprotectedvirtual |
◆ rowsInserted()
void rowsInserted |
( |
const QModelIndex & |
parent, |
|
|
int |
start, |
|
|
int |
end |
|
) |
| |
|
overrideprotectedvirtual |
◆ readOnlyChanged
void readOnlyChanged |
( |
bool |
readOnly | ) |
|
|
signal |
◆ canRemoveChanged
void canRemoveChanged |
( |
bool |
canRemove | ) |
|
|
signal |
◆ currentRowChanged
void currentRowChanged |
( |
int |
row | ) |
|
|
signal |
◆ btnAddClicked
void btnAddClicked |
( |
const QPersistentModelIndex & |
itemIndex | ) |
|
|
signal |
◆ btnRemoveClicked
void btnRemoveClicked |
( |
const QPersistentModelIndex & |
itemIndex | ) |
|
|
signal |
◆ btnCopyClicked
void btnCopyClicked |
( |
const QPersistentModelIndex & |
itemIndex | ) |
|
|
signal |
◆ btnEditClicked
void btnEditClicked |
( |
const QPersistentModelIndex & |
itemIndex | ) |
|
|
signal |
◆ btnMoveUpClicked
void btnMoveUpClicked |
( |
const QPersistentModelIndex & |
itemIndex | ) |
|
|
signal |
◆ btnMoveDownClicked
void btnMoveDownClicked |
( |
const QPersistentModelIndex & |
itemIndex | ) |
|
|
signal |
◆ btnBrowseClicked
void btnBrowseClicked |
( |
const QPersistentModelIndex & |
itemIndex | ) |
|
|
signal |
◆ updateCanRemove()
◆ installButtons()
void installButtons |
( |
int |
row | ) |
|
|
privatenoexcept |
◆ createButton()
QToolButton * createButton |
( |
const QString & |
objectName, |
|
|
const QIcon & |
icon, |
|
|
const QString & |
text, |
|
|
const QString & |
toolTip, |
|
|
int |
width, |
|
|
int |
height, |
|
|
Signal |
clickedSignal, |
|
|
const QPersistentModelIndex & |
itemIndex, |
|
|
bool |
doesModify, |
|
|
bool |
doesRemove |
|
) |
| |
|
privatenoexcept |
◆ buttonClickedHandler()
void buttonClickedHandler |
( |
Signal |
clickedSignal, |
|
|
const QPersistentModelIndex & |
itemIndex |
|
) |
| |
|
privatenoexcept |
◆ mAddButtonOnLastRow
◆ mShowCopyButton
◆ mShowEditButton
◆ mShowMoveButtons
◆ mBrowseButtonColumn
◆ mMinimumRowCount
◆ mCanRemove
◆ mReadOnly
◆ mActionAddRow
QScopedPointer<QAction> mActionAddRow |
|
private |
◆ mActionRemoveRow
QScopedPointer<QAction> mActionRemoveRow |
|
private |
◆ mRowsRemovedConnection
QMetaObject::Connection mRowsRemovedConnection |
|
private |
The documentation for this class was generated from the following files: