17#ifndef QGSEXTERNALRESOURCEWIDGET_H
18#define QGSEXTERNALRESOURCEWIDGET_H
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 )
71 Q_PROPERTY( QString defaultRoot READ defaultRoot WRITE setDefaultRoot )
94 QVariant documentPath( QVariant::Type type = QVariant::String )
const;
95 void setDocumentPath(
const QVariant &documentPath );
103 bool fileWidgetVisible()
const;
105 void setFileWidgetVisible(
bool visible );
113 int documentViewerHeight()
const;
119 void setDocumentViewerHeight(
int height );
121 int documentViewerWidth()
const;
127 void setDocumentViewerWidth(
int width );
130 void setReadOnly(
bool readOnly );
149 QString defaultRoot()
const;
155 void setDefaultRoot(
const QString &defaultRoot );
163 void setStorageType(
const QString &storageType );
171 QString storageType()
const;
178 void setStorageAuthConfigId(
const QString &authCfg );
184 QString storageAuthConfigId()
const;
203 void loadDocument(
const QString &path );
204 void onFetchFinished();
207 void updateDocumentViewer();
212 void updateDocumentContent(
const QString &filePath );
219 QString resolvePath(
const QString &path );
222 bool mFileWidgetVisible =
true;
225 int mDocumentViewerHeight = 0;
226 int mDocumentViewerWidth = 0;
229 QString mDefaultRoot;
236 QWebView *mWebView =
nullptr;
240 QLabel *mLoadingLabel =
nullptr;
241 QLabel *mErrorLabel =
nullptr;
242 QMovie *mLoadingMovie =
nullptr;
243 QPointer<QgsExternalStorageFetchedContent> mContent;
245 friend class TestQgsExternalResourceWidgetWrapper;
Class for QgsExternalStorage fetched content.
A bar for displaying non-blocking messages to the user.
The QgsPixmapLabel class shows a pixmap and adjusts its size to the space given to the widget by the ...
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)