Chanded to permanent editors.
This commit is contained in:
@@ -44,7 +44,8 @@
|
||||
#include <QPainter>
|
||||
|
||||
#include <bcvaluedelegate.h>
|
||||
#include <bcvalueeditor.h>
|
||||
|
||||
#include <bcvaluewidget.h>
|
||||
|
||||
BCValueDelegate::BCValueDelegate(const BCValueList& valueList, QTableView* view)
|
||||
: QStyledItemDelegate{view}, _valueList{valueList}, _view{view}
|
||||
@@ -58,13 +59,15 @@ QWidget* BCValueDelegate::createEditor(QWidget *parent, const QStyleOptionViewIt
|
||||
{
|
||||
const BCValue& bcValue = *(_valueList[ index.row()].get());
|
||||
|
||||
qDebug() << " --- Create EDITOR: " << index.row();
|
||||
|
||||
Q_UNUSED(option)
|
||||
Q_UNUSED(index)
|
||||
|
||||
auto* valueEditor = new BCValueEditor(bcValue, parent);
|
||||
auto* valueEditor = new BCValueWidget(bcValue, parent);
|
||||
|
||||
// Signal für sofortige Updates
|
||||
connect(valueEditor, &BCValueEditor::valueChanged, this, [this, valueEditor]()
|
||||
connect(valueEditor, &BCValueWidget::valueChanged, this, [this, valueEditor]()
|
||||
{
|
||||
// Commit data sofort bei Änderung
|
||||
emit const_cast<BCValueDelegate*>(this)->commitData(valueEditor);
|
||||
@@ -155,12 +158,14 @@ void BCValueDelegate::paint(QPainter *painter, const QStyleOptionViewItem& optio
|
||||
|
||||
if( index.column() == 1 )
|
||||
{
|
||||
/*
|
||||
if( row>-1 && row <= _valueList.size() )
|
||||
{
|
||||
const BCValue& bcValue = *(_valueList[ index.row()].get());
|
||||
if( !bcValue.isReadOnly())
|
||||
paintSliderIndicator(painter,option,bcValue);
|
||||
}
|
||||
*/
|
||||
|
||||
if(_rowOpacities.contains(row))
|
||||
paintHighlightRow(painter,option,index.row());
|
||||
|
||||
Reference in New Issue
Block a user