QtPdCom  1.5.2
QtPdCom::TableColumn Class Reference

Table Column. More...

#include <TableColumn.h>

Inheritance diagram for QtPdCom::TableColumn:
Collaboration diagram for QtPdCom::TableColumn:

Classes

struct  Exception
 Exception type. More...
 

Public Types

enum  Roles {
  HighlightRole = Qt::UserRole + 1 , ValidRole , IsEnabledRole , IsEditingRole ,
  DecimalsRole , LowerLimitRole , UpperLimitRole
}
 

Signals

void dimensionChanged ()
 
void headerChanged ()
 
void valueChanged ()
 

Public Member Functions

 TableColumn (const QString &=QString(), QObject *parent=nullptr)
 Constructor.
 
 ~TableColumn ()
 Destructor.
 
void setHeader (const QString &)
 Sets the column header.
 
const QString & getHeader () const
 
void setVariable (PdCom::Variable, const Transmission &=QtPdCom::event_mode, double=1.0, double=0.0)
 Subscribes to a ProcessVariable.
 
void setVariable (PdCom::Process *, const QString &, const Transmission &=QtPdCom::event_mode, double=1.0, double=0.0)
 Subscribes to a ProcessVariable.
 
void clearVariable ()
 Unsubscribe from a Variable.
 
void clearData ()
 
quint32 getDecimals () const
 Returns the number of decimals.
 
void setDecimals (quint32)
 Sets the number of decimals.
 
double getLowerLimit () const
 Limits are hints for the input delegate.
 
void setLowerLimit (double)
 Sets the lowerlimit for the values of the col.
 
double getUpperLimit () const
 Returns the upperlimit for the values of the col.
 
void setUpperLimit (double)
 Sets the upperlimit for the values of the col.
 
unsigned int getRows () const
 Get number of rows.
 
QVariant data (unsigned int, int) const
 Get display text.
 
QVariant headerData (int) const
 Get header data.
 
Qt::ItemFlags flags (unsigned int) const
 Implements the Model interface.
 
bool setData (unsigned int, const QString &, int)
 Set an edit value.
 
void setEnabled (bool, int=-1)
 Set enabled for a column.
 
bool isEditing () const
 
bool isEnabled () const
 
void commit ()
 Write edited data to the process.
 
void revert ()
 Reverts all edited values.
 
void setHighlightRow (int)
 
void setHighlightColor (QColor)
 
void setDisabledColor (QColor)
 
 Q_ENUM (Roles)
 

Private Attributes

class Q_DECL_HIDDEN Impl
 
std::unique_ptr< Impl > impl
 

Friends

class TableModel
 

Detailed Description

Table Column.

Member Enumeration Documentation

◆ Roles

Enumerator
HighlightRole 

row is highlightRow

ValidRole 

element is not valid due to columncount < nelem

IsEnabledRole 
IsEditingRole 
DecimalsRole 
LowerLimitRole 
UpperLimitRole 

Constructor & Destructor Documentation

◆ TableColumn()

TableColumn::TableColumn ( const QString & header = QString(),
QObject * parent = nullptr )

Constructor.

References Impl.

◆ ~TableColumn()

TableColumn::~TableColumn ( )

Destructor.

Member Function Documentation

◆ clearData()

void TableColumn::clearData ( )

References impl, and valueChanged().

◆ clearVariable()

void TableColumn::clearVariable ( )

Unsubscribe from a Variable.

References dimensionChanged(), impl, and valueChanged().

Referenced by setVariable(), and setVariable().

◆ commit()

void TableColumn::commit ( )

Write edited data to the process.

References impl, and valueChanged().

◆ data()

QVariant TableColumn::data ( unsigned int row,
int role ) const

◆ dimensionChanged

void QtPdCom::TableColumn::dimensionChanged ( )
signal

◆ flags()

Qt::ItemFlags TableColumn::flags ( unsigned int row) const

Implements the Model interface.

References impl.

◆ getDecimals()

quint32 TableColumn::getDecimals ( ) const

Returns the number of decimals.

References impl.

Referenced by data().

◆ getHeader()

const QString & TableColumn::getHeader ( ) const

References impl.

◆ getLowerLimit()

double TableColumn::getLowerLimit ( ) const

Limits are hints for the input delegate.

Returns the lowerlimit for the values of the col.

References impl.

Referenced by data().

◆ getRows()

unsigned int TableColumn::getRows ( ) const

Get number of rows.

References impl.

Referenced by QtPdCom::TableModel::valueChanged().

◆ getUpperLimit()

double TableColumn::getUpperLimit ( ) const

Returns the upperlimit for the values of the col.

References impl.

Referenced by data().

◆ headerChanged

void QtPdCom::TableColumn::headerChanged ( )
signal

Referenced by setHeader().

◆ headerData()

QVariant TableColumn::headerData ( int role) const

Get header data.

References impl.

◆ isEditing()

bool TableColumn::isEditing ( ) const

References impl.

Referenced by data().

◆ isEnabled()

bool TableColumn::isEnabled ( ) const

References impl.

Referenced by data().

◆ Q_ENUM()

QtPdCom::TableColumn::Q_ENUM ( Roles )

◆ revert()

void TableColumn::revert ( )

Reverts all edited values.

References impl, and valueChanged().

◆ setData()

bool TableColumn::setData ( unsigned int row,
const QString & valueString,
int role )

Set an edit value.

References data(), impl, and valueChanged().

◆ setDecimals()

void TableColumn::setDecimals ( quint32 value)

Sets the number of decimals.

References impl, and valueChanged().

◆ setDisabledColor()

void TableColumn::setDisabledColor ( QColor dc)

References impl, and valueChanged().

◆ setEnabled()

void TableColumn::setEnabled ( bool value,
int row = -1 )

Set enabled for a column.

References impl, and valueChanged().

◆ setHeader()

void TableColumn::setHeader ( const QString & h)

Sets the column header.

References headerChanged(), and impl.

◆ setHighlightColor()

void TableColumn::setHighlightColor ( QColor hc)

References impl, and valueChanged().

◆ setHighlightRow()

void TableColumn::setHighlightRow ( int value)

References impl, and valueChanged().

◆ setLowerLimit()

void TableColumn::setLowerLimit ( double value)

Sets the lowerlimit for the values of the col.

References impl, and valueChanged().

◆ setUpperLimit()

void TableColumn::setUpperLimit ( double value)

Sets the upperlimit for the values of the col.

References impl, and valueChanged().

◆ setVariable() [1/2]

void TableColumn::setVariable ( PdCom::Process * process,
const QString & path,
const Transmission & transmission = QtPdCom::event_mode,
double scale = 1.0,
double offset = 0.0 )

Subscribes to a ProcessVariable.

References clearVariable(), dimensionChanged(), impl, QtPdCom::Transmission::toString(), and valueChanged().

◆ setVariable() [2/2]

void TableColumn::setVariable ( PdCom::Variable pv,
const Transmission & transmission = QtPdCom::event_mode,
double scale = 1.0,
double offset = 0.0 )

Subscribes to a ProcessVariable.

References clearVariable(), dimensionChanged(), impl, QtPdCom::Transmission::toString(), and valueChanged().

◆ valueChanged

Friends And Related Symbol Documentation

◆ TableModel

friend class TableModel
friend

Member Data Documentation

◆ Impl

class Q_DECL_HIDDEN QtPdCom::TableColumn::Impl
private

Referenced by TableColumn().

◆ impl


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