Mini-Breakthrough: Animantion works.

This commit is contained in:
2025-12-29 20:10:05 +01:00
parent 4491e6fe57
commit 60be19a6ae
11 changed files with 282 additions and 284 deletions

View File

@@ -31,7 +31,7 @@
#include <bcdevicepanel.h>
#include <bcdelegate.h>
#include <bcitemdelegate.h>
BCDevicePanel::BCDevicePanel(QWidget *parent)
: QWidget(parent)
@@ -41,8 +41,10 @@ BCDevicePanel::BCDevicePanel(QWidget *parent)
//_valueView->resizeColumnsToContents();
//_valueView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
BCDelegate* delegate = new BCDelegate( _valueModel.getValueList(), _valueView);
_valueView->setItemDelegate( delegate );
// __fix! ziemlich wildes ge-pointere, hier
_itemDelegate = new BCItemDelegate( _valueModel.getValueList(), _valueView);
_valueView->setItemDelegate( _itemDelegate );
}
@@ -78,10 +80,12 @@ const BCValueList& BCDevicePanel::getValueListX()
return _valueModel.getValueList();
}
/*
BCValueModel& BCDevicePanel::getValueModel()
{
return _valueModel;
}
*/
// __FIX ist das ok so?
void BCDevicePanel::onValueListReady( BCDevice::ID deviceID, BCValueList valueList )
@@ -91,5 +95,11 @@ void BCDevicePanel::onValueListReady( BCDevice::ID deviceID, BCValueList valueLi
_valueModel.takeValueList( valueList );
}
void BCDevicePanel::onValueUpdated(int index, BC::State state, const QString& newVisibleValue )
{
_valueModel.onValueUpdated( index,state,newVisibleValue);
_itemDelegate->onHighlightRow( index );
}