repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
titusjan/argos | argos/repo/rtiplugins/pandasio.py | PandasDataFrameRti._fetchAllChildren | def _fetchAllChildren(self):
""" Fetches children items.
If this is stand-alone DataFrame the index, column etc are added as PandasIndexRti obj.
"""
assert self.isSliceable, "No underlying pandas object: self._ndFrame is None"
childItems = []
for subName in self._n... | python | def _fetchAllChildren(self):
""" Fetches children items.
If this is stand-alone DataFrame the index, column etc are added as PandasIndexRti obj.
"""
assert self.isSliceable, "No underlying pandas object: self._ndFrame is None"
childItems = []
for subName in self._n... | [
"def",
"_fetchAllChildren",
"(",
"self",
")",
":",
"assert",
"self",
".",
"isSliceable",
",",
"\"No underlying pandas object: self._ndFrame is None\"",
"childItems",
"=",
"[",
"]",
"for",
"subName",
"in",
"self",
".",
"_ndFrame",
".",
"columns",
":",
"# Note that th... | Fetches children items.
If this is stand-alone DataFrame the index, column etc are added as PandasIndexRti obj. | [
"Fetches",
"children",
"items",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/pandasio.py#L265-L284 |
titusjan/argos | argos/repo/rtiplugins/pandasio.py | PandasPanelRti._fetchAllChildren | def _fetchAllChildren(self):
""" Fetches children items.
If this is stand-alone Panel the index, column etc are added as PandasIndexRti obj.
"""
assert self.isSliceable, "No underlying pandas object: self._ndFrame is None"
childItems = []
for subName in self._ndFra... | python | def _fetchAllChildren(self):
""" Fetches children items.
If this is stand-alone Panel the index, column etc are added as PandasIndexRti obj.
"""
assert self.isSliceable, "No underlying pandas object: self._ndFrame is None"
childItems = []
for subName in self._ndFra... | [
"def",
"_fetchAllChildren",
"(",
"self",
")",
":",
"assert",
"self",
".",
"isSliceable",
",",
"\"No underlying pandas object: self._ndFrame is None\"",
"childItems",
"=",
"[",
"]",
"for",
"subName",
"in",
"self",
".",
"_ndFrame",
".",
"items",
":",
"childItem",
"=... | Fetches children items.
If this is stand-alone Panel the index, column etc are added as PandasIndexRti obj. | [
"Fetches",
"children",
"items",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/pandasio.py#L307-L327 |
titusjan/argos | argos/inspector/dialog.py | OpenInspectorDialog.setCurrentInspectorRegItem | def setCurrentInspectorRegItem(self, regItem):
""" Sets the current inspector given an InspectorRegItem
"""
check_class(regItem, InspectorRegItem, allow_none=True)
self.inspectorTab.setCurrentRegItem(regItem) | python | def setCurrentInspectorRegItem(self, regItem):
""" Sets the current inspector given an InspectorRegItem
"""
check_class(regItem, InspectorRegItem, allow_none=True)
self.inspectorTab.setCurrentRegItem(regItem) | [
"def",
"setCurrentInspectorRegItem",
"(",
"self",
",",
"regItem",
")",
":",
"check_class",
"(",
"regItem",
",",
"InspectorRegItem",
",",
"allow_none",
"=",
"True",
")",
"self",
".",
"inspectorTab",
".",
"setCurrentRegItem",
"(",
"regItem",
")"
] | Sets the current inspector given an InspectorRegItem | [
"Sets",
"the",
"current",
"inspector",
"given",
"an",
"InspectorRegItem"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/dialog.py#L85-L89 |
titusjan/argos | argos/config/groupcti.py | GroupCti.createEditor | def createEditor(self, delegate, parent, _option):
""" Creates a hidden widget so that only the reset button is visible during editing.
:type option: QStyleOptionViewItem
"""
return GroupCtiEditor(self, delegate, parent=parent) | python | def createEditor(self, delegate, parent, _option):
""" Creates a hidden widget so that only the reset button is visible during editing.
:type option: QStyleOptionViewItem
"""
return GroupCtiEditor(self, delegate, parent=parent) | [
"def",
"createEditor",
"(",
"self",
",",
"delegate",
",",
"parent",
",",
"_option",
")",
":",
"return",
"GroupCtiEditor",
"(",
"self",
",",
"delegate",
",",
"parent",
"=",
"parent",
")"
] | Creates a hidden widget so that only the reset button is visible during editing.
:type option: QStyleOptionViewItem | [
"Creates",
"a",
"hidden",
"widget",
"so",
"that",
"only",
"the",
"reset",
"button",
"is",
"visible",
"during",
"editing",
".",
":",
"type",
"option",
":",
"QStyleOptionViewItem"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/groupcti.py#L52-L56 |
titusjan/argos | argos/utils/misc.py | log_dictionary | def log_dictionary(dictionary, msg='', logger=None, level='debug', item_prefix=' '):
""" Writes a log message with key and value for each item in the dictionary.
:param dictionary: the dictionary to be logged
:type dictionary: dict
:param name: An optional message that is logged before the... | python | def log_dictionary(dictionary, msg='', logger=None, level='debug', item_prefix=' '):
""" Writes a log message with key and value for each item in the dictionary.
:param dictionary: the dictionary to be logged
:type dictionary: dict
:param name: An optional message that is logged before the... | [
"def",
"log_dictionary",
"(",
"dictionary",
",",
"msg",
"=",
"''",
",",
"logger",
"=",
"None",
",",
"level",
"=",
"'debug'",
",",
"item_prefix",
"=",
"' '",
")",
":",
"level_nr",
"=",
"logging",
".",
"getLevelName",
"(",
"level",
".",
"upper",
"(",
")... | Writes a log message with key and value for each item in the dictionary.
:param dictionary: the dictionary to be logged
:type dictionary: dict
:param name: An optional message that is logged before the contents
:type name: string
:param logger: A logging.Logger object to log to.... | [
"Writes",
"a",
"log",
"message",
"with",
"key",
"and",
"value",
"for",
"each",
"item",
"in",
"the",
"dictionary",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/utils/misc.py#L60-L90 |
titusjan/argos | argos/utils/misc.py | is_quoted | def is_quoted(s):
""" Returns True if the string begins and ends with quotes (single or double)
:param s: a string
:return: boolean
"""
return (s.startswith("'") and s.endswith("'")) or (s.startswith('"') and s.endswith('"')) | python | def is_quoted(s):
""" Returns True if the string begins and ends with quotes (single or double)
:param s: a string
:return: boolean
"""
return (s.startswith("'") and s.endswith("'")) or (s.startswith('"') and s.endswith('"')) | [
"def",
"is_quoted",
"(",
"s",
")",
":",
"return",
"(",
"s",
".",
"startswith",
"(",
"\"'\"",
")",
"and",
"s",
".",
"endswith",
"(",
"\"'\"",
")",
")",
"or",
"(",
"s",
".",
"startswith",
"(",
"'\"'",
")",
"and",
"s",
".",
"endswith",
"(",
"'\"'",
... | Returns True if the string begins and ends with quotes (single or double)
:param s: a string
:return: boolean | [
"Returns",
"True",
"if",
"the",
"string",
"begins",
"and",
"ends",
"with",
"quotes",
"(",
"single",
"or",
"double",
")"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/utils/misc.py#L103-L109 |
titusjan/argos | argos/utils/misc.py | string_to_identifier | def string_to_identifier(s, white_space_becomes='_'):
""" Takes a string and makes it suitable for use as an identifier
Translates to lower case
Replaces white space by the white_space_becomes character (default=underscore).
Removes and punctuation.
"""
import re
s = s.lower()
... | python | def string_to_identifier(s, white_space_becomes='_'):
""" Takes a string and makes it suitable for use as an identifier
Translates to lower case
Replaces white space by the white_space_becomes character (default=underscore).
Removes and punctuation.
"""
import re
s = s.lower()
... | [
"def",
"string_to_identifier",
"(",
"s",
",",
"white_space_becomes",
"=",
"'_'",
")",
":",
"import",
"re",
"s",
"=",
"s",
".",
"lower",
"(",
")",
"s",
"=",
"re",
".",
"sub",
"(",
"r\"\\s+\"",
",",
"white_space_becomes",
",",
"s",
")",
"# replace whitespa... | Takes a string and makes it suitable for use as an identifier
Translates to lower case
Replaces white space by the white_space_becomes character (default=underscore).
Removes and punctuation. | [
"Takes",
"a",
"string",
"and",
"makes",
"it",
"suitable",
"for",
"use",
"as",
"an",
"identifier"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/utils/misc.py#L113-L125 |
titusjan/argos | argos/repo/iconfactory.py | RtiIconFactory.registerIcon | def registerIcon(self, fileName, glyph, isOpen=None):
""" Register an icon SVG file given a glyph, and optionally the open/close state.
:param fileName: filename to the SVG file.
If the filename is a relative path, the ICONS_DIRECTORY will be prepended.
:param glyph: a s... | python | def registerIcon(self, fileName, glyph, isOpen=None):
""" Register an icon SVG file given a glyph, and optionally the open/close state.
:param fileName: filename to the SVG file.
If the filename is a relative path, the ICONS_DIRECTORY will be prepended.
:param glyph: a s... | [
"def",
"registerIcon",
"(",
"self",
",",
"fileName",
",",
"glyph",
",",
"isOpen",
"=",
"None",
")",
":",
"check_class",
"(",
"isOpen",
",",
"bool",
",",
"allow_none",
"=",
"True",
")",
"if",
"fileName",
"and",
"not",
"os",
".",
"path",
".",
"isabs",
... | Register an icon SVG file given a glyph, and optionally the open/close state.
:param fileName: filename to the SVG file.
If the filename is a relative path, the ICONS_DIRECTORY will be prepended.
:param glyph: a string describing the glyph (e.g. 'file', 'array')
:par... | [
"Register",
"an",
"icon",
"SVG",
"file",
"given",
"a",
"glyph",
"and",
"optionally",
"the",
"open",
"/",
"close",
"state",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/iconfactory.py#L102-L122 |
titusjan/argos | argos/repo/iconfactory.py | RtiIconFactory.getIcon | def getIcon(self, glyph, isOpen, color=None):
""" Returns a QIcon given a glyph name, open/closed state and color.
The reslulting icon is cached so that it only needs to be rendered once.
:param glyph: name of a registered glyph (e.g. 'file', 'array')
:param isOpen: boolean... | python | def getIcon(self, glyph, isOpen, color=None):
""" Returns a QIcon given a glyph name, open/closed state and color.
The reslulting icon is cached so that it only needs to be rendered once.
:param glyph: name of a registered glyph (e.g. 'file', 'array')
:param isOpen: boolean... | [
"def",
"getIcon",
"(",
"self",
",",
"glyph",
",",
"isOpen",
",",
"color",
"=",
"None",
")",
":",
"try",
":",
"fileName",
"=",
"self",
".",
"_registry",
"[",
"(",
"glyph",
",",
"isOpen",
")",
"]",
"except",
"KeyError",
":",
"logger",
".",
"warn",
"(... | Returns a QIcon given a glyph name, open/closed state and color.
The reslulting icon is cached so that it only needs to be rendered once.
:param glyph: name of a registered glyph (e.g. 'file', 'array')
:param isOpen: boolean that indicates if the RTI is open or closed.
... | [
"Returns",
"a",
"QIcon",
"given",
"a",
"glyph",
"name",
"open",
"/",
"closed",
"state",
"and",
"color",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/iconfactory.py#L125-L143 |
titusjan/argos | argos/repo/iconfactory.py | RtiIconFactory.loadIcon | def loadIcon(self, fileName, color=None):
""" Reads SVG from a file name and creates an QIcon from it.
Optionally replaces the color. Caches the created icons.
:param fileName: absolute path to an icon file.
If False/empty/None, None returned, which yields no icon.
... | python | def loadIcon(self, fileName, color=None):
""" Reads SVG from a file name and creates an QIcon from it.
Optionally replaces the color. Caches the created icons.
:param fileName: absolute path to an icon file.
If False/empty/None, None returned, which yields no icon.
... | [
"def",
"loadIcon",
"(",
"self",
",",
"fileName",
",",
"color",
"=",
"None",
")",
":",
"if",
"not",
"fileName",
":",
"return",
"None",
"key",
"=",
"(",
"fileName",
",",
"color",
")",
"if",
"key",
"not",
"in",
"self",
".",
"_icons",
":",
"try",
":",
... | Reads SVG from a file name and creates an QIcon from it.
Optionally replaces the color. Caches the created icons.
:param fileName: absolute path to an icon file.
If False/empty/None, None returned, which yields no icon.
:param color: '#RRGGBB' string (e.g. '#FF0000'... | [
"Reads",
"SVG",
"from",
"a",
"file",
"name",
"and",
"creates",
"an",
"QIcon",
"from",
"it",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/iconfactory.py#L146-L175 |
titusjan/argos | argos/repo/iconfactory.py | RtiIconFactory.createIconFromSvg | def createIconFromSvg(self, svg, color=None, colorsToBeReplaced=None):
""" Creates a QIcon given an SVG string.
Optionally replaces the colors in colorsToBeReplaced by color.
:param svg: string containing Scalable Vector Graphics XML
:param color: '#RRGGBB' string (e.g. '#F... | python | def createIconFromSvg(self, svg, color=None, colorsToBeReplaced=None):
""" Creates a QIcon given an SVG string.
Optionally replaces the colors in colorsToBeReplaced by color.
:param svg: string containing Scalable Vector Graphics XML
:param color: '#RRGGBB' string (e.g. '#F... | [
"def",
"createIconFromSvg",
"(",
"self",
",",
"svg",
",",
"color",
"=",
"None",
",",
"colorsToBeReplaced",
"=",
"None",
")",
":",
"if",
"colorsToBeReplaced",
"is",
"None",
":",
"colorsToBeReplaced",
"=",
"self",
".",
"colorsToBeReplaced",
"if",
"color",
":",
... | Creates a QIcon given an SVG string.
Optionally replaces the colors in colorsToBeReplaced by color.
:param svg: string containing Scalable Vector Graphics XML
:param color: '#RRGGBB' string (e.g. '#FF0000' for red)
:param colorsToBeReplaced: optional list of colors to b... | [
"Creates",
"a",
"QIcon",
"given",
"an",
"SVG",
"string",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/iconfactory.py#L178-L211 |
titusjan/argos | argos/qt/registrytable.py | RegistryTableModel.data | def data(self, index, role=Qt.DisplayRole):
""" Returns the data stored under the given role for the item referred to by the index.
"""
if not index.isValid():
return None
if role not in (Qt.DisplayRole, self.SORT_ROLE, Qt.ForegroundRole):
return None
r... | python | def data(self, index, role=Qt.DisplayRole):
""" Returns the data stored under the given role for the item referred to by the index.
"""
if not index.isValid():
return None
if role not in (Qt.DisplayRole, self.SORT_ROLE, Qt.ForegroundRole):
return None
r... | [
"def",
"data",
"(",
"self",
",",
"index",
",",
"role",
"=",
"Qt",
".",
"DisplayRole",
")",
":",
"if",
"not",
"index",
".",
"isValid",
"(",
")",
":",
"return",
"None",
"if",
"role",
"not",
"in",
"(",
"Qt",
".",
"DisplayRole",
",",
"self",
".",
"SO... | Returns the data stored under the given role for the item referred to by the index. | [
"Returns",
"the",
"data",
"stored",
"under",
"the",
"given",
"role",
"for",
"the",
"item",
"referred",
"to",
"by",
"the",
"index",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/registrytable.py#L71-L100 |
titusjan/argos | argos/qt/registrytable.py | RegistryTableModel.headerData | def headerData(self, section, orientation, role):
""" Returns the header for a section (row or column depending on orientation).
Reimplemented from QAbstractTableModel to make the headers start at 0.
"""
if role == QtCore.Qt.DisplayRole:
if orientation == Qt.Horizontal:
... | python | def headerData(self, section, orientation, role):
""" Returns the header for a section (row or column depending on orientation).
Reimplemented from QAbstractTableModel to make the headers start at 0.
"""
if role == QtCore.Qt.DisplayRole:
if orientation == Qt.Horizontal:
... | [
"def",
"headerData",
"(",
"self",
",",
"section",
",",
"orientation",
",",
"role",
")",
":",
"if",
"role",
"==",
"QtCore",
".",
"Qt",
".",
"DisplayRole",
":",
"if",
"orientation",
"==",
"Qt",
".",
"Horizontal",
":",
"return",
"self",
".",
"attrNames",
... | Returns the header for a section (row or column depending on orientation).
Reimplemented from QAbstractTableModel to make the headers start at 0. | [
"Returns",
"the",
"header",
"for",
"a",
"section",
"(",
"row",
"or",
"column",
"depending",
"on",
"orientation",
")",
".",
"Reimplemented",
"from",
"QAbstractTableModel",
"to",
"make",
"the",
"headers",
"start",
"at",
"0",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/registrytable.py#L103-L113 |
titusjan/argos | argos/qt/registrytable.py | RegistryTableModel.indexFromItem | def indexFromItem(self, regItem, col=0):
""" Gets the index (with column=0) for the row that contains the regItem
If col is negative, it is counted from the end
"""
if col < 0:
col = len(self.attrNames) - col
try:
row = self.registry.items.index(regIte... | python | def indexFromItem(self, regItem, col=0):
""" Gets the index (with column=0) for the row that contains the regItem
If col is negative, it is counted from the end
"""
if col < 0:
col = len(self.attrNames) - col
try:
row = self.registry.items.index(regIte... | [
"def",
"indexFromItem",
"(",
"self",
",",
"regItem",
",",
"col",
"=",
"0",
")",
":",
"if",
"col",
"<",
"0",
":",
"col",
"=",
"len",
"(",
"self",
".",
"attrNames",
")",
"-",
"col",
"try",
":",
"row",
"=",
"self",
".",
"registry",
".",
"items",
"... | Gets the index (with column=0) for the row that contains the regItem
If col is negative, it is counted from the end | [
"Gets",
"the",
"index",
"(",
"with",
"column",
"=",
"0",
")",
"for",
"the",
"row",
"that",
"contains",
"the",
"regItem",
"If",
"col",
"is",
"negative",
"it",
"is",
"counted",
"from",
"the",
"end"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/registrytable.py#L122-L133 |
titusjan/argos | argos/qt/registrytable.py | RegistryTableModel.emitDataChanged | def emitDataChanged(self, regItem):
""" Emits the dataChagned signal for the regItem
"""
leftIndex = self.indexFromItem(regItem, col=0)
rightIndex = self.indexFromItem(regItem, col=-1)
logger.debug("Data changed: {} ...{}".format(self.data(leftIndex), self.data(rightIndex)))
... | python | def emitDataChanged(self, regItem):
""" Emits the dataChagned signal for the regItem
"""
leftIndex = self.indexFromItem(regItem, col=0)
rightIndex = self.indexFromItem(regItem, col=-1)
logger.debug("Data changed: {} ...{}".format(self.data(leftIndex), self.data(rightIndex)))
... | [
"def",
"emitDataChanged",
"(",
"self",
",",
"regItem",
")",
":",
"leftIndex",
"=",
"self",
".",
"indexFromItem",
"(",
"regItem",
",",
"col",
"=",
"0",
")",
"rightIndex",
"=",
"self",
".",
"indexFromItem",
"(",
"regItem",
",",
"col",
"=",
"-",
"1",
")",... | Emits the dataChagned signal for the regItem | [
"Emits",
"the",
"dataChagned",
"signal",
"for",
"the",
"regItem"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/registrytable.py#L136-L143 |
titusjan/argos | argos/qt/registrytable.py | RegistryTableProxyModel.filterAcceptsRow | def filterAcceptsRow(self, sourceRow, sourceParent):
""" If onlyShowImported is True, regItems that were not (successfully) imported are
filtered out.
"""
if not self.onlyShowImported:
return True
item = self.sourceModel().registry.items[sourceRow]
return... | python | def filterAcceptsRow(self, sourceRow, sourceParent):
""" If onlyShowImported is True, regItems that were not (successfully) imported are
filtered out.
"""
if not self.onlyShowImported:
return True
item = self.sourceModel().registry.items[sourceRow]
return... | [
"def",
"filterAcceptsRow",
"(",
"self",
",",
"sourceRow",
",",
"sourceParent",
")",
":",
"if",
"not",
"self",
".",
"onlyShowImported",
":",
"return",
"True",
"item",
"=",
"self",
".",
"sourceModel",
"(",
")",
".",
"registry",
".",
"items",
"[",
"sourceRow"... | If onlyShowImported is True, regItems that were not (successfully) imported are
filtered out. | [
"If",
"onlyShowImported",
"is",
"True",
"regItems",
"that",
"were",
"not",
"(",
"successfully",
")",
"imported",
"are",
"filtered",
"out",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/registrytable.py#L163-L171 |
titusjan/argos | argos/qt/registrytable.py | RegistryTableProxyModel.lessThan | def lessThan(self, leftIndex, rightIndex):
""" Returns true if the value of the item referred to by the given index left is less than
the value of the item referred to by the given index right, otherwise returns false.
"""
leftData = self.sourceModel().data(leftIndex, RegistryTable... | python | def lessThan(self, leftIndex, rightIndex):
""" Returns true if the value of the item referred to by the given index left is less than
the value of the item referred to by the given index right, otherwise returns false.
"""
leftData = self.sourceModel().data(leftIndex, RegistryTable... | [
"def",
"lessThan",
"(",
"self",
",",
"leftIndex",
",",
"rightIndex",
")",
":",
"leftData",
"=",
"self",
".",
"sourceModel",
"(",
")",
".",
"data",
"(",
"leftIndex",
",",
"RegistryTableModel",
".",
"SORT_ROLE",
")",
"rightData",
"=",
"self",
".",
"sourceMod... | Returns true if the value of the item referred to by the given index left is less than
the value of the item referred to by the given index right, otherwise returns false. | [
"Returns",
"true",
"if",
"the",
"value",
"of",
"the",
"item",
"referred",
"to",
"by",
"the",
"given",
"index",
"left",
"is",
"less",
"than",
"the",
"value",
"of",
"the",
"item",
"referred",
"to",
"by",
"the",
"given",
"index",
"right",
"otherwise",
"retu... | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/registrytable.py#L174-L181 |
titusjan/argos | argos/qt/registrytable.py | RegistryTableProxyModel.itemFromIndex | def itemFromIndex(self, index):
""" Gets the item given the model index
"""
sourceIndex = self.mapToSource(index)
return self.sourceModel().itemFromIndex(sourceIndex) | python | def itemFromIndex(self, index):
""" Gets the item given the model index
"""
sourceIndex = self.mapToSource(index)
return self.sourceModel().itemFromIndex(sourceIndex) | [
"def",
"itemFromIndex",
"(",
"self",
",",
"index",
")",
":",
"sourceIndex",
"=",
"self",
".",
"mapToSource",
"(",
"index",
")",
"return",
"self",
".",
"sourceModel",
"(",
")",
".",
"itemFromIndex",
"(",
"sourceIndex",
")"
] | Gets the item given the model index | [
"Gets",
"the",
"item",
"given",
"the",
"model",
"index"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/registrytable.py#L184-L188 |
titusjan/argos | argos/qt/registrytable.py | RegistryTableProxyModel.indexFromItem | def indexFromItem(self, regItem, col=0):
""" Gets the index (with column=0) for the row that contains the regItem
If col is negative, it is counted from the end
"""
sourceIndex = self.sourceModel().indexFromItem(regItem, col=col)
return self.mapFromSource(sourceIndex) | python | def indexFromItem(self, regItem, col=0):
""" Gets the index (with column=0) for the row that contains the regItem
If col is negative, it is counted from the end
"""
sourceIndex = self.sourceModel().indexFromItem(regItem, col=col)
return self.mapFromSource(sourceIndex) | [
"def",
"indexFromItem",
"(",
"self",
",",
"regItem",
",",
"col",
"=",
"0",
")",
":",
"sourceIndex",
"=",
"self",
".",
"sourceModel",
"(",
")",
".",
"indexFromItem",
"(",
"regItem",
",",
"col",
"=",
"col",
")",
"return",
"self",
".",
"mapFromSource",
"(... | Gets the index (with column=0) for the row that contains the regItem
If col is negative, it is counted from the end | [
"Gets",
"the",
"index",
"(",
"with",
"column",
"=",
"0",
")",
"for",
"the",
"row",
"that",
"contains",
"the",
"regItem",
"If",
"col",
"is",
"negative",
"it",
"is",
"counted",
"from",
"the",
"end"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/registrytable.py#L191-L196 |
titusjan/argos | argos/qt/registrytable.py | RegistryTableProxyModel.emitDataChanged | def emitDataChanged(self, regItem):
""" Emits the dataChagned signal for the regItem
"""
#self.sourceModel().emitDataChanged(regItem) # Does this work?
leftIndex = self.indexFromItem(regItem, col=0)
rightIndex = self.indexFromItem(regItem, col=-1)
self.dataChanged.emit(le... | python | def emitDataChanged(self, regItem):
""" Emits the dataChagned signal for the regItem
"""
#self.sourceModel().emitDataChanged(regItem) # Does this work?
leftIndex = self.indexFromItem(regItem, col=0)
rightIndex = self.indexFromItem(regItem, col=-1)
self.dataChanged.emit(le... | [
"def",
"emitDataChanged",
"(",
"self",
",",
"regItem",
")",
":",
"#self.sourceModel().emitDataChanged(regItem) # Does this work?",
"leftIndex",
"=",
"self",
".",
"indexFromItem",
"(",
"regItem",
",",
"col",
"=",
"0",
")",
"rightIndex",
"=",
"self",
".",
"indexFromIt... | Emits the dataChagned signal for the regItem | [
"Emits",
"the",
"dataChagned",
"signal",
"for",
"the",
"regItem"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/registrytable.py#L199-L205 |
titusjan/argos | argos/qt/registrytable.py | RegistryTableView.setCurrentRegItem | def setCurrentRegItem(self, regItem):
""" Sets the current registry item.
"""
rowIndex = self.model().indexFromItem(regItem)
if not rowIndex.isValid():
logger.warn("Can't select {!r} in table".format(regItem))
self.setCurrentIndex(rowIndex) | python | def setCurrentRegItem(self, regItem):
""" Sets the current registry item.
"""
rowIndex = self.model().indexFromItem(regItem)
if not rowIndex.isValid():
logger.warn("Can't select {!r} in table".format(regItem))
self.setCurrentIndex(rowIndex) | [
"def",
"setCurrentRegItem",
"(",
"self",
",",
"regItem",
")",
":",
"rowIndex",
"=",
"self",
".",
"model",
"(",
")",
".",
"indexFromItem",
"(",
"regItem",
")",
"if",
"not",
"rowIndex",
".",
"isValid",
"(",
")",
":",
"logger",
".",
"warn",
"(",
"\"Can't ... | Sets the current registry item. | [
"Sets",
"the",
"current",
"registry",
"item",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/registrytable.py#L265-L271 |
titusjan/argos | docs/examples/buggy_inspector.py | persistentRegisterInspector | def persistentRegisterInspector(fullName, fullClassName, pythonPath=''):
""" Registers an inspector
Loads or inits the inspector registry, register the inspector and saves the settings.
Important: instantiate a Qt application first to use the correct settings file/winreg.
"""
registry = Ins... | python | def persistentRegisterInspector(fullName, fullClassName, pythonPath=''):
""" Registers an inspector
Loads or inits the inspector registry, register the inspector and saves the settings.
Important: instantiate a Qt application first to use the correct settings file/winreg.
"""
registry = Ins... | [
"def",
"persistentRegisterInspector",
"(",
"fullName",
",",
"fullClassName",
",",
"pythonPath",
"=",
"''",
")",
":",
"registry",
"=",
"InspectorRegistry",
"(",
")",
"registry",
".",
"loadOrInitSettings",
"(",
")",
"registry",
".",
"registerInspector",
"(",
"fullNa... | Registers an inspector
Loads or inits the inspector registry, register the inspector and saves the settings.
Important: instantiate a Qt application first to use the correct settings file/winreg. | [
"Registers",
"an",
"inspector"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/docs/examples/buggy_inspector.py#L73-L82 |
titusjan/argos | argos/main.py | browse | def browse(fileNames=None,
inspectorFullName=None,
select=None,
profile=DEFAULT_PROFILE,
resetProfile=False, # TODO: should probably be moved to the main program
resetAllProfiles=False, # TODO: should probably be moved to the main program
resetRegi... | python | def browse(fileNames=None,
inspectorFullName=None,
select=None,
profile=DEFAULT_PROFILE,
resetProfile=False, # TODO: should probably be moved to the main program
resetAllProfiles=False, # TODO: should probably be moved to the main program
resetRegi... | [
"def",
"browse",
"(",
"fileNames",
"=",
"None",
",",
"inspectorFullName",
"=",
"None",
",",
"select",
"=",
"None",
",",
"profile",
"=",
"DEFAULT_PROFILE",
",",
"resetProfile",
"=",
"False",
",",
"# TODO: should probably be moved to the main program",
"resetAllProfiles... | Opens the main window(s) for the persistent settings of the given profile,
and executes the application.
:param fileNames: List of file names that will be added to the repository
:param inspectorFullName: The full path name of the inspector that will be loaded
:param select: a path of t... | [
"Opens",
"the",
"main",
"window",
"(",
"s",
")",
"for",
"the",
"persistent",
"settings",
"of",
"the",
"given",
"profile",
"and",
"executes",
"the",
"application",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/main.py#L37-L91 |
titusjan/argos | argos/main.py | printInspectors | def printInspectors():
""" Prints a list of inspectors
"""
# Imported here so this module can be imported without Qt being installed.
from argos.application import ArgosApplication
argosApp = ArgosApplication()
argosApp.loadOrInitRegistries()
for regItem in argosApp.inspectorRegistry.items:... | python | def printInspectors():
""" Prints a list of inspectors
"""
# Imported here so this module can be imported without Qt being installed.
from argos.application import ArgosApplication
argosApp = ArgosApplication()
argosApp.loadOrInitRegistries()
for regItem in argosApp.inspectorRegistry.items:... | [
"def",
"printInspectors",
"(",
")",
":",
"# Imported here so this module can be imported without Qt being installed.",
"from",
"argos",
".",
"application",
"import",
"ArgosApplication",
"argosApp",
"=",
"ArgosApplication",
"(",
")",
"argosApp",
".",
"loadOrInitRegistries",
"(... | Prints a list of inspectors | [
"Prints",
"a",
"list",
"of",
"inspectors"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/main.py#L94-L103 |
titusjan/argos | argos/main.py | main | def main():
""" Starts Argos main window
"""
about_str = "{} version: {}".format(PROJECT_NAME, VERSION)
parser = argparse.ArgumentParser(description = about_str)
parser.add_argument('fileNames', metavar='FILE', nargs='*', help='Input files')
parser.add_argument('-i', '--inspector', dest='inspe... | python | def main():
""" Starts Argos main window
"""
about_str = "{} version: {}".format(PROJECT_NAME, VERSION)
parser = argparse.ArgumentParser(description = about_str)
parser.add_argument('fileNames', metavar='FILE', nargs='*', help='Input files')
parser.add_argument('-i', '--inspector', dest='inspe... | [
"def",
"main",
"(",
")",
":",
"about_str",
"=",
"\"{} version: {}\"",
".",
"format",
"(",
"PROJECT_NAME",
",",
"VERSION",
")",
"parser",
"=",
"argparse",
".",
"ArgumentParser",
"(",
"description",
"=",
"about_str",
")",
"parser",
".",
"add_argument",
"(",
"'... | Starts Argos main window | [
"Starts",
"Argos",
"main",
"window"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/main.py#L124-L197 |
titusjan/argos | argos/widgets/argostreeview.py | ArgosTreeView.setModel | def setModel(self, model):
""" Sets the model.
Checks that the model is a
"""
check_class(model, BaseTreeModel)
super(ArgosTreeView, self).setModel(model) | python | def setModel(self, model):
""" Sets the model.
Checks that the model is a
"""
check_class(model, BaseTreeModel)
super(ArgosTreeView, self).setModel(model) | [
"def",
"setModel",
"(",
"self",
",",
"model",
")",
":",
"check_class",
"(",
"model",
",",
"BaseTreeModel",
")",
"super",
"(",
"ArgosTreeView",
",",
"self",
")",
".",
"setModel",
"(",
"model",
")"
] | Sets the model.
Checks that the model is a | [
"Sets",
"the",
"model",
".",
"Checks",
"that",
"the",
"model",
"is",
"a"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/argostreeview.py#L88-L93 |
titusjan/argos | argos/widgets/argostreeview.py | ArgosTreeView.setCurrentIndex | def setCurrentIndex(self, currentIndex):
""" Sets the current item to be the item at currentIndex.
Also select the row as to give consistent user feedback.
See also the notes at the top of this module on current item vs selected item(s).
"""
selectionModel = self.selectio... | python | def setCurrentIndex(self, currentIndex):
""" Sets the current item to be the item at currentIndex.
Also select the row as to give consistent user feedback.
See also the notes at the top of this module on current item vs selected item(s).
"""
selectionModel = self.selectio... | [
"def",
"setCurrentIndex",
"(",
"self",
",",
"currentIndex",
")",
":",
"selectionModel",
"=",
"self",
".",
"selectionModel",
"(",
")",
"selectionFlags",
"=",
"(",
"QtCore",
".",
"QItemSelectionModel",
".",
"ClearAndSelect",
"|",
"QtCore",
".",
"QItemSelectionModel"... | Sets the current item to be the item at currentIndex.
Also select the row as to give consistent user feedback.
See also the notes at the top of this module on current item vs selected item(s). | [
"Sets",
"the",
"current",
"item",
"to",
"be",
"the",
"item",
"at",
"currentIndex",
".",
"Also",
"select",
"the",
"row",
"as",
"to",
"give",
"consistent",
"user",
"feedback",
".",
"See",
"also",
"the",
"notes",
"at",
"the",
"top",
"of",
"this",
"module",
... | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/argostreeview.py#L96-L104 |
titusjan/argos | argos/widgets/argostreeview.py | ArgosTreeView.getRowCurrentIndex | def getRowCurrentIndex(self):
""" Returns the index of column 0 of the current item in the underlying model.
See also the notes at the top of this module on current item vs selected item(s).
"""
curIndex = self.currentIndex()
col0Index = curIndex.sibling(curIndex.row(), 0)
... | python | def getRowCurrentIndex(self):
""" Returns the index of column 0 of the current item in the underlying model.
See also the notes at the top of this module on current item vs selected item(s).
"""
curIndex = self.currentIndex()
col0Index = curIndex.sibling(curIndex.row(), 0)
... | [
"def",
"getRowCurrentIndex",
"(",
"self",
")",
":",
"curIndex",
"=",
"self",
".",
"currentIndex",
"(",
")",
"col0Index",
"=",
"curIndex",
".",
"sibling",
"(",
"curIndex",
".",
"row",
"(",
")",
",",
"0",
")",
"return",
"col0Index"
] | Returns the index of column 0 of the current item in the underlying model.
See also the notes at the top of this module on current item vs selected item(s). | [
"Returns",
"the",
"index",
"of",
"column",
"0",
"of",
"the",
"current",
"item",
"in",
"the",
"underlying",
"model",
".",
"See",
"also",
"the",
"notes",
"at",
"the",
"top",
"of",
"this",
"module",
"on",
"current",
"item",
"vs",
"selected",
"item",
"(",
... | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/argostreeview.py#L107-L113 |
titusjan/argos | argos/widgets/argostreeview.py | ArgosTreeView.getCurrentItem | def getCurrentItem(self): # TODO: rename? getCurrentItemAndIndex? getCurrentTuple? getCurrent?
""" Find the current tree item (and the current index while we're at it)
Returns a tuple with the current item, and its index. The item may be None.
See also the notes at the top of this module... | python | def getCurrentItem(self): # TODO: rename? getCurrentItemAndIndex? getCurrentTuple? getCurrent?
""" Find the current tree item (and the current index while we're at it)
Returns a tuple with the current item, and its index. The item may be None.
See also the notes at the top of this module... | [
"def",
"getCurrentItem",
"(",
"self",
")",
":",
"# TODO: rename? getCurrentItemAndIndex? getCurrentTuple? getCurrent?",
"currentIndex",
"=",
"self",
".",
"getRowCurrentIndex",
"(",
")",
"currentItem",
"=",
"self",
".",
"model",
"(",
")",
".",
"getItem",
"(",
"currentI... | Find the current tree item (and the current index while we're at it)
Returns a tuple with the current item, and its index. The item may be None.
See also the notes at the top of this module on current item vs selected item(s). | [
"Find",
"the",
"current",
"tree",
"item",
"(",
"and",
"the",
"current",
"index",
"while",
"we",
"re",
"at",
"it",
")",
"Returns",
"a",
"tuple",
"with",
"the",
"current",
"item",
"and",
"its",
"index",
".",
"The",
"item",
"may",
"be",
"None",
".",
"Se... | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/argostreeview.py#L116-L123 |
titusjan/argos | argos/widgets/argostreeview.py | ArgosTreeView.expandPath | def expandPath(self, path):
""" Follows the path and expand all nodes along the way.
Returns (item, index) tuple of the last node in the path (the leaf node). This can be
reused e.g. to select it.
"""
iiPath = self.model().findItemAndIndexPath(path)
for (item, ind... | python | def expandPath(self, path):
""" Follows the path and expand all nodes along the way.
Returns (item, index) tuple of the last node in the path (the leaf node). This can be
reused e.g. to select it.
"""
iiPath = self.model().findItemAndIndexPath(path)
for (item, ind... | [
"def",
"expandPath",
"(",
"self",
",",
"path",
")",
":",
"iiPath",
"=",
"self",
".",
"model",
"(",
")",
".",
"findItemAndIndexPath",
"(",
"path",
")",
"for",
"(",
"item",
",",
"index",
")",
"in",
"iiPath",
"[",
"1",
":",
"]",
":",
"# skip invisible r... | Follows the path and expand all nodes along the way.
Returns (item, index) tuple of the last node in the path (the leaf node). This can be
reused e.g. to select it. | [
"Follows",
"the",
"path",
"and",
"expand",
"all",
"nodes",
"along",
"the",
"way",
".",
"Returns",
"(",
"item",
"index",
")",
"tuple",
"of",
"the",
"last",
"node",
"in",
"the",
"path",
"(",
"the",
"leaf",
"node",
")",
".",
"This",
"can",
"be",
"reused... | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/argostreeview.py#L126-L137 |
titusjan/argos | argos/widgets/argostreeview.py | ArgosTreeView.expandBranch | def expandBranch(self, index=None, expanded=True):
""" Expands or collapses the node at the index and all it's descendants.
If expanded is True the nodes will be expanded, if False they will be collapsed.
If parentIndex is None, the invisible root will be used (i.e. the complete forest... | python | def expandBranch(self, index=None, expanded=True):
""" Expands or collapses the node at the index and all it's descendants.
If expanded is True the nodes will be expanded, if False they will be collapsed.
If parentIndex is None, the invisible root will be used (i.e. the complete forest... | [
"def",
"expandBranch",
"(",
"self",
",",
"index",
"=",
"None",
",",
"expanded",
"=",
"True",
")",
":",
"treeModel",
"=",
"self",
".",
"model",
"(",
")",
"if",
"index",
"is",
"None",
":",
"index",
"=",
"QtCore",
".",
"QModelIndex",
"(",
")",
"if",
"... | Expands or collapses the node at the index and all it's descendants.
If expanded is True the nodes will be expanded, if False they will be collapsed.
If parentIndex is None, the invisible root will be used (i.e. the complete forest will
be expanded). | [
"Expands",
"or",
"collapses",
"the",
"node",
"at",
"the",
"index",
"and",
"all",
"it",
"s",
"descendants",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/argostreeview.py#L140-L157 |
titusjan/argos | argos/collect/collector.py | Collector.blockChildrenSignals | def blockChildrenSignals(self, block):
""" If block equals True, the signals of the combo boxes and spin boxes are blocked
Returns the old blocking state.
"""
logger.debug("Blocking collector signals")
for spinBox in self._spinBoxes:
spinBox.blockSignals(block)
... | python | def blockChildrenSignals(self, block):
""" If block equals True, the signals of the combo boxes and spin boxes are blocked
Returns the old blocking state.
"""
logger.debug("Blocking collector signals")
for spinBox in self._spinBoxes:
spinBox.blockSignals(block)
... | [
"def",
"blockChildrenSignals",
"(",
"self",
",",
"block",
")",
":",
"logger",
".",
"debug",
"(",
"\"Blocking collector signals\"",
")",
"for",
"spinBox",
"in",
"self",
".",
"_spinBoxes",
":",
"spinBox",
".",
"blockSignals",
"(",
"block",
")",
"for",
"comboBox"... | If block equals True, the signals of the combo boxes and spin boxes are blocked
Returns the old blocking state. | [
"If",
"block",
"equals",
"True",
"the",
"signals",
"of",
"the",
"combo",
"boxes",
"and",
"spin",
"boxes",
"are",
"blocked",
"Returns",
"the",
"old",
"blocking",
"state",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collector.py#L145-L156 |
titusjan/argos | argos/collect/collector.py | Collector._setColumnCountForContents | def _setColumnCountForContents(self):
""" Sets the column count given the current axes and selected RTI.
Returns the newly set column count.
"""
numRtiDims = self.rti.nDims if self.rti and self.rti.isSliceable else 0
colCount = self.COL_FIRST_COMBO + max(numRtiDims, len(self... | python | def _setColumnCountForContents(self):
""" Sets the column count given the current axes and selected RTI.
Returns the newly set column count.
"""
numRtiDims = self.rti.nDims if self.rti and self.rti.isSliceable else 0
colCount = self.COL_FIRST_COMBO + max(numRtiDims, len(self... | [
"def",
"_setColumnCountForContents",
"(",
"self",
")",
":",
"numRtiDims",
"=",
"self",
".",
"rti",
".",
"nDims",
"if",
"self",
".",
"rti",
"and",
"self",
".",
"rti",
".",
"isSliceable",
"else",
"0",
"colCount",
"=",
"self",
".",
"COL_FIRST_COMBO",
"+",
"... | Sets the column count given the current axes and selected RTI.
Returns the newly set column count. | [
"Sets",
"the",
"column",
"count",
"given",
"the",
"current",
"axes",
"and",
"selected",
"RTI",
".",
"Returns",
"the",
"newly",
"set",
"column",
"count",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collector.py#L159-L167 |
titusjan/argos | argos/collect/collector.py | Collector.clear | def clear(self):
""" Removes all VisItems
"""
model = self.tree.model()
# Don't use model.clear(). it will delete the column sizes
model.removeRows(0, 1)
model.setRowCount(1)
self._setColumnCountForContents() | python | def clear(self):
""" Removes all VisItems
"""
model = self.tree.model()
# Don't use model.clear(). it will delete the column sizes
model.removeRows(0, 1)
model.setRowCount(1)
self._setColumnCountForContents() | [
"def",
"clear",
"(",
"self",
")",
":",
"model",
"=",
"self",
".",
"tree",
".",
"model",
"(",
")",
"# Don't use model.clear(). it will delete the column sizes",
"model",
".",
"removeRows",
"(",
"0",
",",
"1",
")",
"model",
".",
"setRowCount",
"(",
"1",
")",
... | Removes all VisItems | [
"Removes",
"all",
"VisItems"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collector.py#L170-L177 |
titusjan/argos | argos/collect/collector.py | Collector.clearAndSetComboBoxes | def clearAndSetComboBoxes(self, axesNames):
""" Removes all comboboxes.
"""
logger.debug("Collector clearAndSetComboBoxes: {}".format(axesNames))
check_is_a_sequence(axesNames)
row = 0
self._deleteComboBoxes(row)
self.clear()
self._setAxesNames(axesNames)
... | python | def clearAndSetComboBoxes(self, axesNames):
""" Removes all comboboxes.
"""
logger.debug("Collector clearAndSetComboBoxes: {}".format(axesNames))
check_is_a_sequence(axesNames)
row = 0
self._deleteComboBoxes(row)
self.clear()
self._setAxesNames(axesNames)
... | [
"def",
"clearAndSetComboBoxes",
"(",
"self",
",",
"axesNames",
")",
":",
"logger",
".",
"debug",
"(",
"\"Collector clearAndSetComboBoxes: {}\"",
".",
"format",
"(",
"axesNames",
")",
")",
"check_is_a_sequence",
"(",
"axesNames",
")",
"row",
"=",
"0",
"self",
"."... | Removes all comboboxes. | [
"Removes",
"all",
"comboboxes",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collector.py#L180-L190 |
titusjan/argos | argos/collect/collector.py | Collector._setAxesNames | def _setAxesNames(self, axisNames):
""" Sets the axesnames, combobox lables and updates the headers. Removes old values first.
The comboLables is the axes name + '-axis'
"""
for col, _ in enumerate(self._fullAxisNames, self.COL_FIRST_COMBO):
self._setHeaderLabel(col, '')
... | python | def _setAxesNames(self, axisNames):
""" Sets the axesnames, combobox lables and updates the headers. Removes old values first.
The comboLables is the axes name + '-axis'
"""
for col, _ in enumerate(self._fullAxisNames, self.COL_FIRST_COMBO):
self._setHeaderLabel(col, '')
... | [
"def",
"_setAxesNames",
"(",
"self",
",",
"axisNames",
")",
":",
"for",
"col",
",",
"_",
"in",
"enumerate",
"(",
"self",
".",
"_fullAxisNames",
",",
"self",
".",
"COL_FIRST_COMBO",
")",
":",
"self",
".",
"_setHeaderLabel",
"(",
"col",
",",
"''",
")",
"... | Sets the axesnames, combobox lables and updates the headers. Removes old values first.
The comboLables is the axes name + '-axis' | [
"Sets",
"the",
"axesnames",
"combobox",
"lables",
"and",
"updates",
"the",
"headers",
".",
"Removes",
"old",
"values",
"first",
".",
"The",
"comboLables",
"is",
"the",
"axes",
"name",
"+",
"-",
"axis"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collector.py#L193-L204 |
titusjan/argos | argos/collect/collector.py | Collector._setHeaderLabel | def _setHeaderLabel(self, col, text):
""" Sets the header of column col to text.
Will increase the number of columns if col is larger than the current number.
"""
model = self.tree.model()
item = model.horizontalHeaderItem(col)
if item:
item.setText(text)
... | python | def _setHeaderLabel(self, col, text):
""" Sets the header of column col to text.
Will increase the number of columns if col is larger than the current number.
"""
model = self.tree.model()
item = model.horizontalHeaderItem(col)
if item:
item.setText(text)
... | [
"def",
"_setHeaderLabel",
"(",
"self",
",",
"col",
",",
"text",
")",
":",
"model",
"=",
"self",
".",
"tree",
".",
"model",
"(",
")",
"item",
"=",
"model",
".",
"horizontalHeaderItem",
"(",
"col",
")",
"if",
"item",
":",
"item",
".",
"setText",
"(",
... | Sets the header of column col to text.
Will increase the number of columns if col is larger than the current number. | [
"Sets",
"the",
"header",
"of",
"column",
"col",
"to",
"text",
".",
"Will",
"increase",
"the",
"number",
"of",
"columns",
"if",
"col",
"is",
"larger",
"than",
"the",
"current",
"number",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collector.py#L207-L216 |
titusjan/argos | argos/collect/collector.py | Collector.setRti | def setRti(self, rti):
""" Updates the current VisItem from the contents of the repo tree item.
Is a slot but the signal is usually connected to the Collector, which then calls
this function directly.
"""
check_class(rti, BaseRti)
#assert rti.isSliceable, "RTI mu... | python | def setRti(self, rti):
""" Updates the current VisItem from the contents of the repo tree item.
Is a slot but the signal is usually connected to the Collector, which then calls
this function directly.
"""
check_class(rti, BaseRti)
#assert rti.isSliceable, "RTI mu... | [
"def",
"setRti",
"(",
"self",
",",
"rti",
")",
":",
"check_class",
"(",
"rti",
",",
"BaseRti",
")",
"#assert rti.isSliceable, \"RTI must be sliceable\" # TODO: maybe later",
"self",
".",
"_rti",
"=",
"rti",
"self",
".",
"_updateWidgets",
"(",
")",
"self",
".",
"... | Updates the current VisItem from the contents of the repo tree item.
Is a slot but the signal is usually connected to the Collector, which then calls
this function directly. | [
"Updates",
"the",
"current",
"VisItem",
"from",
"the",
"contents",
"of",
"the",
"repo",
"tree",
"item",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collector.py#L220-L231 |
titusjan/argos | argos/collect/collector.py | Collector._updateWidgets | def _updateWidgets(self):
""" Updates the combo and spin boxes given the new rti or axes.
Emits the sigContentsChanged signal.
"""
row = 0
model = self.tree.model()
# Create path label
nodePath = '' if self.rti is None else self.rti.nodePath
pathItem ... | python | def _updateWidgets(self):
""" Updates the combo and spin boxes given the new rti or axes.
Emits the sigContentsChanged signal.
"""
row = 0
model = self.tree.model()
# Create path label
nodePath = '' if self.rti is None else self.rti.nodePath
pathItem ... | [
"def",
"_updateWidgets",
"(",
"self",
")",
":",
"row",
"=",
"0",
"model",
"=",
"self",
".",
"tree",
".",
"model",
"(",
")",
"# Create path label",
"nodePath",
"=",
"''",
"if",
"self",
".",
"rti",
"is",
"None",
"else",
"self",
".",
"rti",
".",
"nodePa... | Updates the combo and spin boxes given the new rti or axes.
Emits the sigContentsChanged signal. | [
"Updates",
"the",
"combo",
"and",
"spin",
"boxes",
"given",
"the",
"new",
"rti",
"or",
"axes",
".",
"Emits",
"the",
"sigContentsChanged",
"signal",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collector.py#L234-L259 |
titusjan/argos | argos/collect/collector.py | Collector._createComboBoxes | def _createComboBoxes(self, row):
""" Creates a combo box for each of the fullAxisNames
"""
tree = self.tree
model = self.tree.model()
self._setColumnCountForContents()
for col, _ in enumerate(self._axisNames, self.COL_FIRST_COMBO):
logger.debug("Adding combo... | python | def _createComboBoxes(self, row):
""" Creates a combo box for each of the fullAxisNames
"""
tree = self.tree
model = self.tree.model()
self._setColumnCountForContents()
for col, _ in enumerate(self._axisNames, self.COL_FIRST_COMBO):
logger.debug("Adding combo... | [
"def",
"_createComboBoxes",
"(",
"self",
",",
"row",
")",
":",
"tree",
"=",
"self",
".",
"tree",
"model",
"=",
"self",
".",
"tree",
".",
"model",
"(",
")",
"self",
".",
"_setColumnCountForContents",
"(",
")",
"for",
"col",
",",
"_",
"in",
"enumerate",
... | Creates a combo box for each of the fullAxisNames | [
"Creates",
"a",
"combo",
"box",
"for",
"each",
"of",
"the",
"fullAxisNames"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collector.py#L262-L277 |
titusjan/argos | argos/collect/collector.py | Collector._deleteComboBoxes | def _deleteComboBoxes(self, row):
""" Deletes all comboboxes of a row
"""
tree = self.tree
model = self.tree.model()
for col in range(self.COL_FIRST_COMBO, self.maxCombos):
logger.debug("Removing combobox at: ({}, {})".format(row, col))
tree.setIndexWidge... | python | def _deleteComboBoxes(self, row):
""" Deletes all comboboxes of a row
"""
tree = self.tree
model = self.tree.model()
for col in range(self.COL_FIRST_COMBO, self.maxCombos):
logger.debug("Removing combobox at: ({}, {})".format(row, col))
tree.setIndexWidge... | [
"def",
"_deleteComboBoxes",
"(",
"self",
",",
"row",
")",
":",
"tree",
"=",
"self",
".",
"tree",
"model",
"=",
"self",
".",
"tree",
".",
"model",
"(",
")",
"for",
"col",
"in",
"range",
"(",
"self",
".",
"COL_FIRST_COMBO",
",",
"self",
".",
"maxCombos... | Deletes all comboboxes of a row | [
"Deletes",
"all",
"comboboxes",
"of",
"a",
"row"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collector.py#L280-L290 |
titusjan/argos | argos/collect/collector.py | Collector._populateComboBoxes | def _populateComboBoxes(self, row):
""" Populates the combo boxes with values of the repo tree item
"""
logger.debug("_populateComboBoxes")
for comboBox in self._comboBoxes:
comboBox.clear()
if not self.rtiIsSliceable:
# Add an empty item to the combo box... | python | def _populateComboBoxes(self, row):
""" Populates the combo boxes with values of the repo tree item
"""
logger.debug("_populateComboBoxes")
for comboBox in self._comboBoxes:
comboBox.clear()
if not self.rtiIsSliceable:
# Add an empty item to the combo box... | [
"def",
"_populateComboBoxes",
"(",
"self",
",",
"row",
")",
":",
"logger",
".",
"debug",
"(",
"\"_populateComboBoxes\"",
")",
"for",
"comboBox",
"in",
"self",
".",
"_comboBoxes",
":",
"comboBox",
".",
"clear",
"(",
")",
"if",
"not",
"self",
".",
"rtiIsSlic... | Populates the combo boxes with values of the repo tree item | [
"Populates",
"the",
"combo",
"boxes",
"with",
"values",
"of",
"the",
"repo",
"tree",
"item"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collector.py#L294-L335 |
titusjan/argos | argos/collect/collector.py | Collector._dimensionSelectedInComboBox | def _dimensionSelectedInComboBox(self, dimNr):
""" Returns True if the dimension is selected in one of the combo boxes.
"""
for combobox in self._comboBoxes:
if self._comboBoxDimensionIndex(combobox) == dimNr:
return True
return False | python | def _dimensionSelectedInComboBox(self, dimNr):
""" Returns True if the dimension is selected in one of the combo boxes.
"""
for combobox in self._comboBoxes:
if self._comboBoxDimensionIndex(combobox) == dimNr:
return True
return False | [
"def",
"_dimensionSelectedInComboBox",
"(",
"self",
",",
"dimNr",
")",
":",
"for",
"combobox",
"in",
"self",
".",
"_comboBoxes",
":",
"if",
"self",
".",
"_comboBoxDimensionIndex",
"(",
"combobox",
")",
"==",
"dimNr",
":",
"return",
"True",
"return",
"False"
] | Returns True if the dimension is selected in one of the combo boxes. | [
"Returns",
"True",
"if",
"the",
"dimension",
"is",
"selected",
"in",
"one",
"of",
"the",
"combo",
"boxes",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collector.py#L357-L363 |
titusjan/argos | argos/collect/collector.py | Collector._createSpinBoxes | def _createSpinBoxes(self, row):
""" Creates a spinBox for each dimension that is not selected in a combo box.
"""
assert len(self._spinBoxes) == 0, "Spinbox list not empty. Call _deleteSpinBoxes first"
if not self.rtiIsSliceable:
return
logger.debug("_createSpinBox... | python | def _createSpinBoxes(self, row):
""" Creates a spinBox for each dimension that is not selected in a combo box.
"""
assert len(self._spinBoxes) == 0, "Spinbox list not empty. Call _deleteSpinBoxes first"
if not self.rtiIsSliceable:
return
logger.debug("_createSpinBox... | [
"def",
"_createSpinBoxes",
"(",
"self",
",",
"row",
")",
":",
"assert",
"len",
"(",
"self",
".",
"_spinBoxes",
")",
"==",
"0",
",",
"\"Spinbox list not empty. Call _deleteSpinBoxes first\"",
"if",
"not",
"self",
".",
"rtiIsSliceable",
":",
"return",
"logger",
".... | Creates a spinBox for each dimension that is not selected in a combo box. | [
"Creates",
"a",
"spinBox",
"for",
"each",
"dimension",
"that",
"is",
"not",
"selected",
"in",
"a",
"combo",
"box",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collector.py#L366-L411 |
titusjan/argos | argos/collect/collector.py | Collector._deleteSpinBoxes | def _deleteSpinBoxes(self, row):
""" Removes all spinboxes
"""
tree = self.tree
model = self.tree.model()
for col, spinBox in enumerate(self._spinBoxes, self.COL_FIRST_COMBO + self.maxCombos):
spinBox.valueChanged[int].disconnect(self._spinboxValueChanged)
... | python | def _deleteSpinBoxes(self, row):
""" Removes all spinboxes
"""
tree = self.tree
model = self.tree.model()
for col, spinBox in enumerate(self._spinBoxes, self.COL_FIRST_COMBO + self.maxCombos):
spinBox.valueChanged[int].disconnect(self._spinboxValueChanged)
... | [
"def",
"_deleteSpinBoxes",
"(",
"self",
",",
"row",
")",
":",
"tree",
"=",
"self",
".",
"tree",
"model",
"=",
"self",
".",
"tree",
".",
"model",
"(",
")",
"for",
"col",
",",
"spinBox",
"in",
"enumerate",
"(",
"self",
".",
"_spinBoxes",
",",
"self",
... | Removes all spinboxes | [
"Removes",
"all",
"spinboxes"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collector.py#L414-L425 |
titusjan/argos | argos/collect/collector.py | Collector._comboBoxActivated | def _comboBoxActivated(self, index, comboBox=None):
""" Is called when a combo box value was changed by the user.
Updates the spin boxes and sets other combo boxes having the same index to
the fake dimension of length 1.
"""
if comboBox is None:
comboBox = se... | python | def _comboBoxActivated(self, index, comboBox=None):
""" Is called when a combo box value was changed by the user.
Updates the spin boxes and sets other combo boxes having the same index to
the fake dimension of length 1.
"""
if comboBox is None:
comboBox = se... | [
"def",
"_comboBoxActivated",
"(",
"self",
",",
"index",
",",
"comboBox",
"=",
"None",
")",
":",
"if",
"comboBox",
"is",
"None",
":",
"comboBox",
"=",
"self",
".",
"sender",
"(",
")",
"assert",
"comboBox",
",",
"\"comboBox not defined and not the sender\"",
"bl... | Is called when a combo box value was changed by the user.
Updates the spin boxes and sets other combo boxes having the same index to
the fake dimension of length 1. | [
"Is",
"called",
"when",
"a",
"combo",
"box",
"value",
"was",
"changed",
"by",
"the",
"user",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collector.py#L429-L461 |
titusjan/argos | argos/collect/collector.py | Collector._spinboxValueChanged | def _spinboxValueChanged(self, index, spinBox=None):
""" Is called when a spin box value was changed.
Updates the spin boxes and sets other combo boxes having the same index to
the fake dimension of length 1.
"""
if spinBox is None:
spinBox = self.sender()
... | python | def _spinboxValueChanged(self, index, spinBox=None):
""" Is called when a spin box value was changed.
Updates the spin boxes and sets other combo boxes having the same index to
the fake dimension of length 1.
"""
if spinBox is None:
spinBox = self.sender()
... | [
"def",
"_spinboxValueChanged",
"(",
"self",
",",
"index",
",",
"spinBox",
"=",
"None",
")",
":",
"if",
"spinBox",
"is",
"None",
":",
"spinBox",
"=",
"self",
".",
"sender",
"(",
")",
"assert",
"spinBox",
",",
"\"spinBox not defined and not the sender\"",
"logge... | Is called when a spin box value was changed.
Updates the spin boxes and sets other combo boxes having the same index to
the fake dimension of length 1. | [
"Is",
"called",
"when",
"a",
"spin",
"box",
"value",
"was",
"changed",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collector.py#L465-L477 |
titusjan/argos | argos/collect/collector.py | Collector.getSlicedArray | def getSlicedArray(self, copy=True):
""" Slice the rti using a tuple of slices made from the values of the combo and spin boxes.
:param copy: If True (the default), a copy is made so that inspectors cannot
accidentally modify the underlying of the RTIs. You can set copy=False as a
... | python | def getSlicedArray(self, copy=True):
""" Slice the rti using a tuple of slices made from the values of the combo and spin boxes.
:param copy: If True (the default), a copy is made so that inspectors cannot
accidentally modify the underlying of the RTIs. You can set copy=False as a
... | [
"def",
"getSlicedArray",
"(",
"self",
",",
"copy",
"=",
"True",
")",
":",
"#logger.debug(\"getSlicedArray() called\")",
"if",
"not",
"self",
".",
"rtiIsSliceable",
":",
"return",
"None",
"# The dimensions that are selected in the combo boxes will be set to slice(None),",
"# t... | Slice the rti using a tuple of slices made from the values of the combo and spin boxes.
:param copy: If True (the default), a copy is made so that inspectors cannot
accidentally modify the underlying of the RTIs. You can set copy=False as a
potential optimization, but only i... | [
"Slice",
"the",
"rti",
"using",
"a",
"tuple",
"of",
"slices",
"made",
"from",
"the",
"values",
"of",
"the",
"combo",
"and",
"spin",
"boxes",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collector.py#L480-L557 |
titusjan/argos | argos/collect/collector.py | Collector.getSlicesString | def getSlicesString(self):
""" Returns a string representation of the slices that are used to get the sliced array.
For example returns '[:, 5]' if the combo box selects dimension 0 and the spin box 5.
"""
if not self.rtiIsSliceable:
return ''
# The dimensions th... | python | def getSlicesString(self):
""" Returns a string representation of the slices that are used to get the sliced array.
For example returns '[:, 5]' if the combo box selects dimension 0 and the spin box 5.
"""
if not self.rtiIsSliceable:
return ''
# The dimensions th... | [
"def",
"getSlicesString",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"rtiIsSliceable",
":",
"return",
"''",
"# The dimensions that are selected in the combo boxes will be set to slice(None),",
"# the values from the spin boxes will be set as a single integer value",
"nDims",
... | Returns a string representation of the slices that are used to get the sliced array.
For example returns '[:, 5]' if the combo box selects dimension 0 and the spin box 5. | [
"Returns",
"a",
"string",
"representation",
"of",
"the",
"slices",
"that",
"are",
"used",
"to",
"get",
"the",
"sliced",
"array",
".",
"For",
"example",
"returns",
"[",
":",
"5",
"]",
"if",
"the",
"combo",
"box",
"selects",
"dimension",
"0",
"and",
"the",... | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collector.py#L560-L579 |
titusjan/argos | argos/collect/collector.py | Collector._updateRtiInfo | def _updateRtiInfo(self):
""" Updates the _rtiInfo property when a new RTI is set or the comboboxes value change.
"""
logger.debug("Updating self._rtiInfo")
# Info about the dependent dimension
rti = self.rti
if rti is None:
info = {'slices': '',
... | python | def _updateRtiInfo(self):
""" Updates the _rtiInfo property when a new RTI is set or the comboboxes value change.
"""
logger.debug("Updating self._rtiInfo")
# Info about the dependent dimension
rti = self.rti
if rti is None:
info = {'slices': '',
... | [
"def",
"_updateRtiInfo",
"(",
"self",
")",
":",
"logger",
".",
"debug",
"(",
"\"Updating self._rtiInfo\"",
")",
"# Info about the dependent dimension",
"rti",
"=",
"self",
".",
"rti",
"if",
"rti",
"is",
"None",
":",
"info",
"=",
"{",
"'slices'",
":",
"''",
"... | Updates the _rtiInfo property when a new RTI is set or the comboboxes value change. | [
"Updates",
"the",
"_rtiInfo",
"property",
"when",
"a",
"new",
"RTI",
"is",
"set",
"or",
"the",
"comboboxes",
"value",
"change",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/collect/collector.py#L624-L656 |
titusjan/argos | argos/repo/memoryrtis.py | _createFromObject | def _createFromObject(obj, *args, **kwargs):
""" Creates an RTI given an object. Auto-detects which RTI class to return.
The *args and **kwargs parameters are passed to the RTI constructor.
It is therefor important that all memory RTIs accept the same parameters in the
constructor (with exce... | python | def _createFromObject(obj, *args, **kwargs):
""" Creates an RTI given an object. Auto-detects which RTI class to return.
The *args and **kwargs parameters are passed to the RTI constructor.
It is therefor important that all memory RTIs accept the same parameters in the
constructor (with exce... | [
"def",
"_createFromObject",
"(",
"obj",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"is_a_sequence",
"(",
"obj",
")",
":",
"return",
"SequenceRti",
"(",
"obj",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"elif",
"is_a_mapping",
"("... | Creates an RTI given an object. Auto-detects which RTI class to return.
The *args and **kwargs parameters are passed to the RTI constructor.
It is therefor important that all memory RTIs accept the same parameters in the
constructor (with exception of the FieldRti which is not auto-detected). | [
"Creates",
"an",
"RTI",
"given",
"an",
"object",
".",
"Auto",
"-",
"detects",
"which",
"RTI",
"class",
"to",
"return",
".",
"The",
"*",
"args",
"and",
"**",
"kwargs",
"parameters",
"are",
"passed",
"to",
"the",
"RTI",
"constructor",
".",
"It",
"is",
"t... | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/memoryrtis.py#L33-L48 |
titusjan/argos | argos/repo/memoryrtis.py | FieldRti._subArrayShape | def _subArrayShape(self):
""" Returns the shape of the sub-array.
An empty tuple is returned for regular fields, which have no sub array.
"""
fieldName = self.nodeName
fieldDtype = self._array.dtype.fields[fieldName][0]
return fieldDtype.shape | python | def _subArrayShape(self):
""" Returns the shape of the sub-array.
An empty tuple is returned for regular fields, which have no sub array.
"""
fieldName = self.nodeName
fieldDtype = self._array.dtype.fields[fieldName][0]
return fieldDtype.shape | [
"def",
"_subArrayShape",
"(",
"self",
")",
":",
"fieldName",
"=",
"self",
".",
"nodeName",
"fieldDtype",
"=",
"self",
".",
"_array",
".",
"dtype",
".",
"fields",
"[",
"fieldName",
"]",
"[",
"0",
"]",
"return",
"fieldDtype",
".",
"shape"
] | Returns the shape of the sub-array.
An empty tuple is returned for regular fields, which have no sub array. | [
"Returns",
"the",
"shape",
"of",
"the",
"sub",
"-",
"array",
".",
"An",
"empty",
"tuple",
"is",
"returned",
"for",
"regular",
"fields",
"which",
"have",
"no",
"sub",
"array",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/memoryrtis.py#L198-L204 |
titusjan/argos | argos/repo/memoryrtis.py | FieldRti.elementTypeName | def elementTypeName(self):
""" String representation of the element type.
"""
if self._array is None:
return super(FieldRti, self).elementTypeName
else:
fieldName = self.nodeName
return str(self._array.dtype.fields[fieldName][0]) | python | def elementTypeName(self):
""" String representation of the element type.
"""
if self._array is None:
return super(FieldRti, self).elementTypeName
else:
fieldName = self.nodeName
return str(self._array.dtype.fields[fieldName][0]) | [
"def",
"elementTypeName",
"(",
"self",
")",
":",
"if",
"self",
".",
"_array",
"is",
"None",
":",
"return",
"super",
"(",
"FieldRti",
",",
"self",
")",
".",
"elementTypeName",
"else",
":",
"fieldName",
"=",
"self",
".",
"nodeName",
"return",
"str",
"(",
... | String representation of the element type. | [
"String",
"representation",
"of",
"the",
"element",
"type",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/memoryrtis.py#L216-L223 |
titusjan/argos | argos/repo/memoryrtis.py | FieldRti.dimensionNames | def dimensionNames(self):
""" Returns a list with the dimension names of the underlying NCDF variable
"""
mainArrayDims = ['Dim{}'.format(dimNr) for dimNr in range(self._array.ndim)]
nSubDims = len(self._subArrayShape)
subArrayDims = ['SubDim{}'.format(dimNr) for dimNr in range(n... | python | def dimensionNames(self):
""" Returns a list with the dimension names of the underlying NCDF variable
"""
mainArrayDims = ['Dim{}'.format(dimNr) for dimNr in range(self._array.ndim)]
nSubDims = len(self._subArrayShape)
subArrayDims = ['SubDim{}'.format(dimNr) for dimNr in range(n... | [
"def",
"dimensionNames",
"(",
"self",
")",
":",
"mainArrayDims",
"=",
"[",
"'Dim{}'",
".",
"format",
"(",
"dimNr",
")",
"for",
"dimNr",
"in",
"range",
"(",
"self",
".",
"_array",
".",
"ndim",
")",
"]",
"nSubDims",
"=",
"len",
"(",
"self",
".",
"_subA... | Returns a list with the dimension names of the underlying NCDF variable | [
"Returns",
"a",
"list",
"with",
"the",
"dimension",
"names",
"of",
"the",
"underlying",
"NCDF",
"variable"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/memoryrtis.py#L227-L233 |
titusjan/argos | argos/repo/memoryrtis.py | FieldRti.missingDataValue | def missingDataValue(self):
""" Returns the value to indicate missing data.
"""
value = getMissingDataValue(self._array)
fieldNames = self._array.dtype.names
# If the missing value attibute is a list with the same length as the number of fields,
# return the missing val... | python | def missingDataValue(self):
""" Returns the value to indicate missing data.
"""
value = getMissingDataValue(self._array)
fieldNames = self._array.dtype.names
# If the missing value attibute is a list with the same length as the number of fields,
# return the missing val... | [
"def",
"missingDataValue",
"(",
"self",
")",
":",
"value",
"=",
"getMissingDataValue",
"(",
"self",
".",
"_array",
")",
"fieldNames",
"=",
"self",
".",
"_array",
".",
"dtype",
".",
"names",
"# If the missing value attibute is a list with the same length as the number of... | Returns the value to indicate missing data. | [
"Returns",
"the",
"value",
"to",
"indicate",
"missing",
"data",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/memoryrtis.py#L237-L249 |
titusjan/argos | argos/repo/memoryrtis.py | ArrayRti.elementTypeName | def elementTypeName(self):
""" String representation of the element type.
"""
if self._array is None:
return super(ArrayRti, self).elementTypeName
else:
dtype = self._array.dtype
return '<structured>' if dtype.names else str(dtype) | python | def elementTypeName(self):
""" String representation of the element type.
"""
if self._array is None:
return super(ArrayRti, self).elementTypeName
else:
dtype = self._array.dtype
return '<structured>' if dtype.names else str(dtype) | [
"def",
"elementTypeName",
"(",
"self",
")",
":",
"if",
"self",
".",
"_array",
"is",
"None",
":",
"return",
"super",
"(",
"ArrayRti",
",",
"self",
")",
".",
"elementTypeName",
"else",
":",
"dtype",
"=",
"self",
".",
"_array",
".",
"dtype",
"return",
"'<... | String representation of the element type. | [
"String",
"representation",
"of",
"the",
"element",
"type",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/memoryrtis.py#L328-L335 |
titusjan/argos | argos/repo/memoryrtis.py | ArrayRti._fetchAllChildren | def _fetchAllChildren(self):
""" Fetches all fields that this variable contains.
Only variables with a structured data type can have fields.
"""
assert self.canFetchChildren(), "canFetchChildren must be True"
childItems = []
# Add fields in case of an array of struc... | python | def _fetchAllChildren(self):
""" Fetches all fields that this variable contains.
Only variables with a structured data type can have fields.
"""
assert self.canFetchChildren(), "canFetchChildren must be True"
childItems = []
# Add fields in case of an array of struc... | [
"def",
"_fetchAllChildren",
"(",
"self",
")",
":",
"assert",
"self",
".",
"canFetchChildren",
"(",
")",
",",
"\"canFetchChildren must be True\"",
"childItems",
"=",
"[",
"]",
"# Add fields in case of an array of structured type.",
"if",
"self",
".",
"_isStructured",
":"... | Fetches all fields that this variable contains.
Only variables with a structured data type can have fields. | [
"Fetches",
"all",
"fields",
"that",
"this",
"variable",
"contains",
".",
"Only",
"variables",
"with",
"a",
"structured",
"data",
"type",
"can",
"have",
"fields",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/memoryrtis.py#L345-L360 |
titusjan/argos | argos/repo/memoryrtis.py | SyntheticArrayRti._openResources | def _openResources(self):
""" Evaluates the function to result an array
"""
arr = self._fun()
check_is_an_array(arr)
self._array = arr | python | def _openResources(self):
""" Evaluates the function to result an array
"""
arr = self._fun()
check_is_an_array(arr)
self._array = arr | [
"def",
"_openResources",
"(",
"self",
")",
":",
"arr",
"=",
"self",
".",
"_fun",
"(",
")",
"check_is_an_array",
"(",
"arr",
")",
"self",
".",
"_array",
"=",
"arr"
] | Evaluates the function to result an array | [
"Evaluates",
"the",
"function",
"to",
"result",
"an",
"array"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/memoryrtis.py#L400-L405 |
titusjan/argos | argos/repo/memoryrtis.py | SequenceRti._fetchAllChildren | def _fetchAllChildren(self):
""" Adds a child item for each column
"""
childItems = []
for nr, elem in enumerate(self._sequence):
childItem = _createFromObject(elem, "elem-{}".format(nr), self.fileName)
childItem._iconColor = self.iconColor
childItems.... | python | def _fetchAllChildren(self):
""" Adds a child item for each column
"""
childItems = []
for nr, elem in enumerate(self._sequence):
childItem = _createFromObject(elem, "elem-{}".format(nr), self.fileName)
childItem._iconColor = self.iconColor
childItems.... | [
"def",
"_fetchAllChildren",
"(",
"self",
")",
":",
"childItems",
"=",
"[",
"]",
"for",
"nr",
",",
"elem",
"in",
"enumerate",
"(",
"self",
".",
"_sequence",
")",
":",
"childItem",
"=",
"_createFromObject",
"(",
"elem",
",",
"\"elem-{}\"",
".",
"format",
"... | Adds a child item for each column | [
"Adds",
"a",
"child",
"item",
"for",
"each",
"column"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/memoryrtis.py#L450-L458 |
titusjan/argos | argos/repo/memoryrtis.py | MappingRti._fetchAllChildren | def _fetchAllChildren(self):
""" Adds a child item for each item
"""
childItems = []
logger.debug("{!r} _fetchAllChildren {!r}".format(self, self.fileName))
if self.hasChildren():
for key, value in sorted(self._dictionary.items()):
# TODO: pass the at... | python | def _fetchAllChildren(self):
""" Adds a child item for each item
"""
childItems = []
logger.debug("{!r} _fetchAllChildren {!r}".format(self, self.fileName))
if self.hasChildren():
for key, value in sorted(self._dictionary.items()):
# TODO: pass the at... | [
"def",
"_fetchAllChildren",
"(",
"self",
")",
":",
"childItems",
"=",
"[",
"]",
"logger",
".",
"debug",
"(",
"\"{!r} _fetchAllChildren {!r}\"",
".",
"format",
"(",
"self",
",",
"self",
".",
"fileName",
")",
")",
"if",
"self",
".",
"hasChildren",
"(",
")",
... | Adds a child item for each item | [
"Adds",
"a",
"child",
"item",
"for",
"each",
"item"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/memoryrtis.py#L499-L512 |
titusjan/argos | argos/config/intcti.py | IntCti.debugInfo | def debugInfo(self):
""" Returns the string with debugging information
"""
return ("enabled = {}, min = {}, max = {}, step = {}, specVal = {}"
.format(self.enabled, self.minValue, self.maxValue, self.stepSize, self.specialValueText)) | python | def debugInfo(self):
""" Returns the string with debugging information
"""
return ("enabled = {}, min = {}, max = {}, step = {}, specVal = {}"
.format(self.enabled, self.minValue, self.maxValue, self.stepSize, self.specialValueText)) | [
"def",
"debugInfo",
"(",
"self",
")",
":",
"return",
"(",
"\"enabled = {}, min = {}, max = {}, step = {}, specVal = {}\"",
".",
"format",
"(",
"self",
".",
"enabled",
",",
"self",
".",
"minValue",
",",
"self",
".",
"maxValue",
",",
"self",
".",
"stepSize",
",",
... | Returns the string with debugging information | [
"Returns",
"the",
"string",
"with",
"debugging",
"information"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/intcti.py#L73-L77 |
titusjan/argos | argos/config/intcti.py | IntCti.createEditor | def createEditor(self, delegate, parent, option):
""" Creates a IntCtiEditor.
For the parameters see the AbstractCti constructor documentation.
"""
return IntCtiEditor(self, delegate, parent=parent) | python | def createEditor(self, delegate, parent, option):
""" Creates a IntCtiEditor.
For the parameters see the AbstractCti constructor documentation.
"""
return IntCtiEditor(self, delegate, parent=parent) | [
"def",
"createEditor",
"(",
"self",
",",
"delegate",
",",
"parent",
",",
"option",
")",
":",
"return",
"IntCtiEditor",
"(",
"self",
",",
"delegate",
",",
"parent",
"=",
"parent",
")"
] | Creates a IntCtiEditor.
For the parameters see the AbstractCti constructor documentation. | [
"Creates",
"a",
"IntCtiEditor",
".",
"For",
"the",
"parameters",
"see",
"the",
"AbstractCti",
"constructor",
"documentation",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/intcti.py#L80-L84 |
titusjan/argos | argos/config/intcti.py | IntCtiEditor.finalize | def finalize(self):
""" Called at clean up. Is used to disconnect signals.
"""
self.spinBox.valueChanged.disconnect(self.commitChangedValue)
super(IntCtiEditor, self).finalize() | python | def finalize(self):
""" Called at clean up. Is used to disconnect signals.
"""
self.spinBox.valueChanged.disconnect(self.commitChangedValue)
super(IntCtiEditor, self).finalize() | [
"def",
"finalize",
"(",
"self",
")",
":",
"self",
".",
"spinBox",
".",
"valueChanged",
".",
"disconnect",
"(",
"self",
".",
"commitChangedValue",
")",
"super",
"(",
"IntCtiEditor",
",",
"self",
")",
".",
"finalize",
"(",
")"
] | Called at clean up. Is used to disconnect signals. | [
"Called",
"at",
"clean",
"up",
".",
"Is",
"used",
"to",
"disconnect",
"signals",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/intcti.py#L120-L124 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.finalize | def finalize(self):
""" Is called before destruction (when closing).
Can be used to clean-up resources.
"""
logger.debug("Finalizing: {}".format(self))
# Disconnect signals
self.collector.sigContentsChanged.disconnect(self.collectorContentsChanged)
self._conf... | python | def finalize(self):
""" Is called before destruction (when closing).
Can be used to clean-up resources.
"""
logger.debug("Finalizing: {}".format(self))
# Disconnect signals
self.collector.sigContentsChanged.disconnect(self.collectorContentsChanged)
self._conf... | [
"def",
"finalize",
"(",
"self",
")",
":",
"logger",
".",
"debug",
"(",
"\"Finalizing: {}\"",
".",
"format",
"(",
"self",
")",
")",
"# Disconnect signals",
"self",
".",
"collector",
".",
"sigContentsChanged",
".",
"disconnect",
"(",
"self",
".",
"collectorConte... | Is called before destruction (when closing).
Can be used to clean-up resources. | [
"Is",
"called",
"before",
"destruction",
"(",
"when",
"closing",
")",
".",
"Can",
"be",
"used",
"to",
"clean",
"-",
"up",
"resources",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L105-L115 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.__setupViews | def __setupViews(self):
""" Creates the UI widgets.
"""
self._collector = Collector(self.windowNumber)
self.configWidget = ConfigWidget(self._configTreeModel)
self.repoWidget = RepoWidget(self.argosApplication.repo, self.collector)
# self._configTreeModel.insertItem(self.... | python | def __setupViews(self):
""" Creates the UI widgets.
"""
self._collector = Collector(self.windowNumber)
self.configWidget = ConfigWidget(self._configTreeModel)
self.repoWidget = RepoWidget(self.argosApplication.repo, self.collector)
# self._configTreeModel.insertItem(self.... | [
"def",
"__setupViews",
"(",
"self",
")",
":",
"self",
".",
"_collector",
"=",
"Collector",
"(",
"self",
".",
"windowNumber",
")",
"self",
".",
"configWidget",
"=",
"ConfigWidget",
"(",
"self",
".",
"_configTreeModel",
")",
"self",
".",
"repoWidget",
"=",
"... | Creates the UI widgets. | [
"Creates",
"the",
"UI",
"widgets",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L118-L137 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.__setupMenus | def __setupMenus(self):
""" Sets up the main menu.
"""
if True:
# Don't use self.menuBar(), on OS-X this is not shared across windows.
# See: http://qt-project.org/doc/qt-4.8/qmenubar.html#details
# And:http://qt-project.org/doc/qt-4.8/qmainwindow.html#menuBar... | python | def __setupMenus(self):
""" Sets up the main menu.
"""
if True:
# Don't use self.menuBar(), on OS-X this is not shared across windows.
# See: http://qt-project.org/doc/qt-4.8/qmenubar.html#details
# And:http://qt-project.org/doc/qt-4.8/qmainwindow.html#menuBar... | [
"def",
"__setupMenus",
"(",
"self",
")",
":",
"if",
"True",
":",
"# Don't use self.menuBar(), on OS-X this is not shared across windows.",
"# See: http://qt-project.org/doc/qt-4.8/qmenubar.html#details",
"# And:http://qt-project.org/doc/qt-4.8/qmainwindow.html#menuBar",
"menuBar",
"=",
"... | Sets up the main menu. | [
"Sets",
"up",
"the",
"main",
"menu",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L140-L238 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.__createInspectorActionGroup | def __createInspectorActionGroup(self, parent):
""" Creates an action group with 'set inspector' actions for all installed inspector.
"""
actionGroup = QtWidgets.QActionGroup(parent)
actionGroup.setExclusive(True)
sortedItems = sorted(self.argosApplication.inspectorRegistry.item... | python | def __createInspectorActionGroup(self, parent):
""" Creates an action group with 'set inspector' actions for all installed inspector.
"""
actionGroup = QtWidgets.QActionGroup(parent)
actionGroup.setExclusive(True)
sortedItems = sorted(self.argosApplication.inspectorRegistry.item... | [
"def",
"__createInspectorActionGroup",
"(",
"self",
",",
"parent",
")",
":",
"actionGroup",
"=",
"QtWidgets",
".",
"QActionGroup",
"(",
"parent",
")",
"actionGroup",
".",
"setExclusive",
"(",
"True",
")",
"sortedItems",
"=",
"sorted",
"(",
"self",
".",
"argosA... | Creates an action group with 'set inspector' actions for all installed inspector. | [
"Creates",
"an",
"action",
"group",
"with",
"set",
"inspector",
"actions",
"for",
"all",
"installed",
"inspector",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L241-L261 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.__setupDockWidgets | def __setupDockWidgets(self):
""" Sets up the dock widgets. Must be called after the menu is setup.
"""
#self.dockWidget(self.currentInspectorPane, "Current Inspector", Qt.LeftDockWidgetArea)
self.inspectorSelectionPane = InspectorSelectionPane(self.execInspectorDialogAction,
... | python | def __setupDockWidgets(self):
""" Sets up the dock widgets. Must be called after the menu is setup.
"""
#self.dockWidget(self.currentInspectorPane, "Current Inspector", Qt.LeftDockWidgetArea)
self.inspectorSelectionPane = InspectorSelectionPane(self.execInspectorDialogAction,
... | [
"def",
"__setupDockWidgets",
"(",
"self",
")",
":",
"#self.dockWidget(self.currentInspectorPane, \"Current Inspector\", Qt.LeftDockWidgetArea)",
"self",
".",
"inspectorSelectionPane",
"=",
"InspectorSelectionPane",
"(",
"self",
".",
"execInspectorDialogAction",
",",
"self",
".",
... | Sets up the dock widgets. Must be called after the menu is setup. | [
"Sets",
"up",
"the",
"dock",
"widgets",
".",
"Must",
"be",
"called",
"after",
"the",
"menu",
"is",
"setup",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L264-L293 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.repopulateWinowMenu | def repopulateWinowMenu(self, actionGroup):
""" Clear the window menu and fills it with the actions of the actionGroup
"""
for action in self.windowMenu.actions():
self.windowMenu.removeAction(action)
for action in actionGroup.actions():
self.windowMenu.addAction... | python | def repopulateWinowMenu(self, actionGroup):
""" Clear the window menu and fills it with the actions of the actionGroup
"""
for action in self.windowMenu.actions():
self.windowMenu.removeAction(action)
for action in actionGroup.actions():
self.windowMenu.addAction... | [
"def",
"repopulateWinowMenu",
"(",
"self",
",",
"actionGroup",
")",
":",
"for",
"action",
"in",
"self",
".",
"windowMenu",
".",
"actions",
"(",
")",
":",
"self",
".",
"windowMenu",
".",
"removeAction",
"(",
"action",
")",
"for",
"action",
"in",
"actionGrou... | Clear the window menu and fills it with the actions of the actionGroup | [
"Clear",
"the",
"window",
"menu",
"and",
"fills",
"it",
"with",
"the",
"actions",
"of",
"the",
"actionGroup"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L355-L362 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.showContextMenu | def showContextMenu(self, pos):
""" Shows the context menu at position pos.
"""
contextMenu = QtWidgets.QMenu()
addInspectorActionsToMenu(contextMenu, self.execInspectorDialogAction,
self.inspectorActionGroup)
contextMenu.exec_(self.mapToGlobal(p... | python | def showContextMenu(self, pos):
""" Shows the context menu at position pos.
"""
contextMenu = QtWidgets.QMenu()
addInspectorActionsToMenu(contextMenu, self.execInspectorDialogAction,
self.inspectorActionGroup)
contextMenu.exec_(self.mapToGlobal(p... | [
"def",
"showContextMenu",
"(",
"self",
",",
"pos",
")",
":",
"contextMenu",
"=",
"QtWidgets",
".",
"QMenu",
"(",
")",
"addInspectorActionsToMenu",
"(",
"contextMenu",
",",
"self",
".",
"execInspectorDialogAction",
",",
"self",
".",
"inspectorActionGroup",
")",
"... | Shows the context menu at position pos. | [
"Shows",
"the",
"context",
"menu",
"at",
"position",
"pos",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L365-L371 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.dockWidget | def dockWidget(self, widget, title, area):
""" Adds a widget as a docked widget.
Returns the added dockWidget
"""
assert widget.parent() is None, "Widget already has a parent"
dockWidget = QtWidgets.QDockWidget(title, parent=self)
dockWidget.setObjectName("dock_" + s... | python | def dockWidget(self, widget, title, area):
""" Adds a widget as a docked widget.
Returns the added dockWidget
"""
assert widget.parent() is None, "Widget already has a parent"
dockWidget = QtWidgets.QDockWidget(title, parent=self)
dockWidget.setObjectName("dock_" + s... | [
"def",
"dockWidget",
"(",
"self",
",",
"widget",
",",
"title",
",",
"area",
")",
":",
"assert",
"widget",
".",
"parent",
"(",
")",
"is",
"None",
",",
"\"Widget already has a parent\"",
"dockWidget",
"=",
"QtWidgets",
".",
"QDockWidget",
"(",
"title",
",",
... | Adds a widget as a docked widget.
Returns the added dockWidget | [
"Adds",
"a",
"widget",
"as",
"a",
"docked",
"widget",
".",
"Returns",
"the",
"added",
"dockWidget"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L374-L389 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.dockDetailPane | def dockDetailPane(self, detailPane, title=None, area=None):
""" Creates a dockWidget and add the detailPane with a default title.
By default the detail widget is added to the Qt.LeftDockWidgetArea.
"""
title = detailPane.classLabel() if title is None else title
area = Qt.Lef... | python | def dockDetailPane(self, detailPane, title=None, area=None):
""" Creates a dockWidget and add the detailPane with a default title.
By default the detail widget is added to the Qt.LeftDockWidgetArea.
"""
title = detailPane.classLabel() if title is None else title
area = Qt.Lef... | [
"def",
"dockDetailPane",
"(",
"self",
",",
"detailPane",
",",
"title",
"=",
"None",
",",
"area",
"=",
"None",
")",
":",
"title",
"=",
"detailPane",
".",
"classLabel",
"(",
")",
"if",
"title",
"is",
"None",
"else",
"title",
"area",
"=",
"Qt",
".",
"Le... | Creates a dockWidget and add the detailPane with a default title.
By default the detail widget is added to the Qt.LeftDockWidgetArea. | [
"Creates",
"a",
"dockWidget",
"and",
"add",
"the",
"detailPane",
"with",
"a",
"default",
"title",
".",
"By",
"default",
"the",
"detail",
"widget",
"is",
"added",
"to",
"the",
"Qt",
".",
"LeftDockWidgetArea",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L392-L404 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.updateWindowTitle | def updateWindowTitle(self):
""" Updates the window title frm the window number, inspector, etc
Also updates the Window Menu
"""
self.setWindowTitle("{} #{} | {}-{}".format(self.inspectorName, self.windowNumber,
PROJECT_NAME, self.a... | python | def updateWindowTitle(self):
""" Updates the window title frm the window number, inspector, etc
Also updates the Window Menu
"""
self.setWindowTitle("{} #{} | {}-{}".format(self.inspectorName, self.windowNumber,
PROJECT_NAME, self.a... | [
"def",
"updateWindowTitle",
"(",
"self",
")",
":",
"self",
".",
"setWindowTitle",
"(",
"\"{} #{} | {}-{}\"",
".",
"format",
"(",
"self",
".",
"inspectorName",
",",
"self",
".",
"windowNumber",
",",
"PROJECT_NAME",
",",
"self",
".",
"argosApplication",
".",
"pr... | Updates the window title frm the window number, inspector, etc
Also updates the Window Menu | [
"Updates",
"the",
"window",
"title",
"frm",
"the",
"window",
"number",
"inspector",
"etc",
"Also",
"updates",
"the",
"Window",
"Menu"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L407-L414 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.execInspectorDialog | def execInspectorDialog(self):
""" Opens the inspector dialog box to let the user change the current inspector.
"""
dialog = OpenInspectorDialog(self.argosApplication.inspectorRegistry, parent=self)
dialog.setCurrentInspectorRegItem(self.inspectorRegItem)
dialog.exec_()
i... | python | def execInspectorDialog(self):
""" Opens the inspector dialog box to let the user change the current inspector.
"""
dialog = OpenInspectorDialog(self.argosApplication.inspectorRegistry, parent=self)
dialog.setCurrentInspectorRegItem(self.inspectorRegItem)
dialog.exec_()
i... | [
"def",
"execInspectorDialog",
"(",
"self",
")",
":",
"dialog",
"=",
"OpenInspectorDialog",
"(",
"self",
".",
"argosApplication",
".",
"inspectorRegistry",
",",
"parent",
"=",
"self",
")",
"dialog",
".",
"setCurrentInspectorRegItem",
"(",
"self",
".",
"inspectorReg... | Opens the inspector dialog box to let the user change the current inspector. | [
"Opens",
"the",
"inspector",
"dialog",
"box",
"to",
"let",
"the",
"user",
"change",
"the",
"current",
"inspector",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L418-L427 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.getInspectorActionById | def getInspectorActionById(self, identifier):
""" Sets the inspector and draw the contents
Triggers the corresponding action so that it is checked in the menus.
"""
for action in self.inspectorActionGroup.actions():
if action.data() == identifier:
return a... | python | def getInspectorActionById(self, identifier):
""" Sets the inspector and draw the contents
Triggers the corresponding action so that it is checked in the menus.
"""
for action in self.inspectorActionGroup.actions():
if action.data() == identifier:
return a... | [
"def",
"getInspectorActionById",
"(",
"self",
",",
"identifier",
")",
":",
"for",
"action",
"in",
"self",
".",
"inspectorActionGroup",
".",
"actions",
"(",
")",
":",
"if",
"action",
".",
"data",
"(",
")",
"==",
"identifier",
":",
"return",
"action",
"raise... | Sets the inspector and draw the contents
Triggers the corresponding action so that it is checked in the menus. | [
"Sets",
"the",
"inspector",
"and",
"draw",
"the",
"contents",
"Triggers",
"the",
"corresponding",
"action",
"so",
"that",
"it",
"is",
"checked",
"in",
"the",
"menus",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L430-L437 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.setAndDrawInspectorById | def setAndDrawInspectorById(self, identifier):
""" Sets the inspector and draw the contents.
Does NOT trigger any actions, so the check marks in the menus are not updated. To
achieve this, the user must update the actions by hand (or call
getInspectorActionById(identifier).t... | python | def setAndDrawInspectorById(self, identifier):
""" Sets the inspector and draw the contents.
Does NOT trigger any actions, so the check marks in the menus are not updated. To
achieve this, the user must update the actions by hand (or call
getInspectorActionById(identifier).t... | [
"def",
"setAndDrawInspectorById",
"(",
"self",
",",
"identifier",
")",
":",
"self",
".",
"setInspectorById",
"(",
"identifier",
")",
"# Show dialog box if import was unsuccessful.",
"regItem",
"=",
"self",
".",
"inspectorRegItem",
"if",
"regItem",
"and",
"not",
"regIt... | Sets the inspector and draw the contents.
Does NOT trigger any actions, so the check marks in the menus are not updated. To
achieve this, the user must update the actions by hand (or call
getInspectorActionById(identifier).trigger() instead). | [
"Sets",
"the",
"inspector",
"and",
"draw",
"the",
"contents",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L440-L456 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.setInspectorById | def setInspectorById(self, identifier):
""" Sets the central inspector widget given a inspector ID.
If identifier is None, the inspector will be unset. Otherwise it will lookup the
inspector class in the registry. It will raise a KeyError if the ID is not found there.
It wi... | python | def setInspectorById(self, identifier):
""" Sets the central inspector widget given a inspector ID.
If identifier is None, the inspector will be unset. Otherwise it will lookup the
inspector class in the registry. It will raise a KeyError if the ID is not found there.
It wi... | [
"def",
"setInspectorById",
"(",
"self",
",",
"identifier",
")",
":",
"logger",
".",
"info",
"(",
"\"Setting inspector: {}\"",
".",
"format",
"(",
"identifier",
")",
")",
"# Use the identifier to find a registered inspector and set self.inspectorRegItem.",
"# Then create an in... | Sets the central inspector widget given a inspector ID.
If identifier is None, the inspector will be unset. Otherwise it will lookup the
inspector class in the registry. It will raise a KeyError if the ID is not found there.
It will do an import of the inspector code if it's loaded... | [
"Sets",
"the",
"central",
"inspector",
"widget",
"given",
"a",
"inspector",
"ID",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L459-L559 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow._updateNonDefaultsForInspector | def _updateNonDefaultsForInspector(self, inspectorRegItem, inspector):
""" Store the (non-default) config values for the current inspector in a local dictionary.
This dictionary is later used to store value for persistence.
This function must be called after the inspector was drawn beca... | python | def _updateNonDefaultsForInspector(self, inspectorRegItem, inspector):
""" Store the (non-default) config values for the current inspector in a local dictionary.
This dictionary is later used to store value for persistence.
This function must be called after the inspector was drawn beca... | [
"def",
"_updateNonDefaultsForInspector",
"(",
"self",
",",
"inspectorRegItem",
",",
"inspector",
")",
":",
"if",
"inspectorRegItem",
"and",
"inspector",
":",
"key",
"=",
"inspectorRegItem",
".",
"identifier",
"logger",
".",
"debug",
"(",
"\"_updateNonDefaultsForInspec... | Store the (non-default) config values for the current inspector in a local dictionary.
This dictionary is later used to store value for persistence.
This function must be called after the inspector was drawn because that may update
some derived config values (e.g. ranges) | [
"Store",
"the",
"(",
"non",
"-",
"default",
")",
"config",
"values",
"for",
"the",
"current",
"inspector",
"in",
"a",
"local",
"dictionary",
".",
"This",
"dictionary",
"is",
"later",
"used",
"to",
"store",
"value",
"for",
"persistence",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L562-L575 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.execPluginsDialog | def execPluginsDialog(self):
""" Shows the plugins dialog with the registered plugins
"""
pluginsDialog = PluginsDialog(parent=self,
inspectorRegistry=self.argosApplication.inspectorRegistry,
rtiRegistry=self.argosApplication.rtiReg... | python | def execPluginsDialog(self):
""" Shows the plugins dialog with the registered plugins
"""
pluginsDialog = PluginsDialog(parent=self,
inspectorRegistry=self.argosApplication.inspectorRegistry,
rtiRegistry=self.argosApplication.rtiReg... | [
"def",
"execPluginsDialog",
"(",
"self",
")",
":",
"pluginsDialog",
"=",
"PluginsDialog",
"(",
"parent",
"=",
"self",
",",
"inspectorRegistry",
"=",
"self",
".",
"argosApplication",
".",
"inspectorRegistry",
",",
"rtiRegistry",
"=",
"self",
".",
"argosApplication"... | Shows the plugins dialog with the registered plugins | [
"Shows",
"the",
"plugins",
"dialog",
"with",
"the",
"registered",
"plugins"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L579-L585 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.configContentsChanged | def configContentsChanged(self, configTreeItem):
""" Slot is called when an item has been changed by setData of the ConfigTreeModel.
Will draw the window contents.
"""
logger.debug("configContentsChanged: {}".format(configTreeItem))
self.drawInspectorContents(reason=UpdateRea... | python | def configContentsChanged(self, configTreeItem):
""" Slot is called when an item has been changed by setData of the ConfigTreeModel.
Will draw the window contents.
"""
logger.debug("configContentsChanged: {}".format(configTreeItem))
self.drawInspectorContents(reason=UpdateRea... | [
"def",
"configContentsChanged",
"(",
"self",
",",
"configTreeItem",
")",
":",
"logger",
".",
"debug",
"(",
"\"configContentsChanged: {}\"",
".",
"format",
"(",
"configTreeItem",
")",
")",
"self",
".",
"drawInspectorContents",
"(",
"reason",
"=",
"UpdateReason",
".... | Slot is called when an item has been changed by setData of the ConfigTreeModel.
Will draw the window contents. | [
"Slot",
"is",
"called",
"when",
"an",
"item",
"has",
"been",
"changed",
"by",
"setData",
"of",
"the",
"ConfigTreeModel",
".",
"Will",
"draw",
"the",
"window",
"contents",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L597-L603 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.drawInspectorContents | def drawInspectorContents(self, reason, origin=None):
""" Draws all contents of this window's inspector.
The reason and origin parameters are passed on to the inspector's updateContents method.
:param reason: string describing the reason for the redraw.
Should preferably... | python | def drawInspectorContents(self, reason, origin=None):
""" Draws all contents of this window's inspector.
The reason and origin parameters are passed on to the inspector's updateContents method.
:param reason: string describing the reason for the redraw.
Should preferably... | [
"def",
"drawInspectorContents",
"(",
"self",
",",
"reason",
",",
"origin",
"=",
"None",
")",
":",
"logger",
".",
"debug",
"(",
"\"\"",
")",
"logger",
".",
"debug",
"(",
"\"-------- Drawing inspector of window: {} --------\"",
".",
"format",
"(",
"self",
".",
"... | Draws all contents of this window's inspector.
The reason and origin parameters are passed on to the inspector's updateContents method.
:param reason: string describing the reason for the redraw.
Should preferably be one of the UpdateReason enumeration class, but new values may
... | [
"Draws",
"all",
"contents",
"of",
"this",
"window",
"s",
"inspector",
".",
"The",
"reason",
"and",
"origin",
"parameters",
"are",
"passed",
"on",
"to",
"the",
"inspector",
"s",
"updateContents",
"method",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L606-L621 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.openFiles | def openFiles(self, fileNames=None, rtiRegItem=None, caption=None, fileMode=None):
""" Lets the user select on or more files and opens it.
:param fileNames: If None an open-file dialog allows the user to select files,
otherwise the files are opened directly.
:param rtiRe... | python | def openFiles(self, fileNames=None, rtiRegItem=None, caption=None, fileMode=None):
""" Lets the user select on or more files and opens it.
:param fileNames: If None an open-file dialog allows the user to select files,
otherwise the files are opened directly.
:param rtiRe... | [
"def",
"openFiles",
"(",
"self",
",",
"fileNames",
"=",
"None",
",",
"rtiRegItem",
"=",
"None",
",",
"caption",
"=",
"None",
",",
"fileMode",
"=",
"None",
")",
":",
"if",
"fileNames",
"is",
"None",
":",
"dialog",
"=",
"QtWidgets",
".",
"QFileDialog",
"... | Lets the user select on or more files and opens it.
:param fileNames: If None an open-file dialog allows the user to select files,
otherwise the files are opened directly.
:param rtiRegItem: Open the files as this type of registered RTI. None=autodetect.
:param capti... | [
"Lets",
"the",
"user",
"select",
"on",
"or",
"more",
"files",
"and",
"opens",
"it",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L626-L663 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.trySelectRtiByPath | def trySelectRtiByPath(self, path):
""" Selects a repository tree item given a path, expanding nodes if along the way if needed.
Returns (item, index) if the path was selected successfully, else a warning is logged
and (None, None) is returned.
"""
try:
lastI... | python | def trySelectRtiByPath(self, path):
""" Selects a repository tree item given a path, expanding nodes if along the way if needed.
Returns (item, index) if the path was selected successfully, else a warning is logged
and (None, None) is returned.
"""
try:
lastI... | [
"def",
"trySelectRtiByPath",
"(",
"self",
",",
"path",
")",
":",
"try",
":",
"lastItem",
",",
"lastIndex",
"=",
"self",
".",
"repoWidget",
".",
"repoTreeView",
".",
"expandPath",
"(",
"path",
")",
"self",
".",
"repoWidget",
".",
"repoTreeView",
".",
"setCu... | Selects a repository tree item given a path, expanding nodes if along the way if needed.
Returns (item, index) if the path was selected successfully, else a warning is logged
and (None, None) is returned. | [
"Selects",
"a",
"repository",
"tree",
"item",
"given",
"a",
"path",
"expanding",
"nodes",
"if",
"along",
"the",
"way",
"if",
"needed",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L666-L680 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.readViewSettings | def readViewSettings(self, settings=None): # TODO: rename to readProfile?
""" Reads the persistent program settings
:param settings: optional QSettings object which can have a group already opened.
:returns: True if the header state was restored, otherwise returns False
"""
... | python | def readViewSettings(self, settings=None): # TODO: rename to readProfile?
""" Reads the persistent program settings
:param settings: optional QSettings object which can have a group already opened.
:returns: True if the header state was restored, otherwise returns False
"""
... | [
"def",
"readViewSettings",
"(",
"self",
",",
"settings",
"=",
"None",
")",
":",
"# TODO: rename to readProfile?",
"if",
"settings",
"is",
"None",
":",
"settings",
"=",
"QtCore",
".",
"QSettings",
"(",
")",
"logger",
".",
"debug",
"(",
"\"Reading settings from: {... | Reads the persistent program settings
:param settings: optional QSettings object which can have a group already opened.
:returns: True if the header state was restored, otherwise returns False | [
"Reads",
"the",
"persistent",
"program",
"settings"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L683-L713 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.saveProfile | def saveProfile(self, settings=None):
""" Writes the view settings to the persistent store
"""
self._updateNonDefaultsForInspector(self.inspectorRegItem, self.inspector)
if settings is None:
settings = QtCore.QSettings()
logger.debug("Writing settings to: {}".format(... | python | def saveProfile(self, settings=None):
""" Writes the view settings to the persistent store
"""
self._updateNonDefaultsForInspector(self.inspectorRegItem, self.inspector)
if settings is None:
settings = QtCore.QSettings()
logger.debug("Writing settings to: {}".format(... | [
"def",
"saveProfile",
"(",
"self",
",",
"settings",
"=",
"None",
")",
":",
"self",
".",
"_updateNonDefaultsForInspector",
"(",
"self",
".",
"inspectorRegItem",
",",
"self",
".",
"inspector",
")",
"if",
"settings",
"is",
"None",
":",
"settings",
"=",
"QtCore"... | Writes the view settings to the persistent store | [
"Writes",
"the",
"view",
"settings",
"to",
"the",
"persistent",
"store"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L716-L741 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.cloneWindow | def cloneWindow(self):
""" Opens a new window with the same inspector as the current window.
"""
# Save current window settings.
settings = QtCore.QSettings()
settings.beginGroup(self.argosApplication.windowGroupName(self.windowNumber))
try:
self.saveProfile(s... | python | def cloneWindow(self):
""" Opens a new window with the same inspector as the current window.
"""
# Save current window settings.
settings = QtCore.QSettings()
settings.beginGroup(self.argosApplication.windowGroupName(self.windowNumber))
try:
self.saveProfile(s... | [
"def",
"cloneWindow",
"(",
"self",
")",
":",
"# Save current window settings.",
"settings",
"=",
"QtCore",
".",
"QSettings",
"(",
")",
"settings",
".",
"beginGroup",
"(",
"self",
".",
"argosApplication",
".",
"windowGroupName",
"(",
"self",
".",
"windowNumber",
... | Opens a new window with the same inspector as the current window. | [
"Opens",
"a",
"new",
"window",
"with",
"the",
"same",
"inspector",
"as",
"the",
"current",
"window",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L745-L774 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.activateAndRaise | def activateAndRaise(self):
""" Activates and raises the window.
"""
logger.debug("Activate and raising window: {}".format(self.windowNumber))
self.activateWindow()
self.raise_() | python | def activateAndRaise(self):
""" Activates and raises the window.
"""
logger.debug("Activate and raising window: {}".format(self.windowNumber))
self.activateWindow()
self.raise_() | [
"def",
"activateAndRaise",
"(",
"self",
")",
":",
"logger",
".",
"debug",
"(",
"\"Activate and raising window: {}\"",
".",
"format",
"(",
"self",
".",
"windowNumber",
")",
")",
"self",
".",
"activateWindow",
"(",
")",
"self",
".",
"raise_",
"(",
")"
] | Activates and raises the window. | [
"Activates",
"and",
"raises",
"the",
"window",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L778-L783 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.event | def event(self, ev):
""" Detects the WindowActivate event. Pass all event through to the super class.
"""
if ev.type() == QtCore.QEvent.WindowActivate:
logger.debug("Window activated: {}".format(self.windowNumber))
self.activateWindowAction.setChecked(True)
retur... | python | def event(self, ev):
""" Detects the WindowActivate event. Pass all event through to the super class.
"""
if ev.type() == QtCore.QEvent.WindowActivate:
logger.debug("Window activated: {}".format(self.windowNumber))
self.activateWindowAction.setChecked(True)
retur... | [
"def",
"event",
"(",
"self",
",",
"ev",
")",
":",
"if",
"ev",
".",
"type",
"(",
")",
"==",
"QtCore",
".",
"QEvent",
".",
"WindowActivate",
":",
"logger",
".",
"debug",
"(",
"\"Window activated: {}\"",
".",
"format",
"(",
"self",
".",
"windowNumber",
")... | Detects the WindowActivate event. Pass all event through to the super class. | [
"Detects",
"the",
"WindowActivate",
"event",
".",
"Pass",
"all",
"event",
"through",
"to",
"the",
"super",
"class",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L786-L793 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.closeEvent | def closeEvent(self, event):
""" Called when closing this window.
"""
logger.debug("closeEvent")
self.argosApplication.saveSettingsIfNeeded()
self.finalize()
self.argosApplication.removeMainWindow(self)
event.accept()
logger.debug("closeEvent accepted") | python | def closeEvent(self, event):
""" Called when closing this window.
"""
logger.debug("closeEvent")
self.argosApplication.saveSettingsIfNeeded()
self.finalize()
self.argosApplication.removeMainWindow(self)
event.accept()
logger.debug("closeEvent accepted") | [
"def",
"closeEvent",
"(",
"self",
",",
"event",
")",
":",
"logger",
".",
"debug",
"(",
"\"closeEvent\"",
")",
"self",
".",
"argosApplication",
".",
"saveSettingsIfNeeded",
"(",
")",
"self",
".",
"finalize",
"(",
")",
"self",
".",
"argosApplication",
".",
"... | Called when closing this window. | [
"Called",
"when",
"closing",
"this",
"window",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L796-L804 |
titusjan/argos | argos/widgets/mainwindow.py | MainWindow.about | def about(self):
""" Shows the about message window.
"""
aboutDialog = AboutDialog(parent=self)
aboutDialog.show()
aboutDialog.addDependencyInfo() | python | def about(self):
""" Shows the about message window.
"""
aboutDialog = AboutDialog(parent=self)
aboutDialog.show()
aboutDialog.addDependencyInfo() | [
"def",
"about",
"(",
"self",
")",
":",
"aboutDialog",
"=",
"AboutDialog",
"(",
"parent",
"=",
"self",
")",
"aboutDialog",
".",
"show",
"(",
")",
"aboutDialog",
".",
"addDependencyInfo",
"(",
")"
] | Shows the about message window. | [
"Shows",
"the",
"about",
"message",
"window",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/mainwindow.py#L808-L813 |
titusjan/argos | argos/application.py | ArgosApplication.profileGroupName | def profileGroupName(self, profile=None):
""" Returns the name of the QSetting group for the profile.
Converts to lower case and removes whitespace, interpunction, etc.
Prepends _debug_ if the debugging flag is set
:param profile: profile name. If None the current profile is... | python | def profileGroupName(self, profile=None):
""" Returns the name of the QSetting group for the profile.
Converts to lower case and removes whitespace, interpunction, etc.
Prepends _debug_ if the debugging flag is set
:param profile: profile name. If None the current profile is... | [
"def",
"profileGroupName",
"(",
"self",
",",
"profile",
"=",
"None",
")",
":",
"profile",
"=",
"profile",
"if",
"profile",
"else",
"self",
".",
"profile",
"profGroupName",
"=",
"'_debug_'",
"if",
"DEBUGGING",
"else",
"''",
"profGroupName",
"+=",
"string_to_ide... | Returns the name of the QSetting group for the profile.
Converts to lower case and removes whitespace, interpunction, etc.
Prepends _debug_ if the debugging flag is set
:param profile: profile name. If None the current profile is used. | [
"Returns",
"the",
"name",
"of",
"the",
"QSetting",
"group",
"for",
"the",
"profile",
".",
"Converts",
"to",
"lower",
"case",
"and",
"removes",
"whitespace",
"interpunction",
"etc",
".",
"Prepends",
"_debug_",
"if",
"the",
"debugging",
"flag",
"is",
"set"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/application.py#L169-L179 |
titusjan/argos | argos/application.py | ArgosApplication.windowGroupName | def windowGroupName(self, windowNumber, profile=None):
""" Returns the name of the QSetting group for this window in the this profile.
:param windowNumber: int
:param profile: profile name. If None the current profile is used.
"""
return "{}/window-{:02d}".format(self.pr... | python | def windowGroupName(self, windowNumber, profile=None):
""" Returns the name of the QSetting group for this window in the this profile.
:param windowNumber: int
:param profile: profile name. If None the current profile is used.
"""
return "{}/window-{:02d}".format(self.pr... | [
"def",
"windowGroupName",
"(",
"self",
",",
"windowNumber",
",",
"profile",
"=",
"None",
")",
":",
"return",
"\"{}/window-{:02d}\"",
".",
"format",
"(",
"self",
".",
"profileGroupName",
"(",
"profile",
"=",
"profile",
")",
",",
"windowNumber",
")"
] | Returns the name of the QSetting group for this window in the this profile.
:param windowNumber: int
:param profile: profile name. If None the current profile is used. | [
"Returns",
"the",
"name",
"of",
"the",
"QSetting",
"group",
"for",
"this",
"window",
"in",
"the",
"this",
"profile",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/application.py#L182-L188 |
titusjan/argos | argos/application.py | ArgosApplication.deleteProfile | def deleteProfile(self, profile):
""" Removes a profile from the persistent settings
"""
profGroupName = self.profileGroupName(profile)
logger.debug("Resetting profile settings: {}".format(profGroupName))
settings = QtCore.QSettings()
settings.remove(profGroupName) | python | def deleteProfile(self, profile):
""" Removes a profile from the persistent settings
"""
profGroupName = self.profileGroupName(profile)
logger.debug("Resetting profile settings: {}".format(profGroupName))
settings = QtCore.QSettings()
settings.remove(profGroupName) | [
"def",
"deleteProfile",
"(",
"self",
",",
"profile",
")",
":",
"profGroupName",
"=",
"self",
".",
"profileGroupName",
"(",
"profile",
")",
"logger",
".",
"debug",
"(",
"\"Resetting profile settings: {}\"",
".",
"format",
"(",
"profGroupName",
")",
")",
"settings... | Removes a profile from the persistent settings | [
"Removes",
"a",
"profile",
"from",
"the",
"persistent",
"settings"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/application.py#L191-L197 |
titusjan/argos | argos/application.py | ArgosApplication.deleteAllProfiles | def deleteAllProfiles(self):
""" Returns a list of all profiles
"""
settings = QtCore.QSettings()
for profGroupName in QtCore.QSettings().childGroups():
settings.remove(profGroupName) | python | def deleteAllProfiles(self):
""" Returns a list of all profiles
"""
settings = QtCore.QSettings()
for profGroupName in QtCore.QSettings().childGroups():
settings.remove(profGroupName) | [
"def",
"deleteAllProfiles",
"(",
"self",
")",
":",
"settings",
"=",
"QtCore",
".",
"QSettings",
"(",
")",
"for",
"profGroupName",
"in",
"QtCore",
".",
"QSettings",
"(",
")",
".",
"childGroups",
"(",
")",
":",
"settings",
".",
"remove",
"(",
"profGroupName"... | Returns a list of all profiles | [
"Returns",
"a",
"list",
"of",
"all",
"profiles"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/application.py#L200-L205 |
titusjan/argos | argos/application.py | ArgosApplication.loadProfile | def loadProfile(self, profile, inspectorFullName=None):
""" Reads the persistent program settings for the current profile.
If inspectorFullName is given, a window with this inspector will be created if it wasn't
already created in the profile. All windows with this inspector will be rai... | python | def loadProfile(self, profile, inspectorFullName=None):
""" Reads the persistent program settings for the current profile.
If inspectorFullName is given, a window with this inspector will be created if it wasn't
already created in the profile. All windows with this inspector will be rai... | [
"def",
"loadProfile",
"(",
"self",
",",
"profile",
",",
"inspectorFullName",
"=",
"None",
")",
":",
"settings",
"=",
"QtCore",
".",
"QSettings",
"(",
")",
"logger",
".",
"info",
"(",
"\"Reading profile {!r} from: {}\"",
".",
"format",
"(",
"profile",
",",
"s... | Reads the persistent program settings for the current profile.
If inspectorFullName is given, a window with this inspector will be created if it wasn't
already created in the profile. All windows with this inspector will be raised. | [
"Reads",
"the",
"persistent",
"program",
"settings",
"for",
"the",
"current",
"profile",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/application.py#L208-L248 |
titusjan/argos | argos/application.py | ArgosApplication.saveProfile | def saveProfile(self):
""" Writes the current profile settings to the persistent store
"""
if not self.profile:
logger.warning("No profile defined (no settings saved)")
return
settings = QtCore.QSettings()
logger.debug("Writing settings to: {}".format(set... | python | def saveProfile(self):
""" Writes the current profile settings to the persistent store
"""
if not self.profile:
logger.warning("No profile defined (no settings saved)")
return
settings = QtCore.QSettings()
logger.debug("Writing settings to: {}".format(set... | [
"def",
"saveProfile",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"profile",
":",
"logger",
".",
"warning",
"(",
"\"No profile defined (no settings saved)\"",
")",
"return",
"settings",
"=",
"QtCore",
".",
"QSettings",
"(",
")",
"logger",
".",
"debug",
... | Writes the current profile settings to the persistent store | [
"Writes",
"the",
"current",
"profile",
"settings",
"to",
"the",
"persistent",
"store"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/application.py#L252-L271 |
titusjan/argos | argos/application.py | ArgosApplication.saveSettings | def saveSettings(self):
""" Saves the persistent settings. Only saves the profile.
"""
try:
self.saveProfile()
except Exception as ex:
# Continue, even if saving the settings fails.
logger.warn(ex)
if DEBUGGING:
raise
... | python | def saveSettings(self):
""" Saves the persistent settings. Only saves the profile.
"""
try:
self.saveProfile()
except Exception as ex:
# Continue, even if saving the settings fails.
logger.warn(ex)
if DEBUGGING:
raise
... | [
"def",
"saveSettings",
"(",
"self",
")",
":",
"try",
":",
"self",
".",
"saveProfile",
"(",
")",
"except",
"Exception",
"as",
"ex",
":",
"# Continue, even if saving the settings fails.",
"logger",
".",
"warn",
"(",
"ex",
")",
"if",
"DEBUGGING",
":",
"raise",
... | Saves the persistent settings. Only saves the profile. | [
"Saves",
"the",
"persistent",
"settings",
".",
"Only",
"saves",
"the",
"profile",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/application.py#L274-L285 |
titusjan/argos | argos/application.py | ArgosApplication.loadFiles | def loadFiles(self, fileNames, rtiClass=None):
""" Loads files into the repository as repo tree items of class rtiClass.
Auto-detects using the extensions when rtiClass is None
"""
for fileName in fileNames:
self.repo.loadFile(fileName, rtiClass=rtiClass) | python | def loadFiles(self, fileNames, rtiClass=None):
""" Loads files into the repository as repo tree items of class rtiClass.
Auto-detects using the extensions when rtiClass is None
"""
for fileName in fileNames:
self.repo.loadFile(fileName, rtiClass=rtiClass) | [
"def",
"loadFiles",
"(",
"self",
",",
"fileNames",
",",
"rtiClass",
"=",
"None",
")",
":",
"for",
"fileName",
"in",
"fileNames",
":",
"self",
".",
"repo",
".",
"loadFile",
"(",
"fileName",
",",
"rtiClass",
"=",
"rtiClass",
")"
] | Loads files into the repository as repo tree items of class rtiClass.
Auto-detects using the extensions when rtiClass is None | [
"Loads",
"files",
"into",
"the",
"repository",
"as",
"repo",
"tree",
"items",
"of",
"class",
"rtiClass",
".",
"Auto",
"-",
"detects",
"using",
"the",
"extensions",
"when",
"rtiClass",
"is",
"None"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/application.py#L296-L301 |
titusjan/argos | argos/application.py | ArgosApplication.addNewMainWindow | def addNewMainWindow(self, settings=None, inspectorFullName=None):
""" Creates and shows a new MainWindow.
If inspectorFullName is set, it will set the identifier from that name.
If the inspector identifier is not found in the registry, a KeyError is raised.
"""
mainWind... | python | def addNewMainWindow(self, settings=None, inspectorFullName=None):
""" Creates and shows a new MainWindow.
If inspectorFullName is set, it will set the identifier from that name.
If the inspector identifier is not found in the registry, a KeyError is raised.
"""
mainWind... | [
"def",
"addNewMainWindow",
"(",
"self",
",",
"settings",
"=",
"None",
",",
"inspectorFullName",
"=",
"None",
")",
":",
"mainWindow",
"=",
"MainWindow",
"(",
"self",
")",
"self",
".",
"mainWindows",
".",
"append",
"(",
"mainWindow",
")",
"self",
".",
"windo... | Creates and shows a new MainWindow.
If inspectorFullName is set, it will set the identifier from that name.
If the inspector identifier is not found in the registry, a KeyError is raised. | [
"Creates",
"and",
"shows",
"a",
"new",
"MainWindow",
"."
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/application.py#L314-L351 |
titusjan/argos | argos/application.py | ArgosApplication.removeMainWindow | def removeMainWindow(self, mainWindow):
""" Removes the mainWindow from the list of windows. Saves the settings
"""
logger.debug("removeMainWindow called")
self.windowActionGroup.removeAction(mainWindow.activateWindowAction)
self.repopulateAllWindowMenus()
self.mainWind... | python | def removeMainWindow(self, mainWindow):
""" Removes the mainWindow from the list of windows. Saves the settings
"""
logger.debug("removeMainWindow called")
self.windowActionGroup.removeAction(mainWindow.activateWindowAction)
self.repopulateAllWindowMenus()
self.mainWind... | [
"def",
"removeMainWindow",
"(",
"self",
",",
"mainWindow",
")",
":",
"logger",
".",
"debug",
"(",
"\"removeMainWindow called\"",
")",
"self",
".",
"windowActionGroup",
".",
"removeAction",
"(",
"mainWindow",
".",
"activateWindowAction",
")",
"self",
".",
"repopula... | Removes the mainWindow from the list of windows. Saves the settings | [
"Removes",
"the",
"mainWindow",
"from",
"the",
"list",
"of",
"windows",
".",
"Saves",
"the",
"settings"
] | train | https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/application.py#L354-L362 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.