Subgroup: other

Class: QgsExternalResourceWidget

class qgis.gui.QgsExternalResourceWidget

Bases: PyQt5.QtWidgets.QWidget

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. *

Methods

acceptDrops
accessibleDescription
accessibleName
actionEvent
actions
activateWindow
addAction
addActions
adjustSize
autoFillBackground
backgroundRole
baseSize
blockSignals
changeEvent
childAt childAt(self, int, int) -> QWidget
childEvent
children
childrenRect
childrenRegion
clearFocus
clearMask
close
closeEvent
colorCount
connectNotify
contentsMargins
contentsRect
contextMenuEvent
contextMenuPolicy
create
createWindowContainer
cursor
customEvent
defaultRoot Configures the base path which should be used if the relativeStorage property is set to QgsFileWidget.RelativeDefaultPath.
deleteLater
depth
destroy
devType
devicePixelRatio
devicePixelRatioF
devicePixelRatioFScale
disconnect
disconnectNotify
documentPath documentPath returns the path of the current document in the widget
documentViewerContent returns the type of content used in the document viewer
documentViewerHeight returns the height of the document viewer
documentViewerWidth returns the width of the document viewer
dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
effectiveWinId
ensurePolished
enterEvent
event
eventFilter
fileWidget access the file widget to allow its configuration
fileWidgetVisible returns if the file widget is visible in the widget
find
findChild findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject
findChildren findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]
focusInEvent
focusNextChild
focusNextPrevChild
focusOutEvent
focusPolicy
focusPreviousChild
focusProxy
focusWidget
font
fontInfo
fontMetrics
foregroundRole
frameGeometry
frameSize
geometry
getContentsMargins
grab
grabGesture
grabKeyboard
grabMouse grabMouse(self, Union[QCursor, Qt.CursorShape])
grabShortcut
graphicsEffect
graphicsProxyWidget
hasFocus
hasHeightForWidth
hasMouseTracking
hasTabletTracking
height
heightForWidth
heightMM
hide
hideEvent
inherits
initPainter
inputMethodEvent
inputMethodHints
inputMethodQuery
insertAction
insertActions
installEventFilter
isActiveWindow
isAncestorOf
isEnabled
isEnabledTo
isFullScreen
isHidden
isLeftToRight
isMaximized
isMinimized
isModal
isRightToLeft
isSignalConnected
isVisible
isVisibleTo
isWidgetType
isWindow
isWindowModified
isWindowType
keyPressEvent
keyReleaseEvent
keyboardGrabber
killTimer
layout
layoutDirection
leaveEvent
locale
logicalDpiX
logicalDpiY
lower
mapFrom
mapFromGlobal
mapFromParent
mapTo
mapToGlobal
mapToParent
mask
maximumHeight
maximumSize
maximumWidth
metaObject
metric
minimumHeight
minimumSize
minimumSizeHint
minimumWidth
mouseDoubleClickEvent
mouseGrabber
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
move move(self, int, int)
moveEvent
moveToThread
nativeEvent
nativeParentWidget
nextInFocusChain
normalGeometry
objectName
overrideWindowFlags
overrideWindowState
paintEngine
paintEvent
paintingActive
palette
parent
parentWidget
physicalDpiX
physicalDpiY
pos
previousInFocusChain
property
pyqtConfigure Each keyword argument is either the name of a Qt property or a Qt signal.
raise_
receivers
rect
relativeStorage Configures if paths are handled absolute or relative and if relative, which should be the base path.
releaseKeyboard
releaseMouse
releaseShortcut
removeAction
removeEventFilter
render render(self, QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground|QWidget.DrawChildren))
repaint repaint(self, int, int, int, int)
resize resize(self, int, int)
resizeEvent
restoreGeometry
saveGeometry
scroll scroll(self, int, int, QRect)
sender
senderSignalIndex
setAcceptDrops
setAccessibleDescription
setAccessibleName
setAttribute
setAutoFillBackground
setBackgroundRole
setBaseSize setBaseSize(self, QSize)
setContentsMargins setContentsMargins(self, QMargins)
setContextMenuPolicy
setCursor
setDefaultRoot Configures the base path which should be used if the relativeStorage property is set to QgsFileWidget.RelativeDefaultPath.
setDisabled
setDocumentPath
setDocumentViewerContent setDocumentViewerContent defines the type of content to be shown. Widget will be adapted accordingly
setDocumentViewerHeight setDocumentViewerWidth set the height of the document viewer.
setDocumentViewerWidth setDocumentViewerWidth set the width of the document viewer.
setEnabled
setFileWidgetVisible set the visiblity of the file widget in the layout
setFixedHeight
setFixedSize setFixedSize(self, int, int)
setFixedWidth
setFocus setFocus(self, Qt.FocusReason)
setFocusPolicy
setFocusProxy
setFont
setForegroundRole
setGeometry setGeometry(self, int, int, int, int)
setGraphicsEffect
setHidden
setInputMethodHints
setLayout
setLayoutDirection
setLocale
setMask setMask(self, QRegion)
setMaximumHeight
setMaximumSize setMaximumSize(self, QSize)
setMaximumWidth
setMinimumHeight
setMinimumSize setMinimumSize(self, QSize)
setMinimumWidth
setMouseTracking
setObjectName
setPalette
setParent setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType])
setProperty
setReadOnly defines if the widget is readonly
setRelativeStorage Configures if paths are handled absolute or relative and if relative, which should be the base path.
setShortcutAutoRepeat
setShortcutEnabled
setSizeIncrement setSizeIncrement(self, QSize)
setSizePolicy setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy)
setStatusTip
setStyle
setStyleSheet
setTabOrder
setTabletTracking
setToolTip
setToolTipDuration
setUpdatesEnabled
setVisible
setWhatsThis
setWindowFilePath
setWindowFlag
setWindowFlags
setWindowIcon
setWindowIconText
setWindowModality
setWindowModified
setWindowOpacity
setWindowRole
setWindowState
setWindowTitle
sharedPainter
show
showEvent
showFullScreen
showMaximized
showMinimized
showNormal
signalsBlocked
size
sizeHint
sizeIncrement
sizePolicy
stackUnder
startTimer
statusTip
style
styleSheet
tabletEvent
testAttribute
thread
timerEvent
toolTip
toolTipDuration
tr
underMouse
ungrabGesture
unsetCursor
unsetLayoutDirection
unsetLocale
update update(self, QRect)
updateGeometry
updateMicroFocus
updatesEnabled
visibleRegion
whatsThis
wheelEvent
width
widthMM
winId
window
windowFilePath
windowFlags
windowHandle
windowIcon
windowIconText
windowModality
windowOpacity
windowRole
windowState
windowTitle
windowType
x
y

Attributes

DrawChildren
DrawWindowBackground
IgnoreMask
Image
NoContent
PdmDepth
PdmDevicePixelRatio
PdmDevicePixelRatioScaled
PdmDpiX
PdmDpiY
PdmHeight
PdmHeightMM
PdmNumColors
PdmPhysicalDpiX
PdmPhysicalDpiY
PdmWidth
PdmWidthMM
Web
customContextMenuRequested customContextMenuRequested(self, QPoint) [signal]
destroyed destroyed(self, QObject = None) [signal]
objectNameChanged objectNameChanged(self, str) [signal]
staticMetaObject
valueChanged emitteed as soon as the current document changes [signal]
windowIconChanged windowIconChanged(self, QIcon) [signal]
windowIconTextChanged windowIconTextChanged(self, str) [signal]
windowTitleChanged windowTitleChanged(self, str) [signal]
class DocumentViewerContent

Bases: int

Image = 1
NoContent = 0
Web = 2
actionEvent()
changeEvent()
childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
customEvent()
defaultRoot(self) → str

Configures the base path which should be used if the relativeStorage property is set to QgsFileWidget.RelativeDefaultPath.

destroy()
disconnectNotify()
documentPath(self, type: QVariant.Type = QVariant.String) → Any

documentPath returns the path of the current document in the widget

Parameters:type – determines the type of the returned null variant if the document is not defined yet
documentViewerContent(self) → QgsExternalResourceWidget.DocumentViewerContent

returns the type of content used in the document viewer

documentViewerHeight(self) → int

returns the height of the document viewer

documentViewerWidth(self) → int

returns the width of the document viewer

dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
event()
fileWidget(self) → QgsFileWidget

access the file widget to allow its configuration

fileWidgetVisible(self) → bool

returns if the file widget is visible in the widget

focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
initPainter()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
receivers()
relativeStorage(self) → QgsFileWidget.RelativeStorage

Configures if paths are handled absolute or relative and if relative, which should be the base path.

resizeEvent()
sender()
senderSignalIndex()
setDefaultRoot(self, defaultRoot: str)

Configures the base path which should be used if the relativeStorage property is set to QgsFileWidget.RelativeDefaultPath.

setDocumentPath(self, documentPath: Any)
setDocumentViewerContent(self, content: QgsExternalResourceWidget.DocumentViewerContent)

setDocumentViewerContent defines the type of content to be shown. Widget will be adapted accordingly

setDocumentViewerHeight(self, height: int)

setDocumentViewerWidth set the height of the document viewer.

Parameters:height – the height. Use 0 for automatic best display.
setDocumentViewerWidth(self, width: int)

setDocumentViewerWidth set the width of the document viewer.

Parameters:width – the width. Use 0 for automatic best display.
setFileWidgetVisible(self, visible: bool)

set the visiblity of the file widget in the layout

setReadOnly(self, readOnly: bool)

defines if the widget is readonly

setRelativeStorage(self, relativeStorage: QgsFileWidget.RelativeStorage)

Configures if paths are handled absolute or relative and if relative, which should be the base path.

sharedPainter()
showEvent()
tabletEvent()
timerEvent()
updateMicroFocus()
valueChanged

emitteed as soon as the current document changes [signal]

wheelEvent()