Skip to content

Commit

Permalink
Fix docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
domi4484 committed Apr 27, 2021
1 parent 6846023 commit 221d9f7
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions python/core/additions/qgssettingsentry.py
Expand Up @@ -23,23 +23,20 @@


class PyQgsSettingsEntryEnumFlag(QgsSettingsEntryBase):
""" class QgsSettingsEntryEnum
ingroup core
An enum settings entry.
since QGIS 3.20
""" class PyQgsSettingsEntryEnumFlag
ingroup core
An enum settings entry.
since QGIS 3.20
"""

def __init__(self, key, pluginName, defaultValue, description=str()):
""" Constructor for PyQgsSettingsEntryEnumFlag.
:param self: the QgsSettingsEntryEnum object
:param key: argument specifies the final part of the settings key.
:param pluginName: argument is inserted in the key after the section.
:param defaultValue: argument specifies the default value for the settings entry.
:param description: argument specifies a description for the settings entry.
.. note:: This constructor should not be used. Use PyQgsSettingsEntryEnum
or PyQgsSettingsEntryFlag instead.
:param self: the PyQgsSettingsEntryEnumFlag object
:param key: argument specifies the final part of the settings key.
:param pluginName: argument is inserted in the key after the section.
:param defaultValue: argument specifies the default value for the settings entry.
:param description: argument specifies a description for the settings entry.
"""

defaultValueStr = str()
Expand All @@ -58,10 +55,10 @@ def __init__(self, key, pluginName, defaultValue, description=str()):
def value(self, dynamicKeyPart=None, useDefaultValueOverride=False, defaultValueOverride=None):
""" Get settings value.
:param self: the PyQgsSettingsEntryEnumFlag object
:param dynamicKeyPart: argument specifies the dynamic part of the settings key.
:param useDefaultValueOverride: argument specifies if defaultValueOverride should be used.
:param defaultValueOverride: argument if valid is used instead of the normal default value.
:param self: the PyQgsSettingsEntryEnumFlag object
:param dynamicKeyPart: argument specifies the dynamic part of the settings key.
:param useDefaultValueOverride: argument specifies if defaultValueOverride should be used.
:param defaultValueOverride: argument if valid is used instead of the normal default value.
"""

defaultValue = self.defaultValue()
Expand All @@ -80,7 +77,7 @@ def value(self, dynamicKeyPart=None, useDefaultValueOverride=False, defaultValue
def defaultValue(self):
""" Get settings default value.
:param self: the PyQgsSettingsEntryEnumFlag object
:param self: the PyQgsSettingsEntryEnumFlag object
"""

if self.__metaEnum is None or not self.__metaEnum.isValid():
Expand All @@ -103,8 +100,8 @@ def defaultValue(self):
def setValue(self, value, dynamicKeyPart=None):
""" Set settings value.
:param self: the PyQgsSettingsEntryEnumFlag object
:param dynamicKeyPart: argument specifies the dynamic part of the settings key.
:param self: the PyQgsSettingsEntryEnumFlag object
:param dynamicKeyPart: argument specifies the dynamic part of the settings key.
"""

if self.__metaEnum is None or not self.__metaEnum.isValid():
Expand All @@ -125,7 +122,7 @@ def setValue(self, value, dynamicKeyPart=None):
def settingsType(self):
""" Get the settings entry type.
:param self: the QgsSettingsEntryEnumFlag object
:param self: the PyQgsSettingsEntryEnumFlag object
"""

return self.SettingsType.EnumFlag

0 comments on commit 221d9f7

Please sign in to comment.