QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Public Slots | Signals | Public Member Functions | Protected Member Functions | Friends | List of all members
QgsTableWidgetBase Class Reference

Base widget allowing to edit a collection, using a table. More...

#include <qgstablewidgetbase.h>

Inheritance diagram for QgsTableWidgetBase:
Inheritance graph
[legend]

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 to edit 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 32 of file qgstablewidgetbase.h.

Constructor & Destructor Documentation

◆ QgsTableWidgetBase()

QgsTableWidgetBase::QgsTableWidgetBase ( QWidget *  parent)
explicit

Constructor.

Definition at line 19 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 27 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 48 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 69 of file qgstablewidgetbase.cpp.

◆ valueChanged

void QgsTableWidgetBase::valueChanged ( )
signal

Emitted each time a key or a value is changed.

Friends And Related Symbol Documentation

◆ TestQgsKeyValueWidget

friend class TestQgsKeyValueWidget
friend

Definition at line 96 of file qgstablewidgetbase.h.

◆ TestQgsListWidget

friend class TestQgsListWidget
friend

Definition at line 97 of file qgstablewidgetbase.h.


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