43 cfg.insert(
"Style", configElement.
attribute(
"Style" ) );
44 cfg.insert(
"Min", configElement.
attribute(
"Min" ) );
45 cfg.insert(
"Max", configElement.
attribute(
"Max" ) );
46 cfg.insert(
"Step", configElement.
attribute(
"Step" ) );
47 cfg.insert(
"AllowNull", configElement.
attribute(
"AllowNull" ) ==
"1" );
51 cfg.insert(
"Suffix", configElement.
attribute(
"Suffix" ) );
63 configElement.
setAttribute(
"Style", config[
"Style"].toString() );
64 configElement.
setAttribute(
"Min", config[
"Min"].toString() );
65 configElement.
setAttribute(
"Max", config[
"Max"].toString() );
66 configElement.
setAttribute(
"Step", config[
"Step"].toString() );
67 configElement.
setAttribute(
"AllowNull", config[
"AllowNull"].toBool() );
68 if ( config.contains(
"Suffix" ) )
70 configElement.
setAttribute(
"Suffix", config[
"Suffix"].toString() );
74 bool QgsRangeWidgetFactory::isFieldSupported(
QgsVectorLayer* vl,
int fieldIdx )
78 case QVariant::LongLong:
79 case QVariant::Double:
91 map.
insert( QSlider::staticMetaObject.className(), 10 );
92 map.
insert( QDial::staticMetaObject.className(), 10 );
93 map.
insert( QSpinBox::staticMetaObject.className(), 10 );
94 map.
insert( QDoubleSpinBox::staticMetaObject.className(), 10 );
QString attribute(const QString &name, const QString &defValue) const
const QgsField & at(int i) const
Get field at particular index (must be in range 0..N-1)
QgsFields fields() const
Returns the list of fields of this layer.
QVariantMap QgsEditorWidgetConfig
Holds a set of configuration parameters for a editor widget wrapper.
bool hasAttribute(const QString &name) const
void setAttribute(const QString &name, const QString &value)
iterator insert(const Key &key, const T &value)
Represents a vector layer which manages a vector based data sets.
QVariant::Type type() const
Gets variant type of the field as it will be retrieved from data source.