22 #include <QGridLayout> 23 #include <QFileDialog> 29 , mLineEdit( nullptr )
34 void QgsWebViewWidgetWrapper::loadUrl(
const QString &url )
38 if (
QUrl( url ).isRelative() )
54 v = mLineEdit->
text();
96 mLineEdit = qobject_cast<
QLineEdit*>( editor );
126 mWebView->settings()->
setAttribute( QWebSettings::LocalContentCanAccessRemoteUrls,
true );
127 mWebView->settings()->
setAttribute( QWebSettings::JavascriptCanOpenWindows,
true );
128 mWebView->settings()->
setAttribute( QWebSettings::PluginsEnabled,
true );
130 mWebView->settings()->
setAttribute( QWebSettings::DeveloperExtrasEnabled,
true );
135 connect( mButton, SIGNAL( clicked() ),
this, SLOT( selectFileName() ) );
146 return mWebView || mButton || mLineEdit;
171 void QgsWebViewWidgetWrapper::selectFileName()
176 text = mLineEdit->
text();
190 mLineEdit->
setText( filePath );
193 void QgsWebViewWidgetWrapper::updateConstraintWidgetStatus(
bool constraintValid )
197 if ( constraintValid )
201 mLineEdit->
setStyleSheet(
"QgsFilterLineEdit { background-color: #dd7777; }" );
QString toNativeSeparators(const QString &pathName)
QString relativeFilePath(const QString &fileName) const
void setContentsMargins(int left, int top, int right, int bottom)
void load(const QUrl &url)
QString filePath(const QString &fileName) const
QString tr(const char *sourceText, const char *disambiguation, int n)
void setObjectName(const QString &name)
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
QLineEdit subclass with built in support for clearing the widget's value and handling custom null val...
void setMargin(int margin)
QString cleanPath(const QString &path)
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.
static QgsNetworkAccessManager * instance()
returns a pointer to the single instance
static QgsProject * instance()
Returns the QgsProject singleton instance.
QString getOpenFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFlags< QFileDialog::Option > options)
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.
QUrl fromEncoded(const QByteArray &input)
QByteArray toUtf8() const
T findChild(const QString &name) const