Cleanups in ui.

This commit is contained in:
2025-12-29 23:29:56 +01:00
parent 60be19a6ae
commit 679bff5e26
12 changed files with 119 additions and 220 deletions

View File

@@ -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;
}