Reworked value handling.
This commit is contained in:
@@ -148,12 +148,12 @@ QVariant BCValueModel::data(const QModelIndex& index, int role) const
|
||||
const BCValue& value = *(_valueList.at( row ).get());
|
||||
|
||||
if( col == 0 )
|
||||
return value.getLabel();
|
||||
return value.label();
|
||||
|
||||
if( col == 1)
|
||||
{
|
||||
if( role == Qt::DisplayRole )
|
||||
return QString("%1 %2").arg( value.formatValue(), value.getUnitLabel());
|
||||
return QString("%1 %2").arg( value.formatValue(), value.unitLabel());
|
||||
|
||||
return value.formatValue();
|
||||
}
|
||||
@@ -183,6 +183,9 @@ bool BCValueModel::setData(const QModelIndex& index, const QVariant& variant, in
|
||||
{
|
||||
if (index.isValid() && role == Qt::EditRole)
|
||||
{
|
||||
|
||||
qDebug() << " --- SetData: at: " << index.row() << " --- set: " << variant.toString();
|
||||
|
||||
BCValuePtr value = _valueList[index.row()];
|
||||
|
||||
// Wir erwarten hier nur den Value-Teil (vom Slider/Editor)
|
||||
|
||||
Reference in New Issue
Block a user