--- fy
This commit is contained in:
@@ -64,7 +64,7 @@ XQItem::XQRenderStyleMap XQItem::s_RenderStyleMap
|
||||
{ "CustomRenderStyle", CustomRenderStyle },
|
||||
{ "PickerStyle", PickerStyle },
|
||||
{ "SpinBoxStyle", SpinBoxStyle },
|
||||
{ "ProgressBarStyle", ProgressBarStyle},
|
||||
{ "ColorBarStyle", ColorBarStyle},
|
||||
{ "FormattedStyle", FormattedStyle},
|
||||
};
|
||||
|
||||
@@ -74,7 +74,7 @@ XQItem::XQEditorTypeMap XQItem::s_EditorTypeMap
|
||||
{ "LineEditType", LineEditType },
|
||||
{ "ComboBoxType", ComboBoxType },
|
||||
{ "PickerType", PickerType },
|
||||
{ "ProgressBarType", ProgressBarType },
|
||||
{ "ColorBarType", ColorBarType },
|
||||
{ "SpinBoxType", SpinBoxType},
|
||||
{ "CustomEditorType", CustomEditorType}
|
||||
};
|
||||
@@ -501,7 +501,8 @@ QVariant XQItem::data(int role ) const
|
||||
case Qt::DisplayRole :
|
||||
{
|
||||
QString plainText = contentFallBackText();
|
||||
if( renderStyle() == XQItem::FormattedStyle)
|
||||
//if( renderStyle() == XQItem::FormattedStyle)
|
||||
if( unitType() != XQItem::NoUnitType)
|
||||
return XQItemType::formatToSI( plainText, unitType() );
|
||||
return plainText;
|
||||
}
|
||||
@@ -614,7 +615,9 @@ void XQItem::setData(const QVariant& value, int role )
|
||||
case XQItem::ContentRole:
|
||||
{
|
||||
QVariant newValue;
|
||||
if( itemType().renderStyle() == XQItem::FormattedStyle)
|
||||
|
||||
//if( itemType().renderStyle() == XQItem::FormattedStyle)
|
||||
if( unitType() != XQItem::NoUnitType)
|
||||
newValue = XQItemType::unFormatFromSI( value.toString() );
|
||||
else
|
||||
newValue = value;
|
||||
|
Reference in New Issue
Block a user