Cleanups in ui.
This commit is contained in:
@@ -44,6 +44,14 @@ BCValueModel::BCValueModel(QObject *parent)
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Setzt den Headerlabel ( == die Devicebezeichnung )
|
||||
* @param headerLabel
|
||||
*/
|
||||
void BCValueModel::setHeaderLabel( const QString& headerLabel )
|
||||
{
|
||||
_headerLabel = headerLabel;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Einen Einzelwert hinzufügen
|
||||
@@ -145,18 +153,10 @@ int BCValueModel::columnCount(const QModelIndex& parent) const
|
||||
|
||||
QVariant BCValueModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||
{
|
||||
if (role != Qt::DisplayRole || orientation != Qt::Horizontal)
|
||||
if (role != Qt::DisplayRole || orientation != Qt::Horizontal || section != 0)
|
||||
return QVariant();
|
||||
|
||||
switch (section)
|
||||
{
|
||||
case 0:
|
||||
return BCTags::LabelTag;
|
||||
case 1:
|
||||
return BCTags::ValueTag;
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
return _headerLabel;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user