mirror of https://github.com/YosysHQ/nextpnr.git
Fix QVariant deprecation warnings
This commit is contained in:
parent
c1a6898f77
commit
6c785e16d6
|
|
@ -85,7 +85,7 @@ QT_BEGIN_NAMESPACE
|
|||
Returns the type id for an enum property.
|
||||
|
||||
Note that the property's value type can be retrieved using the
|
||||
valueType() function (which is QVariant::Int for the enum property
|
||||
valueType() function (which is QMetaType::Int for the enum property
|
||||
type).
|
||||
|
||||
\sa propertyType(), valueType()
|
||||
|
|
@ -99,7 +99,7 @@ int QtVariantPropertyManager::enumTypeId()
|
|||
Returns the type id for a flag property.
|
||||
|
||||
Note that the property's value type can be retrieved using the
|
||||
valueType() function (which is QVariant::Int for the flag property
|
||||
valueType() function (which is QMetaType::Int for the flag property
|
||||
type).
|
||||
|
||||
\sa propertyType(), valueType()
|
||||
|
|
@ -113,7 +113,7 @@ int QtVariantPropertyManager::flagTypeId()
|
|||
Returns the type id for a group property.
|
||||
|
||||
Note that the property's value type can be retrieved using the
|
||||
valueType() function (which is QVariant::Invalid for the group
|
||||
valueType() function (which is QMetaType::UnknownType for the group
|
||||
property type, since it doesn't provide any value).
|
||||
|
||||
\sa propertyType(), valueType()
|
||||
|
|
@ -403,13 +403,13 @@ int QtVariantPropertyManagerPrivate::internalPropertyToType(QtProperty *property
|
|||
int type = 0;
|
||||
QtAbstractPropertyManager *internPropertyManager = property->propertyManager();
|
||||
if (qobject_cast<QtIntPropertyManager *>(internPropertyManager))
|
||||
type = QVariant::Int;
|
||||
type = QMetaType::Int;
|
||||
else if (qobject_cast<QtEnumPropertyManager *>(internPropertyManager))
|
||||
type = QtVariantPropertyManager::enumTypeId();
|
||||
else if (qobject_cast<QtBoolPropertyManager *>(internPropertyManager))
|
||||
type = QVariant::Bool;
|
||||
type = QMetaType::Bool;
|
||||
else if (qobject_cast<QtDoublePropertyManager *>(internPropertyManager))
|
||||
type = QVariant::Double;
|
||||
type = QMetaType::Double;
|
||||
return type;
|
||||
}
|
||||
|
||||
|
|
@ -708,13 +708,13 @@ void QtVariantPropertyManagerPrivate::slotFlagNamesChanged(QtProperty *property,
|
|||
the type of its value, can be retrieved using the propertyType()
|
||||
and valueType() functions respectively.
|
||||
|
||||
A property's type is a QVariant::Type enumerator value, and
|
||||
A property's type is a QMetaType::Type enumerator value, and
|
||||
usually a property's type is the same as its value type. But for
|
||||
some properties the types differ, for example for enums, flags and
|
||||
group types in which case QtVariantPropertyManager provides the
|
||||
enumTypeId(), flagTypeId() and groupTypeId() functions,
|
||||
respectively, to identify their property type (the value types are
|
||||
QVariant::Int for the enum and flag types, and QVariant::Invalid
|
||||
QMetaType::Int for the enum and flag types, and QMetaType::UnknownType
|
||||
for the group type).
|
||||
|
||||
Use the isPropertyTypeSupported() function to check if a particular
|
||||
|
|
@ -727,64 +727,64 @@ void QtVariantPropertyManagerPrivate::slotFlagNamesChanged(QtProperty *property,
|
|||
\o Property Type Id
|
||||
\row
|
||||
\o int
|
||||
\o QVariant::Int
|
||||
\o QMetaType::Int
|
||||
\row
|
||||
\o double
|
||||
\o QVariant::Double
|
||||
\o QMetaType::Double
|
||||
\row
|
||||
\o bool
|
||||
\o QVariant::Bool
|
||||
\o QMetaType::Bool
|
||||
\row
|
||||
\o QString
|
||||
\o QVariant::String
|
||||
\o QMetaType::QString
|
||||
\row
|
||||
\o QDate
|
||||
\o QVariant::Date
|
||||
\o QMetaType::QDate
|
||||
\row
|
||||
\o QTime
|
||||
\o QVariant::Time
|
||||
\o QMetaType::QTime
|
||||
\row
|
||||
\o QDateTime
|
||||
\o QVariant::DateTime
|
||||
\o QMetaType::QDateTime
|
||||
\row
|
||||
\o QKeySequence
|
||||
\o QVariant::KeySequence
|
||||
\o QMetaType::QKeySequence
|
||||
\row
|
||||
\o QChar
|
||||
\o QVariant::Char
|
||||
\o QMetaType::QChar
|
||||
\row
|
||||
\o QLocale
|
||||
\o QVariant::Locale
|
||||
\o QMetaType::QLocale
|
||||
\row
|
||||
\o QPoint
|
||||
\o QVariant::Point
|
||||
\o QMetaType::QPoint
|
||||
\row
|
||||
\o QPointF
|
||||
\o QVariant::PointF
|
||||
\o QMetaType::QPointF
|
||||
\row
|
||||
\o QSize
|
||||
\o QVariant::Size
|
||||
\o QMetaType::QSize
|
||||
\row
|
||||
\o QSizeF
|
||||
\o QVariant::SizeF
|
||||
\o QMetaType::QSizeF
|
||||
\row
|
||||
\o QRect
|
||||
\o QVariant::Rect
|
||||
\o QMetaType::QRect
|
||||
\row
|
||||
\o QRectF
|
||||
\o QVariant::RectF
|
||||
\o QMetaType::QRectF
|
||||
\row
|
||||
\o QColor
|
||||
\o QVariant::Color
|
||||
\o QMetaType::QColor
|
||||
\row
|
||||
\o QSizePolicy
|
||||
\o QVariant::SizePolicy
|
||||
\o QMetaType::QSizePolicy
|
||||
\row
|
||||
\o QFont
|
||||
\o QVariant::Font
|
||||
\o QMetaType::QFont
|
||||
\row
|
||||
\o QCursor
|
||||
\o QVariant::Cursor
|
||||
\o QMetaType::QCursor
|
||||
\row
|
||||
\o enum
|
||||
\o enumTypeId()
|
||||
|
|
@ -797,7 +797,7 @@ void QtVariantPropertyManagerPrivate::slotFlagNamesChanged(QtProperty *property,
|
|||
\endtable
|
||||
|
||||
Each property type can provide additional attributes,
|
||||
e.g. QVariant::Int and QVariant::Double provides minimum and
|
||||
e.g. QMetaType::Int and QMetaType::Double provides minimum and
|
||||
maximum values. The currently supported attributes are:
|
||||
|
||||
\table
|
||||
|
|
@ -808,83 +808,83 @@ void QtVariantPropertyManagerPrivate::slotFlagNamesChanged(QtProperty *property,
|
|||
\row
|
||||
\o \c int
|
||||
\o minimum
|
||||
\o QVariant::Int
|
||||
\o QMetaType::Int
|
||||
\row
|
||||
\o
|
||||
\o maximum
|
||||
\o QVariant::Int
|
||||
\o QMetaType::Int
|
||||
\row
|
||||
\o
|
||||
\o singleStep
|
||||
\o QVariant::Int
|
||||
\o QMetaType::Int
|
||||
\row
|
||||
\o \c double
|
||||
\o minimum
|
||||
\o QVariant::Double
|
||||
\o QMetaType::Double
|
||||
\row
|
||||
\o
|
||||
\o maximum
|
||||
\o QVariant::Double
|
||||
\o QMetaType::Double
|
||||
\row
|
||||
\o
|
||||
\o singleStep
|
||||
\o QVariant::Double
|
||||
\o QMetaType::Double
|
||||
\row
|
||||
\o
|
||||
\o decimals
|
||||
\o QVariant::Int
|
||||
\o QMetaType::Int
|
||||
\row
|
||||
\o QString
|
||||
\o regExp
|
||||
\o QVariant::RegExp
|
||||
\o QMetaType::QRegularExpression
|
||||
\row
|
||||
\o QDate
|
||||
\o minimum
|
||||
\o QVariant::Date
|
||||
\o QMetaType::QDate
|
||||
\row
|
||||
\o
|
||||
\o maximum
|
||||
\o QVariant::Date
|
||||
\o QMetaType::QDate
|
||||
\row
|
||||
\o QPointF
|
||||
\o decimals
|
||||
\o QVariant::Int
|
||||
\o QMetaType::Int
|
||||
\row
|
||||
\o QSize
|
||||
\o minimum
|
||||
\o QVariant::Size
|
||||
\o QMetaType::QSize
|
||||
\row
|
||||
\o
|
||||
\o maximum
|
||||
\o QVariant::Size
|
||||
\o QMetaType::QSize
|
||||
\row
|
||||
\o QSizeF
|
||||
\o minimum
|
||||
\o QVariant::SizeF
|
||||
\o QMetaType::QSizeF
|
||||
\row
|
||||
\o
|
||||
\o maximum
|
||||
\o QVariant::SizeF
|
||||
\o QMetaType::QSizeF
|
||||
\row
|
||||
\o
|
||||
\o decimals
|
||||
\o QVariant::Int
|
||||
\o QMetaType::Int
|
||||
\row
|
||||
\o QRect
|
||||
\o constraint
|
||||
\o QVariant::Rect
|
||||
\o QMetaType::QRect
|
||||
\row
|
||||
\o QRectF
|
||||
\o constraint
|
||||
\o QVariant::RectF
|
||||
\o QMetaType::QRectF
|
||||
\row
|
||||
\o
|
||||
\o decimals
|
||||
\o QVariant::Int
|
||||
\o QMetaType::Int
|
||||
\row
|
||||
\o \c enum
|
||||
\o enumNames
|
||||
\o QVariant::StringList
|
||||
\o QMetaType::QStringList
|
||||
\row
|
||||
\o
|
||||
\o enumIcons
|
||||
|
|
@ -892,7 +892,7 @@ void QtVariantPropertyManagerPrivate::slotFlagNamesChanged(QtProperty *property,
|
|||
\row
|
||||
\o \c flag
|
||||
\o flagNames
|
||||
\o QVariant::StringList
|
||||
\o QMetaType::QStringList
|
||||
\endtable
|
||||
|
||||
The attributes for a given property type can be retrieved using
|
||||
|
|
@ -946,11 +946,11 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent)
|
|||
|
||||
// IntPropertyManager
|
||||
QtIntPropertyManager *intPropertyManager = new QtIntPropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::Int] = intPropertyManager;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QVariant::Int][d_ptr->m_minimumAttribute] = QVariant::Int;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QVariant::Int][d_ptr->m_maximumAttribute] = QVariant::Int;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QVariant::Int][d_ptr->m_singleStepAttribute] = QVariant::Int;
|
||||
d_ptr->m_typeToValueType[QVariant::Int] = QVariant::Int;
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::Int] = intPropertyManager;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QMetaType::Int][d_ptr->m_minimumAttribute] = QMetaType::Int;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QMetaType::Int][d_ptr->m_maximumAttribute] = QMetaType::Int;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QMetaType::Int][d_ptr->m_singleStepAttribute] = QMetaType::Int;
|
||||
d_ptr->m_typeToValueType[QMetaType::Int] = QMetaType::Int;
|
||||
connect(intPropertyManager, SIGNAL(valueChanged(QtProperty *, int)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, int)));
|
||||
connect(intPropertyManager, SIGNAL(rangeChanged(QtProperty *, int, int)),
|
||||
|
|
@ -959,16 +959,16 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent)
|
|||
this, SLOT(slotSingleStepChanged(QtProperty *, int)));
|
||||
// DoublePropertyManager
|
||||
QtDoublePropertyManager *doublePropertyManager = new QtDoublePropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::Double] = doublePropertyManager;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QVariant::Double][d_ptr->m_minimumAttribute] =
|
||||
QVariant::Double;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QVariant::Double][d_ptr->m_maximumAttribute] =
|
||||
QVariant::Double;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QVariant::Double][d_ptr->m_singleStepAttribute] =
|
||||
QVariant::Double;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QVariant::Double][d_ptr->m_decimalsAttribute] =
|
||||
QVariant::Int;
|
||||
d_ptr->m_typeToValueType[QVariant::Double] = QVariant::Double;
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::Double] = doublePropertyManager;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_minimumAttribute] =
|
||||
QMetaType::Double;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_maximumAttribute] =
|
||||
QMetaType::Double;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_singleStepAttribute] =
|
||||
QMetaType::Double;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_decimalsAttribute] =
|
||||
QMetaType::Int;
|
||||
d_ptr->m_typeToValueType[QMetaType::Double] = QMetaType::Double;
|
||||
connect(doublePropertyManager, SIGNAL(valueChanged(QtProperty *, double)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, double)));
|
||||
connect(doublePropertyManager, SIGNAL(rangeChanged(QtProperty *, double, double)),
|
||||
|
|
@ -979,15 +979,15 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent)
|
|||
this, SLOT(slotDecimalsChanged(QtProperty *, int)));
|
||||
// BoolPropertyManager
|
||||
QtBoolPropertyManager *boolPropertyManager = new QtBoolPropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::Bool] = boolPropertyManager;
|
||||
d_ptr->m_typeToValueType[QVariant::Bool] = QVariant::Bool;
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::Bool] = boolPropertyManager;
|
||||
d_ptr->m_typeToValueType[QMetaType::Bool] = QMetaType::Bool;
|
||||
connect(boolPropertyManager, SIGNAL(valueChanged(QtProperty *, bool)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, bool)));
|
||||
// StringPropertyManager
|
||||
QtStringPropertyManager *stringPropertyManager = new QtStringPropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::String] = stringPropertyManager;
|
||||
d_ptr->m_typeToValueType[QVariant::String] = QVariant::String;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QVariant::String][d_ptr->m_regExpAttribute] =
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::QString] = stringPropertyManager;
|
||||
d_ptr->m_typeToValueType[QMetaType::QString] = QMetaType::QString;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QMetaType::QString][d_ptr->m_regExpAttribute] =
|
||||
QMetaType::QRegularExpression;
|
||||
connect(stringPropertyManager, SIGNAL(valueChanged(QtProperty *, const QString &)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, const QString &)));
|
||||
|
|
@ -995,44 +995,44 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent)
|
|||
this, SLOT(slotRegExpChanged(QtProperty *, const QRegularExpression &)));
|
||||
// DatePropertyManager
|
||||
QtDatePropertyManager *datePropertyManager = new QtDatePropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::Date] = datePropertyManager;
|
||||
d_ptr->m_typeToValueType[QVariant::Date] = QVariant::Date;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QVariant::Date][d_ptr->m_minimumAttribute] =
|
||||
QVariant::Date;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QVariant::Date][d_ptr->m_maximumAttribute] =
|
||||
QVariant::Date;
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::QDate] = datePropertyManager;
|
||||
d_ptr->m_typeToValueType[QMetaType::QDate] = QMetaType::QDate;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QMetaType::QDate][d_ptr->m_minimumAttribute] =
|
||||
QMetaType::QDate;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QMetaType::QDate][d_ptr->m_maximumAttribute] =
|
||||
QMetaType::QDate;
|
||||
connect(datePropertyManager, SIGNAL(valueChanged(QtProperty *, const QDate &)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, const QDate &)));
|
||||
connect(datePropertyManager, SIGNAL(rangeChanged(QtProperty *, const QDate &, const QDate &)),
|
||||
this, SLOT(slotRangeChanged(QtProperty *, const QDate &, const QDate &)));
|
||||
// TimePropertyManager
|
||||
QtTimePropertyManager *timePropertyManager = new QtTimePropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::Time] = timePropertyManager;
|
||||
d_ptr->m_typeToValueType[QVariant::Time] = QVariant::Time;
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::QTime] = timePropertyManager;
|
||||
d_ptr->m_typeToValueType[QMetaType::QTime] = QMetaType::QTime;
|
||||
connect(timePropertyManager, SIGNAL(valueChanged(QtProperty *, const QTime &)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, const QTime &)));
|
||||
// DateTimePropertyManager
|
||||
QtDateTimePropertyManager *dateTimePropertyManager = new QtDateTimePropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::DateTime] = dateTimePropertyManager;
|
||||
d_ptr->m_typeToValueType[QVariant::DateTime] = QVariant::DateTime;
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::QDateTime] = dateTimePropertyManager;
|
||||
d_ptr->m_typeToValueType[QMetaType::QDateTime] = QMetaType::QDateTime;
|
||||
connect(dateTimePropertyManager, SIGNAL(valueChanged(QtProperty *, const QDateTime &)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, const QDateTime &)));
|
||||
// KeySequencePropertyManager
|
||||
QtKeySequencePropertyManager *keySequencePropertyManager = new QtKeySequencePropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::KeySequence] = keySequencePropertyManager;
|
||||
d_ptr->m_typeToValueType[QVariant::KeySequence] = QVariant::KeySequence;
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::QKeySequence] = keySequencePropertyManager;
|
||||
d_ptr->m_typeToValueType[QMetaType::QKeySequence] = QMetaType::QKeySequence;
|
||||
connect(keySequencePropertyManager, SIGNAL(valueChanged(QtProperty *, const QKeySequence &)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, const QKeySequence &)));
|
||||
// CharPropertyManager
|
||||
QtCharPropertyManager *charPropertyManager = new QtCharPropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::Char] = charPropertyManager;
|
||||
d_ptr->m_typeToValueType[QVariant::Char] = QVariant::Char;
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::QChar] = charPropertyManager;
|
||||
d_ptr->m_typeToValueType[QMetaType::QChar] = QMetaType::QChar;
|
||||
connect(charPropertyManager, SIGNAL(valueChanged(QtProperty *, const QChar &)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, const QChar &)));
|
||||
// LocalePropertyManager
|
||||
QtLocalePropertyManager *localePropertyManager = new QtLocalePropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::Locale] = localePropertyManager;
|
||||
d_ptr->m_typeToValueType[QVariant::Locale] = QVariant::Locale;
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::QLocale] = localePropertyManager;
|
||||
d_ptr->m_typeToValueType[QMetaType::QLocale] = QMetaType::QLocale;
|
||||
connect(localePropertyManager, SIGNAL(valueChanged(QtProperty *, const QLocale &)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, const QLocale &)));
|
||||
connect(localePropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)),
|
||||
|
|
@ -1043,8 +1043,8 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent)
|
|||
this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *)));
|
||||
// PointPropertyManager
|
||||
QtPointPropertyManager *pointPropertyManager = new QtPointPropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::Point] = pointPropertyManager;
|
||||
d_ptr->m_typeToValueType[QVariant::Point] = QVariant::Point;
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::QPoint] = pointPropertyManager;
|
||||
d_ptr->m_typeToValueType[QMetaType::QPoint] = QMetaType::QPoint;
|
||||
connect(pointPropertyManager, SIGNAL(valueChanged(QtProperty *, const QPoint &)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, const QPoint &)));
|
||||
connect(pointPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)),
|
||||
|
|
@ -1055,10 +1055,10 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent)
|
|||
this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *)));
|
||||
// PointFPropertyManager
|
||||
QtPointFPropertyManager *pointFPropertyManager = new QtPointFPropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::PointF] = pointFPropertyManager;
|
||||
d_ptr->m_typeToValueType[QVariant::PointF] = QVariant::PointF;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QVariant::PointF][d_ptr->m_decimalsAttribute] =
|
||||
QVariant::Int;
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::QPointF] = pointFPropertyManager;
|
||||
d_ptr->m_typeToValueType[QMetaType::QPointF] = QMetaType::QPointF;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QMetaType::QPointF][d_ptr->m_decimalsAttribute] =
|
||||
QMetaType::Int;
|
||||
connect(pointFPropertyManager, SIGNAL(valueChanged(QtProperty *, const QPointF &)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, const QPointF &)));
|
||||
connect(pointFPropertyManager, SIGNAL(decimalsChanged(QtProperty *, int)),
|
||||
|
|
@ -1071,12 +1071,12 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent)
|
|||
this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *)));
|
||||
// SizePropertyManager
|
||||
QtSizePropertyManager *sizePropertyManager = new QtSizePropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::Size] = sizePropertyManager;
|
||||
d_ptr->m_typeToValueType[QVariant::Size] = QVariant::Size;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QVariant::Size][d_ptr->m_minimumAttribute] =
|
||||
QVariant::Size;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QVariant::Size][d_ptr->m_maximumAttribute] =
|
||||
QVariant::Size;
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::QSize] = sizePropertyManager;
|
||||
d_ptr->m_typeToValueType[QMetaType::QSize] = QMetaType::QSize;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSize][d_ptr->m_minimumAttribute] =
|
||||
QMetaType::QSize;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSize][d_ptr->m_maximumAttribute] =
|
||||
QMetaType::QSize;
|
||||
connect(sizePropertyManager, SIGNAL(valueChanged(QtProperty *, const QSize &)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, const QSize &)));
|
||||
connect(sizePropertyManager, SIGNAL(rangeChanged(QtProperty *, const QSize &, const QSize &)),
|
||||
|
|
@ -1091,14 +1091,14 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent)
|
|||
this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *)));
|
||||
// SizeFPropertyManager
|
||||
QtSizeFPropertyManager *sizeFPropertyManager = new QtSizeFPropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::SizeF] = sizeFPropertyManager;
|
||||
d_ptr->m_typeToValueType[QVariant::SizeF] = QVariant::SizeF;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QVariant::SizeF][d_ptr->m_minimumAttribute] =
|
||||
QVariant::SizeF;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QVariant::SizeF][d_ptr->m_maximumAttribute] =
|
||||
QVariant::SizeF;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QVariant::SizeF][d_ptr->m_decimalsAttribute] =
|
||||
QVariant::Int;
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::QSizeF] = sizeFPropertyManager;
|
||||
d_ptr->m_typeToValueType[QMetaType::QSizeF] = QMetaType::QSizeF;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSizeF][d_ptr->m_minimumAttribute] =
|
||||
QMetaType::QSizeF;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSizeF][d_ptr->m_maximumAttribute] =
|
||||
QMetaType::QSizeF;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSizeF][d_ptr->m_decimalsAttribute] =
|
||||
QMetaType::Int;
|
||||
connect(sizeFPropertyManager, SIGNAL(valueChanged(QtProperty *, const QSizeF &)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, const QSizeF &)));
|
||||
connect(sizeFPropertyManager, SIGNAL(rangeChanged(QtProperty *, const QSizeF &, const QSizeF &)),
|
||||
|
|
@ -1115,10 +1115,10 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent)
|
|||
this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *)));
|
||||
// RectPropertyManager
|
||||
QtRectPropertyManager *rectPropertyManager = new QtRectPropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::Rect] = rectPropertyManager;
|
||||
d_ptr->m_typeToValueType[QVariant::Rect] = QVariant::Rect;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QVariant::Rect][d_ptr->m_constraintAttribute] =
|
||||
QVariant::Rect;
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::QRect] = rectPropertyManager;
|
||||
d_ptr->m_typeToValueType[QMetaType::QRect] = QMetaType::QRect;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QMetaType::QRect][d_ptr->m_constraintAttribute] =
|
||||
QMetaType::QRect;
|
||||
connect(rectPropertyManager, SIGNAL(valueChanged(QtProperty *, const QRect &)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, const QRect &)));
|
||||
connect(rectPropertyManager, SIGNAL(constraintChanged(QtProperty *, const QRect &)),
|
||||
|
|
@ -1133,12 +1133,12 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent)
|
|||
this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *)));
|
||||
// RectFPropertyManager
|
||||
QtRectFPropertyManager *rectFPropertyManager = new QtRectFPropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::RectF] = rectFPropertyManager;
|
||||
d_ptr->m_typeToValueType[QVariant::RectF] = QVariant::RectF;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QVariant::RectF][d_ptr->m_constraintAttribute] =
|
||||
QVariant::RectF;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QVariant::RectF][d_ptr->m_decimalsAttribute] =
|
||||
QVariant::Int;
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::QRectF] = rectFPropertyManager;
|
||||
d_ptr->m_typeToValueType[QMetaType::QRectF] = QMetaType::QRectF;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QMetaType::QRectF][d_ptr->m_constraintAttribute] =
|
||||
QMetaType::QRectF;
|
||||
d_ptr->m_typeToAttributeToAttributeType[QMetaType::QRectF][d_ptr->m_decimalsAttribute] =
|
||||
QMetaType::Int;
|
||||
connect(rectFPropertyManager, SIGNAL(valueChanged(QtProperty *, const QRectF &)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, const QRectF &)));
|
||||
connect(rectFPropertyManager, SIGNAL(constraintChanged(QtProperty *, const QRectF &)),
|
||||
|
|
@ -1155,8 +1155,8 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent)
|
|||
this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *)));
|
||||
// ColorPropertyManager
|
||||
QtColorPropertyManager *colorPropertyManager = new QtColorPropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::Color] = colorPropertyManager;
|
||||
d_ptr->m_typeToValueType[QVariant::Color] = QVariant::Color;
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::QColor] = colorPropertyManager;
|
||||
d_ptr->m_typeToValueType[QMetaType::QColor] = QMetaType::QColor;
|
||||
connect(colorPropertyManager, SIGNAL(valueChanged(QtProperty *, const QColor &)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, const QColor &)));
|
||||
connect(colorPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)),
|
||||
|
|
@ -1169,9 +1169,9 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent)
|
|||
int enumId = enumTypeId();
|
||||
QtEnumPropertyManager *enumPropertyManager = new QtEnumPropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[enumId] = enumPropertyManager;
|
||||
d_ptr->m_typeToValueType[enumId] = QVariant::Int;
|
||||
d_ptr->m_typeToValueType[enumId] = QMetaType::Int;
|
||||
d_ptr->m_typeToAttributeToAttributeType[enumId][d_ptr->m_enumNamesAttribute] =
|
||||
QVariant::StringList;
|
||||
QMetaType::QStringList;
|
||||
d_ptr->m_typeToAttributeToAttributeType[enumId][d_ptr->m_enumIconsAttribute] =
|
||||
iconMapTypeId();
|
||||
connect(enumPropertyManager, SIGNAL(valueChanged(QtProperty *, int)),
|
||||
|
|
@ -1182,8 +1182,8 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent)
|
|||
this, SLOT(slotEnumIconsChanged(QtProperty *, const QMap<int, QIcon> &)));
|
||||
// SizePolicyPropertyManager
|
||||
QtSizePolicyPropertyManager *sizePolicyPropertyManager = new QtSizePolicyPropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::SizePolicy] = sizePolicyPropertyManager;
|
||||
d_ptr->m_typeToValueType[QVariant::SizePolicy] = QVariant::SizePolicy;
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::QSizePolicy] = sizePolicyPropertyManager;
|
||||
d_ptr->m_typeToValueType[QMetaType::QSizePolicy] = QMetaType::QSizePolicy;
|
||||
connect(sizePolicyPropertyManager, SIGNAL(valueChanged(QtProperty *, const QSizePolicy &)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, const QSizePolicy &)));
|
||||
connect(sizePolicyPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)),
|
||||
|
|
@ -1201,8 +1201,8 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent)
|
|||
this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *)));
|
||||
// FontPropertyManager
|
||||
QtFontPropertyManager *fontPropertyManager = new QtFontPropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::Font] = fontPropertyManager;
|
||||
d_ptr->m_typeToValueType[QVariant::Font] = QVariant::Font;
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::QFont] = fontPropertyManager;
|
||||
d_ptr->m_typeToValueType[QMetaType::QFont] = QMetaType::QFont;
|
||||
connect(fontPropertyManager, SIGNAL(valueChanged(QtProperty *, const QFont &)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, const QFont &)));
|
||||
connect(fontPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *, int)),
|
||||
|
|
@ -1222,17 +1222,17 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent)
|
|||
this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty *)));
|
||||
// CursorPropertyManager
|
||||
QtCursorPropertyManager *cursorPropertyManager = new QtCursorPropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[QVariant::Cursor] = cursorPropertyManager;
|
||||
d_ptr->m_typeToValueType[QVariant::Cursor] = QVariant::Cursor;
|
||||
d_ptr->m_typeToPropertyManager[QMetaType::QCursor] = cursorPropertyManager;
|
||||
d_ptr->m_typeToValueType[QMetaType::QCursor] = QMetaType::QCursor;
|
||||
connect(cursorPropertyManager, SIGNAL(valueChanged(QtProperty *, const QCursor &)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, const QCursor &)));
|
||||
// FlagPropertyManager
|
||||
int flagId = flagTypeId();
|
||||
QtFlagPropertyManager *flagPropertyManager = new QtFlagPropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[flagId] = flagPropertyManager;
|
||||
d_ptr->m_typeToValueType[flagId] = QVariant::Int;
|
||||
d_ptr->m_typeToValueType[flagId] = QMetaType::Int;
|
||||
d_ptr->m_typeToAttributeToAttributeType[flagId][d_ptr->m_flagNamesAttribute] =
|
||||
QVariant::StringList;
|
||||
QMetaType::QStringList;
|
||||
connect(flagPropertyManager, SIGNAL(valueChanged(QtProperty *, int)),
|
||||
this, SLOT(slotValueChanged(QtProperty *, int)));
|
||||
connect(flagPropertyManager, SIGNAL(flagNamesChanged(QtProperty *, const QStringList &)),
|
||||
|
|
@ -1247,7 +1247,7 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent)
|
|||
int groupId = groupTypeId();
|
||||
QtGroupPropertyManager *groupPropertyManager = new QtGroupPropertyManager(this);
|
||||
d_ptr->m_typeToPropertyManager[groupId] = groupPropertyManager;
|
||||
d_ptr->m_typeToValueType[groupId] = QVariant::Invalid;
|
||||
d_ptr->m_typeToValueType[groupId] = QMetaType::UnknownType;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
@ -1599,7 +1599,7 @@ QStringList QtVariantPropertyManager::attributes(int propertyType) const
|
|||
|
||||
If the given \a propertyType is not supported by \e this manager,
|
||||
or if the given \a propertyType does not possess the specified \a
|
||||
attribute, this function returns QVariant::Invalid.
|
||||
attribute, this function returns QMetaType::UnknownType.
|
||||
|
||||
\sa attributes(), valueType()
|
||||
*/
|
||||
|
|
@ -2007,52 +2007,52 @@ QtVariantEditorFactory::QtVariantEditorFactory(QObject *parent)
|
|||
d_ptr->q_ptr = this;
|
||||
|
||||
d_ptr->m_spinBoxFactory = new QtSpinBoxFactory(this);
|
||||
d_ptr->m_factoryToType[d_ptr->m_spinBoxFactory] = QVariant::Int;
|
||||
d_ptr->m_typeToFactory[QVariant::Int] = d_ptr->m_spinBoxFactory;
|
||||
d_ptr->m_factoryToType[d_ptr->m_spinBoxFactory] = QMetaType::Int;
|
||||
d_ptr->m_typeToFactory[QMetaType::Int] = d_ptr->m_spinBoxFactory;
|
||||
|
||||
d_ptr->m_doubleSpinBoxFactory = new QtDoubleSpinBoxFactory(this);
|
||||
d_ptr->m_factoryToType[d_ptr->m_doubleSpinBoxFactory] = QVariant::Double;
|
||||
d_ptr->m_typeToFactory[QVariant::Double] = d_ptr->m_doubleSpinBoxFactory;
|
||||
d_ptr->m_factoryToType[d_ptr->m_doubleSpinBoxFactory] = QMetaType::Double;
|
||||
d_ptr->m_typeToFactory[QMetaType::Double] = d_ptr->m_doubleSpinBoxFactory;
|
||||
|
||||
d_ptr->m_checkBoxFactory = new QtCheckBoxFactory(this);
|
||||
d_ptr->m_factoryToType[d_ptr->m_checkBoxFactory] = QVariant::Bool;
|
||||
d_ptr->m_typeToFactory[QVariant::Bool] = d_ptr->m_checkBoxFactory;
|
||||
d_ptr->m_factoryToType[d_ptr->m_checkBoxFactory] = QMetaType::Bool;
|
||||
d_ptr->m_typeToFactory[QMetaType::Bool] = d_ptr->m_checkBoxFactory;
|
||||
|
||||
d_ptr->m_lineEditFactory = new QtLineEditFactory(this);
|
||||
d_ptr->m_factoryToType[d_ptr->m_lineEditFactory] = QVariant::String;
|
||||
d_ptr->m_typeToFactory[QVariant::String] = d_ptr->m_lineEditFactory;
|
||||
d_ptr->m_factoryToType[d_ptr->m_lineEditFactory] = QMetaType::QString;
|
||||
d_ptr->m_typeToFactory[QMetaType::QString] = d_ptr->m_lineEditFactory;
|
||||
|
||||
d_ptr->m_dateEditFactory = new QtDateEditFactory(this);
|
||||
d_ptr->m_factoryToType[d_ptr->m_dateEditFactory] = QVariant::Date;
|
||||
d_ptr->m_typeToFactory[QVariant::Date] = d_ptr->m_dateEditFactory;
|
||||
d_ptr->m_factoryToType[d_ptr->m_dateEditFactory] = QMetaType::QDate;
|
||||
d_ptr->m_typeToFactory[QMetaType::QDate] = d_ptr->m_dateEditFactory;
|
||||
|
||||
d_ptr->m_timeEditFactory = new QtTimeEditFactory(this);
|
||||
d_ptr->m_factoryToType[d_ptr->m_timeEditFactory] = QVariant::Time;
|
||||
d_ptr->m_typeToFactory[QVariant::Time] = d_ptr->m_timeEditFactory;
|
||||
d_ptr->m_factoryToType[d_ptr->m_timeEditFactory] = QMetaType::QTime;
|
||||
d_ptr->m_typeToFactory[QMetaType::QTime] = d_ptr->m_timeEditFactory;
|
||||
|
||||
d_ptr->m_dateTimeEditFactory = new QtDateTimeEditFactory(this);
|
||||
d_ptr->m_factoryToType[d_ptr->m_dateTimeEditFactory] = QVariant::DateTime;
|
||||
d_ptr->m_typeToFactory[QVariant::DateTime] = d_ptr->m_dateTimeEditFactory;
|
||||
d_ptr->m_factoryToType[d_ptr->m_dateTimeEditFactory] = QMetaType::QDateTime;
|
||||
d_ptr->m_typeToFactory[QMetaType::QDateTime] = d_ptr->m_dateTimeEditFactory;
|
||||
|
||||
d_ptr->m_keySequenceEditorFactory = new QtKeySequenceEditorFactory(this);
|
||||
d_ptr->m_factoryToType[d_ptr->m_keySequenceEditorFactory] = QVariant::KeySequence;
|
||||
d_ptr->m_typeToFactory[QVariant::KeySequence] = d_ptr->m_keySequenceEditorFactory;
|
||||
d_ptr->m_factoryToType[d_ptr->m_keySequenceEditorFactory] = QMetaType::QKeySequence;
|
||||
d_ptr->m_typeToFactory[QMetaType::QKeySequence] = d_ptr->m_keySequenceEditorFactory;
|
||||
|
||||
d_ptr->m_charEditorFactory = new QtCharEditorFactory(this);
|
||||
d_ptr->m_factoryToType[d_ptr->m_charEditorFactory] = QVariant::Char;
|
||||
d_ptr->m_typeToFactory[QVariant::Char] = d_ptr->m_charEditorFactory;
|
||||
d_ptr->m_factoryToType[d_ptr->m_charEditorFactory] = QMetaType::QChar;
|
||||
d_ptr->m_typeToFactory[QMetaType::QChar] = d_ptr->m_charEditorFactory;
|
||||
|
||||
d_ptr->m_cursorEditorFactory = new QtCursorEditorFactory(this);
|
||||
d_ptr->m_factoryToType[d_ptr->m_cursorEditorFactory] = QVariant::Cursor;
|
||||
d_ptr->m_typeToFactory[QVariant::Cursor] = d_ptr->m_cursorEditorFactory;
|
||||
d_ptr->m_factoryToType[d_ptr->m_cursorEditorFactory] = QMetaType::QCursor;
|
||||
d_ptr->m_typeToFactory[QMetaType::QCursor] = d_ptr->m_cursorEditorFactory;
|
||||
|
||||
d_ptr->m_colorEditorFactory = new QtColorEditorFactory(this);
|
||||
d_ptr->m_factoryToType[d_ptr->m_colorEditorFactory] = QVariant::Color;
|
||||
d_ptr->m_typeToFactory[QVariant::Color] = d_ptr->m_colorEditorFactory;
|
||||
d_ptr->m_factoryToType[d_ptr->m_colorEditorFactory] = QMetaType::QColor;
|
||||
d_ptr->m_typeToFactory[QMetaType::QColor] = d_ptr->m_colorEditorFactory;
|
||||
|
||||
d_ptr->m_fontEditorFactory = new QtFontEditorFactory(this);
|
||||
d_ptr->m_factoryToType[d_ptr->m_fontEditorFactory] = QVariant::Font;
|
||||
d_ptr->m_typeToFactory[QVariant::Font] = d_ptr->m_fontEditorFactory;
|
||||
d_ptr->m_factoryToType[d_ptr->m_fontEditorFactory] = QMetaType::QFont;
|
||||
d_ptr->m_typeToFactory[QMetaType::QFont] = d_ptr->m_fontEditorFactory;
|
||||
|
||||
d_ptr->m_comboBoxFactory = new QtEnumEditorFactory(this);
|
||||
const int enumId = QtVariantPropertyManager::enumTypeId();
|
||||
|
|
|
|||
|
|
@ -630,25 +630,25 @@ void DesignWidget::onSelectionChanged(int num, const QItemSelection &, const QIt
|
|||
BelId bel = ctx->getBelByName(c);
|
||||
QtProperty *topItem = addTopLevelProperty("Bel");
|
||||
|
||||
addProperty(topItem, QVariant::String, "Name", ctx->nameOfBel(bel));
|
||||
addProperty(topItem, QVariant::String, "Type", ctx->getBelType(bel).c_str(ctx));
|
||||
addProperty(topItem, QVariant::Bool, "Available", ctx->checkBelAvail(bel));
|
||||
addProperty(topItem, QVariant::String, "Bound Cell", ctx->nameOf(ctx->getBoundBelCell(bel)), ElementType::CELL);
|
||||
addProperty(topItem, QVariant::String, "Conflicting Cell", ctx->nameOf(ctx->getConflictingBelCell(bel)),
|
||||
addProperty(topItem, QMetaType::QString, "Name", ctx->nameOfBel(bel));
|
||||
addProperty(topItem, QMetaType::QString, "Type", ctx->getBelType(bel).c_str(ctx));
|
||||
addProperty(topItem, QMetaType::Bool, "Available", ctx->checkBelAvail(bel));
|
||||
addProperty(topItem, QMetaType::QString, "Bound Cell", ctx->nameOf(ctx->getBoundBelCell(bel)), ElementType::CELL);
|
||||
addProperty(topItem, QMetaType::QString, "Conflicting Cell", ctx->nameOf(ctx->getConflictingBelCell(bel)),
|
||||
ElementType::CELL);
|
||||
|
||||
QtProperty *attrsItem = addSubGroup(topItem, "Attributes");
|
||||
for (auto &item : ctx->getBelAttrs(bel)) {
|
||||
addProperty(attrsItem, QVariant::String, item.first.c_str(ctx), item.second.c_str());
|
||||
addProperty(attrsItem, QMetaType::QString, item.first.c_str(ctx), item.second.c_str());
|
||||
}
|
||||
|
||||
QtProperty *belpinsItem = addSubGroup(topItem, "Ports");
|
||||
for (const auto &item : ctx->getBelPins(bel)) {
|
||||
QtProperty *portInfoItem = addSubGroup(belpinsItem, item.c_str(ctx));
|
||||
addProperty(portInfoItem, QVariant::String, "Name", item.c_str(ctx));
|
||||
addProperty(portInfoItem, QVariant::Int, "Type", int(ctx->getBelPinType(bel, item)));
|
||||
addProperty(portInfoItem, QMetaType::QString, "Name", item.c_str(ctx));
|
||||
addProperty(portInfoItem, QMetaType::Int, "Type", int(ctx->getBelPinType(bel, item)));
|
||||
WireId wire = ctx->getBelPinWire(bel, item);
|
||||
addProperty(portInfoItem, QVariant::String, "Wire", ctx->nameOfWire(wire), ElementType::WIRE);
|
||||
addProperty(portInfoItem, QMetaType::QString, "Wire", ctx->nameOfWire(wire), ElementType::WIRE);
|
||||
}
|
||||
} else if (type == ElementType::WIRE) {
|
||||
std::lock_guard<std::mutex> lock_ui(ctx->ui_mutex);
|
||||
|
|
@ -657,27 +657,27 @@ void DesignWidget::onSelectionChanged(int num, const QItemSelection &, const QIt
|
|||
WireId wire = ctx->getWireByName(c);
|
||||
QtProperty *topItem = addTopLevelProperty("Wire");
|
||||
|
||||
addProperty(topItem, QVariant::String, "Name", ctx->nameOfWire(wire));
|
||||
addProperty(topItem, QVariant::String, "Type", ctx->getWireType(wire).c_str(ctx));
|
||||
addProperty(topItem, QVariant::Bool, "Available", ctx->checkWireAvail(wire));
|
||||
addProperty(topItem, QVariant::String, "Bound Net", ctx->nameOf(ctx->getBoundWireNet(wire)), ElementType::NET);
|
||||
addProperty(topItem, QVariant::String, "Conflicting Wire", ctx->nameOfWire(ctx->getConflictingWireWire(wire)),
|
||||
addProperty(topItem, QMetaType::QString, "Name", ctx->nameOfWire(wire));
|
||||
addProperty(topItem, QMetaType::QString, "Type", ctx->getWireType(wire).c_str(ctx));
|
||||
addProperty(topItem, QMetaType::Bool, "Available", ctx->checkWireAvail(wire));
|
||||
addProperty(topItem, QMetaType::QString, "Bound Net", ctx->nameOf(ctx->getBoundWireNet(wire)), ElementType::NET);
|
||||
addProperty(topItem, QMetaType::QString, "Conflicting Wire", ctx->nameOfWire(ctx->getConflictingWireWire(wire)),
|
||||
ElementType::WIRE);
|
||||
addProperty(topItem, QVariant::String, "Conflicting Net", ctx->nameOf(ctx->getConflictingWireNet(wire)),
|
||||
addProperty(topItem, QMetaType::QString, "Conflicting Net", ctx->nameOf(ctx->getConflictingWireNet(wire)),
|
||||
ElementType::NET);
|
||||
|
||||
QtProperty *attrsItem = addSubGroup(topItem, "Attributes");
|
||||
for (auto &item : ctx->getWireAttrs(wire)) {
|
||||
addProperty(attrsItem, QVariant::String, item.first.c_str(ctx), item.second.c_str());
|
||||
addProperty(attrsItem, QMetaType::QString, item.first.c_str(ctx), item.second.c_str());
|
||||
}
|
||||
|
||||
DelayQuad delay = ctx->getWireDelay(wire);
|
||||
|
||||
QtProperty *delayItem = addSubGroup(topItem, "Delay");
|
||||
addProperty(delayItem, QVariant::Double, "Min Rise", delay.minRiseDelay());
|
||||
addProperty(delayItem, QVariant::Double, "Max Rise", delay.maxRiseDelay());
|
||||
addProperty(delayItem, QVariant::Double, "Min Fall", delay.minFallDelay());
|
||||
addProperty(delayItem, QVariant::Double, "Max Fall", delay.maxFallDelay());
|
||||
addProperty(delayItem, QMetaType::Double, "Min Rise", delay.minRiseDelay());
|
||||
addProperty(delayItem, QMetaType::Double, "Max Rise", delay.maxRiseDelay());
|
||||
addProperty(delayItem, QMetaType::Double, "Min Fall", delay.minFallDelay());
|
||||
addProperty(delayItem, QMetaType::Double, "Max Fall", delay.maxFallDelay());
|
||||
|
||||
QtProperty *belpinsItem = addSubGroup(topItem, "BelPins");
|
||||
for (const auto &item : ctx->getWireBelPins(wire)) {
|
||||
|
|
@ -687,17 +687,17 @@ void DesignWidget::onSelectionChanged(int num, const QItemSelection &, const QIt
|
|||
QString pinname = item.pin.c_str(ctx);
|
||||
|
||||
QtProperty *dhItem = addSubGroup(belpinsItem, belname + "-" + pinname);
|
||||
addProperty(dhItem, QVariant::String, "Bel", belname, ElementType::BEL);
|
||||
addProperty(dhItem, QVariant::String, "PortPin", pinname);
|
||||
addProperty(dhItem, QMetaType::QString, "Bel", belname, ElementType::BEL);
|
||||
addProperty(dhItem, QMetaType::QString, "PortPin", pinname);
|
||||
}
|
||||
|
||||
int counter = 0;
|
||||
QtProperty *pipsDownItem = addSubGroup(topItem, "Pips Downhill");
|
||||
for (const auto &item : ctx->getPipsDownhill(wire)) {
|
||||
addProperty(pipsDownItem, QVariant::String, "", ctx->nameOfPip(item), ElementType::PIP);
|
||||
addProperty(pipsDownItem, QMetaType::QString, "", ctx->nameOfPip(item), ElementType::PIP);
|
||||
counter++;
|
||||
if (counter == 50) {
|
||||
addProperty(pipsDownItem, QVariant::String, "Warning", "Too many items...", ElementType::NONE);
|
||||
addProperty(pipsDownItem, QMetaType::QString, "Warning", "Too many items...", ElementType::NONE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -705,10 +705,10 @@ void DesignWidget::onSelectionChanged(int num, const QItemSelection &, const QIt
|
|||
counter = 0;
|
||||
QtProperty *pipsUpItem = addSubGroup(topItem, "Pips Uphill");
|
||||
for (const auto &item : ctx->getPipsUphill(wire)) {
|
||||
addProperty(pipsUpItem, QVariant::String, "", ctx->nameOfPip(item), ElementType::PIP);
|
||||
addProperty(pipsUpItem, QMetaType::QString, "", ctx->nameOfPip(item), ElementType::PIP);
|
||||
counter++;
|
||||
if (counter == 50) {
|
||||
addProperty(pipsUpItem, QVariant::String, "Warning", "Too many items...", ElementType::NONE);
|
||||
addProperty(pipsUpItem, QMetaType::QString, "Warning", "Too many items...", ElementType::NONE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -719,34 +719,34 @@ void DesignWidget::onSelectionChanged(int num, const QItemSelection &, const QIt
|
|||
PipId pip = ctx->getPipByName(c);
|
||||
QtProperty *topItem = addTopLevelProperty("Pip");
|
||||
|
||||
addProperty(topItem, QVariant::String, "Name", ctx->nameOfPip(pip));
|
||||
addProperty(topItem, QVariant::String, "Type", ctx->getPipType(pip).c_str(ctx));
|
||||
addProperty(topItem, QVariant::Bool, "Available", ctx->checkPipAvail(pip));
|
||||
addProperty(topItem, QVariant::String, "Bound Net", ctx->nameOf(ctx->getBoundPipNet(pip)), ElementType::NET);
|
||||
addProperty(topItem, QMetaType::QString, "Name", ctx->nameOfPip(pip));
|
||||
addProperty(topItem, QMetaType::QString, "Type", ctx->getPipType(pip).c_str(ctx));
|
||||
addProperty(topItem, QMetaType::Bool, "Available", ctx->checkPipAvail(pip));
|
||||
addProperty(topItem, QMetaType::QString, "Bound Net", ctx->nameOf(ctx->getBoundPipNet(pip)), ElementType::NET);
|
||||
if (ctx->getConflictingPipWire(pip) != WireId()) {
|
||||
addProperty(topItem, QVariant::String, "Conflicting Wire", ctx->nameOfWire(ctx->getConflictingPipWire(pip)),
|
||||
addProperty(topItem, QMetaType::QString, "Conflicting Wire", ctx->nameOfWire(ctx->getConflictingPipWire(pip)),
|
||||
ElementType::WIRE);
|
||||
} else {
|
||||
addProperty(topItem, QVariant::String, "Conflicting Wire", "", ElementType::NONE);
|
||||
addProperty(topItem, QMetaType::QString, "Conflicting Wire", "", ElementType::NONE);
|
||||
}
|
||||
addProperty(topItem, QVariant::String, "Conflicting Net", ctx->nameOf(ctx->getConflictingPipNet(pip)),
|
||||
addProperty(topItem, QMetaType::QString, "Conflicting Net", ctx->nameOf(ctx->getConflictingPipNet(pip)),
|
||||
ElementType::NET);
|
||||
addProperty(topItem, QVariant::String, "Src Wire", ctx->nameOfWire(ctx->getPipSrcWire(pip)), ElementType::WIRE);
|
||||
addProperty(topItem, QVariant::String, "Dest Wire", ctx->nameOfWire(ctx->getPipDstWire(pip)),
|
||||
addProperty(topItem, QMetaType::QString, "Src Wire", ctx->nameOfWire(ctx->getPipSrcWire(pip)), ElementType::WIRE);
|
||||
addProperty(topItem, QMetaType::QString, "Dest Wire", ctx->nameOfWire(ctx->getPipDstWire(pip)),
|
||||
ElementType::WIRE);
|
||||
|
||||
QtProperty *attrsItem = addSubGroup(topItem, "Attributes");
|
||||
for (auto &item : ctx->getPipAttrs(pip)) {
|
||||
addProperty(attrsItem, QVariant::String, item.first.c_str(ctx), item.second.c_str());
|
||||
addProperty(attrsItem, QMetaType::QString, item.first.c_str(ctx), item.second.c_str());
|
||||
}
|
||||
|
||||
DelayQuad delay = ctx->getPipDelay(pip);
|
||||
|
||||
QtProperty *delayItem = addSubGroup(topItem, "Delay");
|
||||
addProperty(delayItem, QVariant::Double, "Min Rise", delay.minRiseDelay());
|
||||
addProperty(delayItem, QVariant::Double, "Max Rise", delay.maxRiseDelay());
|
||||
addProperty(delayItem, QVariant::Double, "Min Fall", delay.minFallDelay());
|
||||
addProperty(delayItem, QVariant::Double, "Max Fall", delay.maxFallDelay());
|
||||
addProperty(delayItem, QMetaType::Double, "Min Rise", delay.minRiseDelay());
|
||||
addProperty(delayItem, QMetaType::Double, "Max Rise", delay.maxRiseDelay());
|
||||
addProperty(delayItem, QMetaType::Double, "Min Fall", delay.minFallDelay());
|
||||
addProperty(delayItem, QMetaType::Double, "Max Fall", delay.maxFallDelay());
|
||||
} else if (type == ElementType::NET) {
|
||||
std::lock_guard<std::mutex> lock_ui(ctx->ui_mutex);
|
||||
std::lock_guard<std::mutex> lock(ctx->mutex);
|
||||
|
|
@ -755,29 +755,29 @@ void DesignWidget::onSelectionChanged(int num, const QItemSelection &, const QIt
|
|||
|
||||
QtProperty *topItem = addTopLevelProperty("Net");
|
||||
|
||||
addProperty(topItem, QVariant::String, "Name", net->name.c_str(ctx));
|
||||
addProperty(topItem, QMetaType::QString, "Name", net->name.c_str(ctx));
|
||||
|
||||
QtProperty *driverItem = addSubGroup(topItem, "Driver");
|
||||
addProperty(driverItem, QVariant::String, "Port", net->driver.port.c_str(ctx));
|
||||
addProperty(driverItem, QMetaType::QString, "Port", net->driver.port.c_str(ctx));
|
||||
if (net->driver.cell)
|
||||
addProperty(driverItem, QVariant::String, "Cell", net->driver.cell->name.c_str(ctx), ElementType::CELL);
|
||||
addProperty(driverItem, QMetaType::QString, "Cell", net->driver.cell->name.c_str(ctx), ElementType::CELL);
|
||||
else
|
||||
addProperty(driverItem, QVariant::String, "Cell", "", ElementType::CELL);
|
||||
addProperty(driverItem, QMetaType::QString, "Cell", "", ElementType::CELL);
|
||||
|
||||
QtProperty *usersItem = addSubGroup(topItem, "Users");
|
||||
for (auto &item : net->users) {
|
||||
QtProperty *portItem = addSubGroup(usersItem, item.port.c_str(ctx));
|
||||
|
||||
addProperty(portItem, QVariant::String, "Port", item.port.c_str(ctx));
|
||||
addProperty(portItem, QMetaType::QString, "Port", item.port.c_str(ctx));
|
||||
if (item.cell)
|
||||
addProperty(portItem, QVariant::String, "Cell", item.cell->name.c_str(ctx), ElementType::CELL);
|
||||
addProperty(portItem, QMetaType::QString, "Cell", item.cell->name.c_str(ctx), ElementType::CELL);
|
||||
else
|
||||
addProperty(portItem, QVariant::String, "Cell", "", ElementType::CELL);
|
||||
addProperty(portItem, QMetaType::QString, "Cell", "", ElementType::CELL);
|
||||
}
|
||||
|
||||
QtProperty *attrsItem = addSubGroup(topItem, "Attributes");
|
||||
for (auto &item : net->attrs) {
|
||||
addProperty(attrsItem, QVariant::String, item.first.c_str(ctx),
|
||||
addProperty(attrsItem, QMetaType::QString, item.first.c_str(ctx),
|
||||
item.second.is_string ? item.second.as_string().c_str() : item.second.to_string().c_str());
|
||||
}
|
||||
|
||||
|
|
@ -786,14 +786,14 @@ void DesignWidget::onSelectionChanged(int num, const QItemSelection &, const QIt
|
|||
auto name = ctx->nameOfWire(item.first);
|
||||
|
||||
QtProperty *wireItem = addSubGroup(wiresItem, name);
|
||||
addProperty(wireItem, QVariant::String, "Wire", name, ElementType::WIRE);
|
||||
addProperty(wireItem, QMetaType::QString, "Wire", name, ElementType::WIRE);
|
||||
|
||||
if (item.second.pip != PipId())
|
||||
addProperty(wireItem, QVariant::String, "Pip", ctx->nameOfPip(item.second.pip), ElementType::PIP);
|
||||
addProperty(wireItem, QMetaType::QString, "Pip", ctx->nameOfPip(item.second.pip), ElementType::PIP);
|
||||
else
|
||||
addProperty(wireItem, QVariant::String, "Pip", "", ElementType::PIP);
|
||||
addProperty(wireItem, QMetaType::QString, "Pip", "", ElementType::PIP);
|
||||
|
||||
addProperty(wireItem, QVariant::Int, "Strength", (int)item.second.strength);
|
||||
addProperty(wireItem, QMetaType::Int, "Strength", (int)item.second.strength);
|
||||
}
|
||||
|
||||
} else if (type == ElementType::CELL) {
|
||||
|
|
@ -804,36 +804,36 @@ void DesignWidget::onSelectionChanged(int num, const QItemSelection &, const QIt
|
|||
|
||||
QtProperty *topItem = addTopLevelProperty("Cell");
|
||||
|
||||
addProperty(topItem, QVariant::String, "Name", cell->name.c_str(ctx));
|
||||
addProperty(topItem, QVariant::String, "Type", cell->type.c_str(ctx));
|
||||
addProperty(topItem, QMetaType::QString, "Name", cell->name.c_str(ctx));
|
||||
addProperty(topItem, QMetaType::QString, "Type", cell->type.c_str(ctx));
|
||||
if (cell->bel != BelId())
|
||||
addProperty(topItem, QVariant::String, "Bel", ctx->nameOfBel(cell->bel), ElementType::BEL);
|
||||
addProperty(topItem, QMetaType::QString, "Bel", ctx->nameOfBel(cell->bel), ElementType::BEL);
|
||||
else
|
||||
addProperty(topItem, QVariant::String, "Bel", "", ElementType::BEL);
|
||||
addProperty(topItem, QVariant::Int, "Bel strength", int(cell->belStrength));
|
||||
addProperty(topItem, QMetaType::QString, "Bel", "", ElementType::BEL);
|
||||
addProperty(topItem, QMetaType::Int, "Bel strength", int(cell->belStrength));
|
||||
|
||||
QtProperty *cellPortsItem = addSubGroup(topItem, "Ports");
|
||||
for (auto &item : cell->ports) {
|
||||
PortInfo p = item.second;
|
||||
|
||||
QtProperty *portInfoItem = addSubGroup(cellPortsItem, p.name.c_str(ctx));
|
||||
addProperty(portInfoItem, QVariant::String, "Name", p.name.c_str(ctx));
|
||||
addProperty(portInfoItem, QVariant::Int, "Type", int(p.type));
|
||||
addProperty(portInfoItem, QMetaType::QString, "Name", p.name.c_str(ctx));
|
||||
addProperty(portInfoItem, QMetaType::Int, "Type", int(p.type));
|
||||
if (p.net)
|
||||
addProperty(portInfoItem, QVariant::String, "Net", p.net->name.c_str(ctx), ElementType::NET);
|
||||
addProperty(portInfoItem, QMetaType::QString, "Net", p.net->name.c_str(ctx), ElementType::NET);
|
||||
else
|
||||
addProperty(portInfoItem, QVariant::String, "Net", "", ElementType::NET);
|
||||
addProperty(portInfoItem, QMetaType::QString, "Net", "", ElementType::NET);
|
||||
}
|
||||
|
||||
QtProperty *cellAttrItem = addSubGroup(topItem, "Attributes");
|
||||
for (auto &item : cell->attrs) {
|
||||
addProperty(cellAttrItem, QVariant::String, item.first.c_str(ctx),
|
||||
addProperty(cellAttrItem, QMetaType::QString, item.first.c_str(ctx),
|
||||
item.second.is_string ? item.second.as_string().c_str() : item.second.to_string().c_str());
|
||||
}
|
||||
|
||||
QtProperty *cellParamsItem = addSubGroup(topItem, "Parameters");
|
||||
for (auto &item : cell->params) {
|
||||
addProperty(cellParamsItem, QVariant::String, item.first.c_str(ctx),
|
||||
addProperty(cellParamsItem, QMetaType::QString, item.first.c_str(ctx),
|
||||
item.second.is_string ? item.second.as_string().c_str() : item.second.to_string().c_str());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue