QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
QgsTableWidgetBase Class Reference

Base widget allowing editing a collection, using a table. More...

#include <qgstablewidgetbase.h>

Inheritance diagram for QgsTableWidgetBase:

Public Slots

virtual void setReadOnly (bool readOnly)
 Sets whether the widget should be shown in a read-only state.

Signals

void valueChanged ()
 Emitted each time a key or a value is changed.

Public Member Functions

 QgsTableWidgetBase (QWidget *parent)
 Constructor.
bool isReadOnly () const
 Returns true if the widget is shown in a read-only state.

Protected Member Functions

void init (QAbstractTableModel *model)
 Initialize the table with the given model.

Friends

class TestQgsKeyValueWidget
class TestQgsListWidget

Detailed Description

Base widget allowing editing a collection, using a table.

This widget includes buttons to add and remove rows. Child classes must call init(QAbstractTableModel*) from their constructor.

Definition at line 34 of file qgstablewidgetbase.h.

Constructor & Destructor Documentation

◆ QgsTableWidgetBase()

QgsTableWidgetBase::QgsTableWidgetBase ( QWidget * parent)
explicit

Constructor.

Definition at line 20 of file qgstablewidgetbase.cpp.

Member Function Documentation

◆ init()

void QgsTableWidgetBase::init ( QAbstractTableModel * model)
protected

Initialize the table with the given model.

Must be called once in the child class' constructor.

Definition at line 28 of file qgstablewidgetbase.cpp.

◆ isReadOnly()

bool QgsTableWidgetBase::isReadOnly ( ) const
inline

Returns true if the widget is shown in a read-only state.

See also
setReadOnly()
Since
QGIS 3.38

Definition at line 49 of file qgstablewidgetbase.h.

◆ setReadOnly

void QgsTableWidgetBase::setReadOnly ( bool readOnly)
virtualslot

Sets whether the widget should be shown in a read-only state.

See also
isReadOnly()
Since
QGIS 3.38

Definition at line 70 of file qgstablewidgetbase.cpp.

◆ valueChanged

void QgsTableWidgetBase::valueChanged ( )
signal

Emitted each time a key or a value is changed.

◆ TestQgsKeyValueWidget

friend class TestQgsKeyValueWidget
friend

Definition at line 95 of file qgstablewidgetbase.h.

◆ TestQgsListWidget

friend class TestQgsListWidget
friend

Definition at line 96 of file qgstablewidgetbase.h.


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