QGIS API Documentation
3.20.0-Odense (decaadbb31)
|
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 } |
Signals | |
void | valueChanged (const QString &) |
emitteed as soon as the current document changes More... | |
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. More... | |
QString | defaultRoot () const |
Configures the base path which should be used if the relativeStorage property is set to QgsFileWidget::RelativeDefaultPath. More... | |
QVariant | documentPath (QVariant::Type type=QVariant::String) const |
documentPath returns the path of the current document in the widget More... | |
QgsExternalResourceWidget::DocumentViewerContent | documentViewerContent () const |
returns the type of content used in the document viewer More... | |
int | documentViewerHeight () const |
returns the height of the document viewer More... | |
int | documentViewerWidth () const |
returns the width of the document viewer More... | |
QgsFileWidget * | fileWidget () |
access the file widget to allow its configuration More... | |
bool | fileWidgetVisible () const |
returns if the file widget is visible in the widget More... | |
QgsFileWidget::RelativeStorage | relativeStorage () const |
Configures if paths are handled absolute or relative and if relative, which should be the base path. More... | |
void | setDefaultRoot (const QString &defaultRoot) |
Configures the base path which should be used if the relativeStorage property is set to QgsFileWidget::RelativeDefaultPath. More... | |
void | setDocumentPath (const QVariant &documentPath) |
void | setDocumentViewerContent (QgsExternalResourceWidget::DocumentViewerContent content) |
setDocumentViewerContent defines the type of content to be shown. Widget will be adapted accordingly More... | |
void | setDocumentViewerHeight (int height) |
setDocumentViewerWidth set the height of the document viewer. More... | |
void | setDocumentViewerWidth (int width) |
setDocumentViewerWidth set the width of the document viewer. More... | |
void | setFileWidgetVisible (bool visible) |
Sets the visibility of the file widget in the layout. More... | |
void | setReadOnly (bool readOnly) |
defines if the widget is readonly More... | |
void | setRelativeStorage (QgsFileWidget::RelativeStorage relativeStorage) |
Configures if paths are handled absolute or relative and if relative, which should be the base path. More... | |
Properties | |
QString | defaultRoot |
DocumentViewerContent | documentViewerContent |
int | documentViewerHeight |
int | documentViewerWidth |
bool | fileWidgetVisible |
QgsFileWidget::RelativeStorage | relativeStorage |
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 46 of file qgsexternalresourcewidget.h.
Enumerator | |
---|---|
NoContent | |
Image | |
Web |
Definition at line 67 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 32 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 189 of file qgsexternalresourcewidget.cpp.
QVariant QgsExternalResourceWidget::documentPath | ( | QVariant::Type | type = QVariant::String | ) | 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 61 of file qgsexternalresourcewidget.cpp.
QgsExternalResourceWidget::DocumentViewerContent QgsExternalResourceWidget::documentViewerContent | ( | ) | const |
returns the type of content used in the document viewer
Definition at line 95 of file qgsexternalresourcewidget.cpp.
int QgsExternalResourceWidget::documentViewerHeight | ( | ) | const |
returns the height of the document viewer
Definition at line 108 of file qgsexternalresourcewidget.cpp.
int QgsExternalResourceWidget::documentViewerWidth | ( | ) | const |
returns the width of the document viewer
Definition at line 119 of file qgsexternalresourcewidget.cpp.
QgsFileWidget * QgsExternalResourceWidget::fileWidget | ( | ) |
access the file widget to allow its configuration
Definition at line 79 of file qgsexternalresourcewidget.cpp.
bool QgsExternalResourceWidget::fileWidgetVisible | ( | ) | const |
returns if the file widget is visible in the widget
Definition at line 84 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 200 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 194 of file qgsexternalresourcewidget.cpp.
void QgsExternalResourceWidget::setDocumentPath | ( | const QVariant & | documentPath | ) |
Definition at line 74 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 100 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 113 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 124 of file qgsexternalresourcewidget.cpp.
void QgsExternalResourceWidget::setFileWidgetVisible | ( | bool | visible | ) |
Sets the visibility of the file widget in the layout.
Definition at line 89 of file qgsexternalresourcewidget.cpp.
void QgsExternalResourceWidget::setReadOnly | ( | bool | readOnly | ) |
defines if the widget is readonly
Definition at line 130 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 205 of file qgsexternalresourcewidget.cpp.
|
signal |
emitteed as soon as the current document changes
|
readwrite |
Definition at line 1 of file qgsexternalresourcewidget.h.
|
readwrite |
Definition at line 1 of file qgsexternalresourcewidget.h.
|
readwrite |
Definition at line 1 of file qgsexternalresourcewidget.h.
|
readwrite |
Definition at line 1 of file qgsexternalresourcewidget.h.
|
readwrite |
Definition at line 1 of file qgsexternalresourcewidget.h.
|
readwrite |
Definition at line 1 of file qgsexternalresourcewidget.h.