QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
Widget to display file path with a push button for an "open file" dialog It can also be used to display a picture or a web page. More...
#include <qgsexternalresourcewidget.h>
Public Types | |
enum | DocumentViewerContent { NoContent , Image , Web , Audio , Video } |
Signals | |
void | valueChanged (const QString &value) |
Emitted as soon as the current document changes. | |
Public Member Functions | |
QgsExternalResourceWidget (QWidget *parent=nullptr) | |
QgsExternalResourceWidget creates a widget with a file widget and a document viewer Both part of the widget are optional. | |
QString | defaultRoot () const |
Configures the base path which should be used if the relativeStorage property is set to QgsFileWidget::RelativeDefaultPath. | |
QVariant | documentPath (QMetaType::Type type=QMetaType::Type::QString) const |
documentPath returns the path of the current document in the widget | |
Q_DECL_DEPRECATED QVariant | documentPath (QVariant::Type type) const |
documentPath returns the path of the current document in the widget | |
QgsExternalResourceWidget::DocumentViewerContent | documentViewerContent () const |
returns the type of content used in the document viewer | |
int | documentViewerHeight () const |
returns the height of the document viewer | |
int | documentViewerWidth () const |
returns the width of the document viewer | |
QgsExternalStorageFileWidget * | fileWidget () |
Returns file widget to allow its configuration. | |
bool | fileWidgetVisible () const |
returns if the file widget is visible in the widget | |
QgsMessageBar * | messageBar () const |
Returns message bar used to report messages. | |
QgsFileWidget::RelativeStorage | relativeStorage () const |
Configures if paths are handled absolute or relative and if relative, which should be the base path. | |
void | setDefaultRoot (const QString &defaultRoot) |
Configures the base path which should be used if the relativeStorage property is set to QgsFileWidget::RelativeDefaultPath. | |
void | setDocumentPath (const QVariant &documentPath) |
void | setDocumentViewerContent (QgsExternalResourceWidget::DocumentViewerContent content) |
setDocumentViewerContent defines the type of content to be shown. Widget will be adapted accordingly | |
void | setDocumentViewerHeight (int height) |
setDocumentViewerWidth set the height of the document viewer. | |
void | setDocumentViewerWidth (int width) |
setDocumentViewerWidth set the width of the document viewer. | |
void | setFileWidgetVisible (bool visible) |
Sets the visibility of the file widget in the layout. | |
void | setMessageBar (QgsMessageBar *messageBar) |
Set messageBar to report messages. | |
void | setReadOnly (bool readOnly) |
defines if the widget is readonly | |
void | setRelativeStorage (QgsFileWidget::RelativeStorage relativeStorage) |
Configures if paths are handled absolute or relative and if relative, which should be the base path. | |
void | setStorageAuthConfigId (const QString &authCfg) |
Sets the authentication configuration ID to be used for the current external storage (if defined) | |
void | setStorageType (const QString &storageType) |
Set storageType storage type unique identifier as defined in QgsExternalStorageRegistry or null QString if there is no storage defined, only file selection. | |
QString | storageAuthConfigId () const |
Returns the authentication configuration ID used for the current external storage (if defined) | |
QString | storageType () const |
Returns storage type unique identifier as defined in QgsExternalStorageRegistry. | |
Properties | |
QString | defaultRoot |
DocumentViewerContent | documentViewerContent |
int | documentViewerHeight |
int | documentViewerWidth |
bool | fileWidgetVisible |
QgsFileWidget::RelativeStorage | relativeStorage |
Friends | |
class | TestQgsExternalResourceWidgetWrapper |
Widget to display file path with a push button for an "open file" dialog It can also be used to display a picture or a web page.
Definition at line 53 of file qgsexternalresourcewidget.h.
Enumerator | |
---|---|
NoContent | |
Image | |
Web | |
Audio | |
Video |
Definition at line 74 of file qgsexternalresourcewidget.h.
|
explicit |
QgsExternalResourceWidget creates a widget with a file widget and a document viewer Both part of the widget are optional.
Definition at line 41 of file qgsexternalresourcewidget.cpp.
QString QgsExternalResourceWidget::defaultRoot | ( | ) | const |
Configures the base path which should be used if the relativeStorage property is set to QgsFileWidget::RelativeDefaultPath.
Definition at line 264 of file qgsexternalresourcewidget.cpp.
QVariant QgsExternalResourceWidget::documentPath | ( | QMetaType::Type | type = QMetaType::Type::QString | ) | const |
documentPath returns the path of the current document in the widget
type | determines the type of the returned null variant if the document is not defined yet |
Definition at line 84 of file qgsexternalresourcewidget.cpp.
QVariant QgsExternalResourceWidget::documentPath | ( | QVariant::Type | type | ) | const |
documentPath returns the path of the current document in the widget
type | determines the type of the returned null variant if the document is not defined yet |
Definition at line 97 of file qgsexternalresourcewidget.cpp.
QgsExternalResourceWidget::DocumentViewerContent QgsExternalResourceWidget::documentViewerContent | ( | ) | const |
returns the type of content used in the document viewer
Definition at line 124 of file qgsexternalresourcewidget.cpp.
int QgsExternalResourceWidget::documentViewerHeight | ( | ) | const |
returns the height of the document viewer
Definition at line 137 of file qgsexternalresourcewidget.cpp.
int QgsExternalResourceWidget::documentViewerWidth | ( | ) | const |
returns the width of the document viewer
Definition at line 148 of file qgsexternalresourcewidget.cpp.
QgsExternalStorageFileWidget * QgsExternalResourceWidget::fileWidget | ( | ) |
Returns file widget to allow its configuration.
Definition at line 108 of file qgsexternalresourcewidget.cpp.
bool QgsExternalResourceWidget::fileWidgetVisible | ( | ) | const |
returns if the file widget is visible in the widget
Definition at line 113 of file qgsexternalresourcewidget.cpp.
QgsMessageBar * QgsExternalResourceWidget::messageBar | ( | ) | const |
Returns message bar used to report messages.
Definition at line 311 of file qgsexternalresourcewidget.cpp.
QgsFileWidget::RelativeStorage QgsExternalResourceWidget::relativeStorage | ( | ) | const |
Configures if paths are handled absolute or relative and if relative, which should be the base path.
Definition at line 275 of file qgsexternalresourcewidget.cpp.
void QgsExternalResourceWidget::setDefaultRoot | ( | const QString & | defaultRoot | ) |
Configures the base path which should be used if the relativeStorage property is set to QgsFileWidget::RelativeDefaultPath.
Definition at line 269 of file qgsexternalresourcewidget.cpp.
void QgsExternalResourceWidget::setDocumentPath | ( | const QVariant & | documentPath | ) |
Definition at line 103 of file qgsexternalresourcewidget.cpp.
void QgsExternalResourceWidget::setDocumentViewerContent | ( | QgsExternalResourceWidget::DocumentViewerContent | content | ) |
setDocumentViewerContent defines the type of content to be shown. Widget will be adapted accordingly
Definition at line 129 of file qgsexternalresourcewidget.cpp.
void QgsExternalResourceWidget::setDocumentViewerHeight | ( | int | height | ) |
setDocumentViewerWidth set the height of the document viewer.
height | the height. Use 0 for automatic best display. |
Definition at line 142 of file qgsexternalresourcewidget.cpp.
void QgsExternalResourceWidget::setDocumentViewerWidth | ( | int | width | ) |
setDocumentViewerWidth set the width of the document viewer.
width | the width. Use 0 for automatic best display. |
Definition at line 153 of file qgsexternalresourcewidget.cpp.
void QgsExternalResourceWidget::setFileWidgetVisible | ( | bool | visible | ) |
Sets the visibility of the file widget in the layout.
Definition at line 118 of file qgsexternalresourcewidget.cpp.
void QgsExternalResourceWidget::setMessageBar | ( | QgsMessageBar * | messageBar | ) |
Set messageBar to report messages.
Definition at line 306 of file qgsexternalresourcewidget.cpp.
void QgsExternalResourceWidget::setReadOnly | ( | bool | readOnly | ) |
defines if the widget is readonly
Definition at line 159 of file qgsexternalresourcewidget.cpp.
void QgsExternalResourceWidget::setRelativeStorage | ( | QgsFileWidget::RelativeStorage | relativeStorage | ) |
Configures if paths are handled absolute or relative and if relative, which should be the base path.
Definition at line 280 of file qgsexternalresourcewidget.cpp.
void QgsExternalResourceWidget::setStorageAuthConfigId | ( | const QString & | authCfg | ) |
Sets the authentication configuration ID to be used for the current external storage (if defined)
Definition at line 296 of file qgsexternalresourcewidget.cpp.
void QgsExternalResourceWidget::setStorageType | ( | const QString & | storageType | ) |
Set storageType storage type unique identifier as defined in QgsExternalStorageRegistry or null QString if there is no storage defined, only file selection.
Definition at line 286 of file qgsexternalresourcewidget.cpp.
QString QgsExternalResourceWidget::storageAuthConfigId | ( | ) | const |
Returns the authentication configuration ID used for the current external storage (if defined)
Definition at line 301 of file qgsexternalresourcewidget.cpp.
QString QgsExternalResourceWidget::storageType | ( | ) | const |
Returns storage type unique identifier as defined in QgsExternalStorageRegistry.
Returns null QString if there is no storage defined, only file selection.
Definition at line 291 of file qgsexternalresourcewidget.cpp.
|
signal |
Emitted as soon as the current document changes.
|
friend |
Definition at line 253 of file qgsexternalresourcewidget.h.
|
readwrite |
Definition at line 71 of file qgsexternalresourcewidget.h.
|
readwrite |
Definition at line 67 of file qgsexternalresourcewidget.h.
|
readwrite |
Definition at line 68 of file qgsexternalresourcewidget.h.
|
readwrite |
Definition at line 69 of file qgsexternalresourcewidget.h.
|
readwrite |
Definition at line 66 of file qgsexternalresourcewidget.h.
|
readwrite |
Definition at line 70 of file qgsexternalresourcewidget.h.