Class: QgsOptionsDialogBase¶
-
class
qgis.gui.
QgsOptionsDialogBase
(settingsKey: str, parent: QWidget = None, fl: Union[Qt.WindowFlags, Qt.WindowType] = 0, settings: QgsSettings = None)¶ Bases:
PyQt5.QtWidgets.QDialog
Constructor
- Parameters
settingsKey – QgsSettings subgroup key for saving/restore ui states, e.g. “ProjectProperties”.
parent – parent object (owner)
fl – widget flags
settings – custom QgsSettings pointer
A base dialog for options and properties dialogs that offers vertical tabs. It handles saving/restoring of geometry, splitter and current tab states, switching vertical tabs between icon/text to icon-only modes (splitter collapsed to left), and connecting QDialogButtonBox’s accepted/rejected signals to dialog’s accept/reject slots
To use: 1) Start with copy of qgsoptionsdialog_template.ui and build options/properties dialog. 2) In source file for dialog, inherit this class instead of QDialog, then in constructor: … setupUi( this ); // set up .ui file objects initOptionsBase( false ); // set up this class to use .ui objects, optionally restoring base ui … restoreOptionsBaseUi(); // restore the base ui with initOptionsBase or use this later on
Enums
Methods
Determine if the options list is in icon only mode
Set up the base ui connections for vertical tabs.
Select relevant tab on current page change
Remove tab and unregister widgets on page remove
register widgets in the dialog to search for text in it it is automatically called if a line edit has “mSearchLineEdit” as object name.
Restore the base ui.
searchText searches for a text in all the pages of the stacked widget and highlight the results
Update tabs on the splitter move
Signals
Attributes
-
actionEvent
()¶
-
changeEvent
()¶
-
childEvent
()¶
-
closeEvent
()¶
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
create
()¶
-
customEvent
()¶
-
destroy
()¶
-
disconnectNotify
()¶
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
dropEvent
()¶
-
enterEvent
()¶
-
event
()¶
-
eventFilter
()¶
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
hideEvent
()¶
-
iconOnly
(self) → bool¶ Determine if the options list is in icon only mode
-
initOptionsBase
(self, restoreUi: bool = True, title: str = '')¶ Set up the base ui connections for vertical tabs.
- Parameters
restoreUi – Whether to restore the base ui at this time.
title – the window title
-
initPainter
()¶
-
inputMethodEvent
()¶
-
isSignalConnected
()¶
-
keyPressEvent
()¶
-
keyReleaseEvent
()¶
-
leaveEvent
()¶
-
metric
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
()¶
-
mousePressEvent
()¶
-
mouseReleaseEvent
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
optionsStackedWidget_CurrentChanged
(self, index: int)¶ Select relevant tab on current page change
-
optionsStackedWidget_WidgetRemoved
(self, index: int)¶ Remove tab and unregister widgets on page remove
-
paintEvent
(self, e: QPaintEvent)¶
-
receivers
()¶
-
registerTextSearchWidgets
(self)¶ register widgets in the dialog to search for text in it it is automatically called if a line edit has “mSearchLineEdit” as object name.
New in version 3.0.
-
resizeEvent
()¶
-
restoreOptionsBaseUi
(self, title: str = '')¶ Restore the base ui. Sometimes useful to do at end of subclass’s constructor.
- Parameters
title – the window title (it does not need to be defined if previously given to initOptionsBase();
-
searchText
(self, text: str)¶ searchText searches for a text in all the pages of the stacked widget and highlight the results
- Parameters
text – the text to search
New in version 3.0.
-
sender
()¶
-
senderSignalIndex
()¶
-
setSettings
(self, settings: QgsSettings)¶
-
showEvent
(self, e: QShowEvent)¶
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateMicroFocus
()¶
-
updateOptionsListVerticalTabs
(self)¶ Update tabs on the splitter move
-
updateWindowTitle
(self)¶
-
warnAboutMissingObjects
(self)¶
-
wheelEvent
()¶