57 if ( qobject_cast<QgsExternalResourceWidget *>( sipCpp ) )
58 sipType = sipType_QgsExternalResourceWidget;
65 Q_PROPERTY(
bool fileWidgetVisible READ fileWidgetVisible WRITE setFileWidgetVisible )
66 Q_PROPERTY(
DocumentViewerContent documentViewerContent READ documentViewerContent WRITE setDocumentViewerContent )
67 Q_PROPERTY(
int documentViewerHeight READ documentViewerHeight WRITE setDocumentViewerHeight )
68 Q_PROPERTY(
int documentViewerWidth READ documentViewerWidth WRITE setDocumentViewerWidth )
69 Q_PROPERTY(
QgsFileWidget::RelativeStorage relativeStorage READ relativeStorage WRITE setRelativeStorage )
70 Q_PROPERTY( QString defaultRoot READ defaultRoot WRITE setDefaultRoot )
93 QVariant documentPath( QMetaType::Type type = QMetaType::Type::QString )
const;
100 Q_DECL_DEPRECATED QVariant documentPath( QVariant::Type type )
const SIP_DEPRECATED;
102 void setDocumentPath(
const QVariant &documentPath );
110 bool fileWidgetVisible()
const;
112 void setFileWidgetVisible(
bool visible );
120 int documentViewerHeight()
const;
126 void setDocumentViewerHeight(
int height );
128 int documentViewerWidth()
const;
134 void setDocumentViewerWidth(
int width );
137 void setReadOnly(
bool readOnly );
156 QString defaultRoot()
const;
162 void setDefaultRoot(
const QString &defaultRoot );
170 void setStorageType(
const QString &storageType );
178 QString storageType()
const;
185 void setStorageAuthConfigId(
const QString &authCfg );
191 QString storageAuthConfigId()
const;
210 void loadDocument(
const QString &path );
211 void onFetchFinished();
214 void updateDocumentViewer();
219 void updateDocumentContent(
const QString &filePath );
226 QString resolvePath(
const QString &path );
229 bool mFileWidgetVisible =
true;
232 int mDocumentViewerHeight = 0;
233 int mDocumentViewerWidth = 0;
236 QString mDefaultRoot;
243 QWebView *mWebView =
nullptr;
247 QLabel *mLoadingLabel =
nullptr;
248 QLabel *mErrorLabel =
nullptr;
249 QMovie *mLoadingMovie =
nullptr;
250 QPointer<QgsExternalStorageFetchedContent> mContent;
252 friend class TestQgsExternalResourceWidgetWrapper;
Class for QgsExternalStorage fetched content.