mit unitType

This commit is contained in:
2025-08-09 11:56:11 +02:00
parent c89cdfef71
commit 63f139de8c
10 changed files with 147 additions and 64 deletions

View File

@@ -451,6 +451,7 @@ QVariant XQItem::data(int role ) const
case IconRole: // aka Qt::DecorationRole,
case RenderStyleRole:
case EditorTypeRole:
case UnitTypeRole:
case ContentFormatRole:
case FixedChoicesRole:
{
@@ -504,12 +505,11 @@ QVariant XQItem::data(int role ) const
return firstItem.data( XQItem::ContentNodeRole );
}
case UnitTypeRole:
case Qt::StatusTipRole:
case Qt::WhatsThisRole:
case Qt::SizeHintRole:
case Qt::FontRole:
case Qt::TextAlignmentRole:
case Qt::BackgroundRole:
@@ -554,13 +554,18 @@ void XQItem::setData(const QVariant& value, int role )
case RenderStyleRole :
case EditorTypeRole :
case UnitTypeRole:
case ContentFormatRole:
case FlagsRole: // Stimmt das?
case IconRole:
case FixedChoicesRole:
{
//qDebug() << " ---call type set Data: " << role << ": " << XQItem::fetchItemDataRoleName(role) << ":" << value.toString();
itemType().replaceAttribute( this, value, role );
XQItemType* oldType = &itemType();
XQItemType* newType = oldType->replaceAttribute(value, role );
if( oldType != newType )
setItemType( newType );
emitDataChanged();
// no break, return!
return;
@@ -593,8 +598,6 @@ void XQItem::setData(const QVariant& value, int role )
}
// alles andere wie gehabt
case UnitTypeRole:
case ContentNodeRole:
case SheetNodeRole: