18 #include <QPushButton> 29 , mLineEdit( nullptr )
31 , mQgsWidget( nullptr )
50 return mLineEdit->
text();
77 return mLineEdit || mLabel || mQgsWidget;
87 mLineEdit = qobject_cast<
QLineEdit*>( editor );
88 mLabel = qobject_cast<
QLabel*>( editor );
105 if (
config().contains(
"UseLink" ) )
107 mQgsWidget->fileWidget()->setUseLink(
config(
"UseLink" ).toBool() );
109 if (
config().contains(
"FullUrl" ) )
111 mQgsWidget->fileWidget()->setFullUrl(
config(
"FullUrl" ).toBool() );
113 if (
config().contains(
"DefaultRoot" ) )
115 mQgsWidget->setDefaultRoot(
config(
"DefaultRoot" ).toString() );
117 if (
config().contains(
"StorageMode" ) )
121 if (
config().contains(
"RelativeStorage" ) )
125 if (
config().contains(
"FileWidget" ) )
127 mQgsWidget->setFileWidgetVisible(
config(
"FileWidget" ).toBool() );
129 if (
config().contains(
"FileWidgetButton" ) )
131 mQgsWidget->fileWidget()->setFileWidgetButtonVisible(
config(
"FileWidgetButton" ).toBool() );
133 if (
config().contains(
"DocumentViewer" ) )
137 if (
config().contains(
"FileWidgetFilter" ) )
139 mQgsWidget->fileWidget()->setFilter(
config(
"FileWidgetFilter" ).toString() );
191 void QgsExternalResourceWidgetWrapper::updateConstraintWidgetStatus(
bool constraintValid )
195 if ( constraintValid )
198 mLineEdit->
setStyleSheet(
"QgsFilterLineEdit { background-color: #dd7777; }" );
QLineEdit subclass with built in support for clearing the widget's value and handling custom null val...
void setText(const QString &)
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.
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.
T findChild(const QString &name) const