58 if ( qobject_cast<QgsExternalResourceWidget *>( sipCpp ) )
59 sipType = sipType_QgsExternalResourceWidget;
66 Q_PROPERTY(
bool fileWidgetVisible READ fileWidgetVisible WRITE setFileWidgetVisible )
67 Q_PROPERTY(
DocumentViewerContent documentViewerContent READ documentViewerContent WRITE setDocumentViewerContent )
68 Q_PROPERTY(
int documentViewerHeight READ documentViewerHeight WRITE setDocumentViewerHeight )
69 Q_PROPERTY(
int documentViewerWidth READ documentViewerWidth WRITE setDocumentViewerWidth )
70 Q_PROPERTY(
QgsFileWidget::RelativeStorage relativeStorage READ relativeStorage WRITE setRelativeStorage )
71 Q_PROPERTY( QString defaultRoot READ defaultRoot WRITE setDefaultRoot )
94 QVariant documentPath( QMetaType::Type type = QMetaType::Type::QString )
const;
101 Q_DECL_DEPRECATED QVariant documentPath( QVariant::Type type )
const SIP_DEPRECATED;
103 void setDocumentPath(
const QVariant &documentPath );
111 bool fileWidgetVisible()
const;
113 void setFileWidgetVisible(
bool visible );
121 int documentViewerHeight()
const;
127 void setDocumentViewerHeight(
int height );
129 int documentViewerWidth()
const;
135 void setDocumentViewerWidth(
int width );
138 void setReadOnly(
bool readOnly );
157 QString defaultRoot()
const;
163 void setDefaultRoot(
const QString &defaultRoot );
171 void setStorageType(
const QString &storageType );
179 QString storageType()
const;
186 void setStorageAuthConfigId(
const QString &authCfg );
192 QString storageAuthConfigId()
const;
211 void loadDocument(
const QString &path );
212 void onFetchFinished();
215 void updateDocumentViewer();
220 void updateDocumentContent(
const QString &filePath );
227 QString resolvePath(
const QString &path );
230 bool mFileWidgetVisible =
true;
233 int mDocumentViewerHeight = 0;
234 int mDocumentViewerWidth = 0;
237 QString mDefaultRoot;
244 QWebView *mWebView =
nullptr;
248 QLabel *mLoadingLabel =
nullptr;
249 QLabel *mErrorLabel =
nullptr;
250 QMovie *mLoadingMovie =
nullptr;
251 QPointer<QgsExternalStorageFetchedContent> mContent;
253 friend class TestQgsExternalResourceWidgetWrapper;
Class for QgsExternalStorage fetched content.