26 , mComboBox( nullptr )
27 , mLineEdit( nullptr )
43 value = mLineEdit->
text();
51 if (
config(
"Editable" ).toBool() )
59 mComboBox = qobject_cast<
QComboBox*>( editor );
60 mLineEdit = qobject_cast<
QLineEdit*>( editor );
68 Q_FOREACH (
const QVariant& v, values )
84 if ( fle && !(
field().type() == QVariant::Int ||
field().type() == QVariant::Double ||
field().type() == QVariant::LongLong ||
field().type() == QVariant::Date ) )
92 mLineEdit->setCompleter( c );
105 return mComboBox || mLineEdit;
void setCaseSensitivity(Qt::CaseSensitivity caseSensitivity)
void uniqueValues(int index, QList< QVariant > &uniqueValues, int limit=-1)
Calculates a list of unique values contained within an attribute in the layer.
void addItem(const QString &text, const QVariant &userData)
QLineEdit subclass with built in support for clearing the widget's value and handling custom null val...
QVariant itemData(int index, int role) const
void setCompletionMode(CompletionMode mode)
QVariant value(const QString &key, const QVariant &defaultValue) const
QgsSignalBlocker< Object > whileBlocking(Object *object)
Temporarily blocks signals from a QObject while calling a single method from the object.
int findData(const QVariant &data, int role, QFlags< Qt::MatchFlag > flags) const
void setNullValue(const QString &nullValue)
Sets the string representation for null values in the widget.
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
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.