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/application.py
ArgosApplication.raiseAllWindows
def raiseAllWindows(self): """ Raises all application windows. """ logger.debug("raiseAllWindows called") for mainWindow in self.mainWindows: logger.debug("Raising {}".format(mainWindow._instanceNr)) mainWindow.raise_()
python
def raiseAllWindows(self): """ Raises all application windows. """ logger.debug("raiseAllWindows called") for mainWindow in self.mainWindows: logger.debug("Raising {}".format(mainWindow._instanceNr)) mainWindow.raise_()
[ "def", "raiseAllWindows", "(", "self", ")", ":", "logger", ".", "debug", "(", "\"raiseAllWindows called\"", ")", "for", "mainWindow", "in", "self", ".", "mainWindows", ":", "logger", ".", "debug", "(", "\"Raising {}\"", ".", "format", "(", "mainWindow", ".", ...
Raises all application windows.
[ "Raises", "all", "application", "windows", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/application.py#L365-L371
titusjan/argos
argos/application.py
ArgosApplication.quit
def quit(self): """ Quits the application (called when the last window is closed) """ logger.debug("ArgosApplication.quit called") assert len(self.mainWindows) == 0, \ "Bug: still {} windows present at application quit!".format(len(self.mainWindows)) self.qApplication...
python
def quit(self): """ Quits the application (called when the last window is closed) """ logger.debug("ArgosApplication.quit called") assert len(self.mainWindows) == 0, \ "Bug: still {} windows present at application quit!".format(len(self.mainWindows)) self.qApplication...
[ "def", "quit", "(", "self", ")", ":", "logger", ".", "debug", "(", "\"ArgosApplication.quit called\"", ")", "assert", "len", "(", "self", ".", "mainWindows", ")", "==", "0", ",", "\"Bug: still {} windows present at application quit!\"", ".", "format", "(", "len", ...
Quits the application (called when the last window is closed)
[ "Quits", "the", "application", "(", "called", "when", "the", "last", "window", "is", "closed", ")" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/application.py#L382-L388
titusjan/argos
argos/application.py
ArgosApplication.execute
def execute(self): """ Executes all main windows by starting the Qt main application """ logger.info("Starting Argos event loop...") exitCode = self.qApplication.exec_() logger.info("Argos event loop finished with exit code: {}".format(exitCode)) return exitCode
python
def execute(self): """ Executes all main windows by starting the Qt main application """ logger.info("Starting Argos event loop...") exitCode = self.qApplication.exec_() logger.info("Argos event loop finished with exit code: {}".format(exitCode)) return exitCode
[ "def", "execute", "(", "self", ")", ":", "logger", ".", "info", "(", "\"Starting Argos event loop...\"", ")", "exitCode", "=", "self", ".", "qApplication", ".", "exec_", "(", ")", "logger", ".", "info", "(", "\"Argos event loop finished with exit code: {}\"", ".",...
Executes all main windows by starting the Qt main application
[ "Executes", "all", "main", "windows", "by", "starting", "the", "Qt", "main", "application" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/application.py#L391-L397
titusjan/argos
argos/repo/rtiplugins/pillowio.py
PillowFileRti._openResources
def _openResources(self): """ Uses open the underlying file """ with Image.open(self._fileName) as image: self._array = np.asarray(image) self._bands = image.getbands() # Fill attributes. For now assume that the info item are not overridden by # ...
python
def _openResources(self): """ Uses open the underlying file """ with Image.open(self._fileName) as image: self._array = np.asarray(image) self._bands = image.getbands() # Fill attributes. For now assume that the info item are not overridden by # ...
[ "def", "_openResources", "(", "self", ")", ":", "with", "Image", ".", "open", "(", "self", ".", "_fileName", ")", "as", "image", ":", "self", ".", "_array", "=", "np", ".", "asarray", "(", "image", ")", "self", ".", "_bands", "=", "image", ".", "ge...
Uses open the underlying file
[ "Uses", "open", "the", "underlying", "file" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/pillowio.py#L84-L98
titusjan/argos
argos/repo/rtiplugins/pillowio.py
PillowFileRti._fetchAllChildren
def _fetchAllChildren(self): """ Adds the bands as separate fields so they can be inspected easily. """ bands = self._bands if len(bands) != self._array.shape[-1]: logger.warn("No bands added, bands != last_dim_lenght ({} !: {})" .format(len(bands), se...
python
def _fetchAllChildren(self): """ Adds the bands as separate fields so they can be inspected easily. """ bands = self._bands if len(bands) != self._array.shape[-1]: logger.warn("No bands added, bands != last_dim_lenght ({} !: {})" .format(len(bands), se...
[ "def", "_fetchAllChildren", "(", "self", ")", ":", "bands", "=", "self", ".", "_bands", "if", "len", "(", "bands", ")", "!=", "self", ".", "_array", ".", "shape", "[", "-", "1", "]", ":", "logger", ".", "warn", "(", "\"No bands added, bands != last_dim_l...
Adds the bands as separate fields so they can be inspected easily.
[ "Adds", "the", "bands", "as", "separate", "fields", "so", "they", "can", "be", "inspected", "easily", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/pillowio.py#L109-L124
titusjan/argos
argos/repo/rtiplugins/pillowio.py
PillowFileRti.dimensionNames
def dimensionNames(self): """ Returns ['Y', 'X', 'Band']. The underlying array is expected to be 3-dimensional. If this is not the case we fall back on the default dimension names ['Dim-0', 'Dim-1', ...] """ if self._array is None: return [] if self._...
python
def dimensionNames(self): """ Returns ['Y', 'X', 'Band']. The underlying array is expected to be 3-dimensional. If this is not the case we fall back on the default dimension names ['Dim-0', 'Dim-1', ...] """ if self._array is None: return [] if self._...
[ "def", "dimensionNames", "(", "self", ")", ":", "if", "self", ".", "_array", "is", "None", ":", "return", "[", "]", "if", "self", ".", "_array", ".", "ndim", "==", "2", ":", "return", "[", "'Y'", ",", "'X'", "]", "elif", "self", ".", "_array", "....
Returns ['Y', 'X', 'Band']. The underlying array is expected to be 3-dimensional. If this is not the case we fall back on the default dimension names ['Dim-0', 'Dim-1', ...]
[ "Returns", "[", "Y", "X", "Band", "]", ".", "The", "underlying", "array", "is", "expected", "to", "be", "3", "-", "dimensional", ".", "If", "this", "is", "not", "the", "case", "we", "fall", "back", "on", "the", "default", "dimension", "names", "[", "...
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/rtiplugins/pillowio.py#L135-L153
titusjan/argos
argos/config/untypedcti.py
UntypedCti.createEditor
def createEditor(self, delegate, parent, option): """ Creates an UntypedCtiEditor. For the parameters see the AbstractCti constructor documentation. Note: since the item is not editable this will never be called. """ return UntypedCtiEditor(self, delegate, parent=parent)
python
def createEditor(self, delegate, parent, option): """ Creates an UntypedCtiEditor. For the parameters see the AbstractCti constructor documentation. Note: since the item is not editable this will never be called. """ return UntypedCtiEditor(self, delegate, parent=parent)
[ "def", "createEditor", "(", "self", ",", "delegate", ",", "parent", ",", "option", ")", ":", "return", "UntypedCtiEditor", "(", "self", ",", "delegate", ",", "parent", "=", "parent", ")" ]
Creates an UntypedCtiEditor. For the parameters see the AbstractCti constructor documentation. Note: since the item is not editable this will never be called.
[ "Creates", "an", "UntypedCtiEditor", ".", "For", "the", "parameters", "see", "the", "AbstractCti", "constructor", "documentation", ".", "Note", ":", "since", "the", "item", "is", "not", "editable", "this", "will", "never", "be", "called", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/untypedcti.py#L48-L53
titusjan/argos
argos/qt/labeledwidget.py
labelTextWidth
def labelTextWidth(label): """ Returns the width of label text of the label in pixels. IMPORTANT: does not work when the labels are styled using style sheets. Unfortunately it is possible to retrieve the settings (e.g. padding) that were set by the style sheet without parsing the style she...
python
def labelTextWidth(label): """ Returns the width of label text of the label in pixels. IMPORTANT: does not work when the labels are styled using style sheets. Unfortunately it is possible to retrieve the settings (e.g. padding) that were set by the style sheet without parsing the style she...
[ "def", "labelTextWidth", "(", "label", ")", ":", "# The Qt source shows that fontMetrics().size calls fontMetrics().boundingRect with", "# the TextLongestVariant included in the flags. TextLongestVariant is an internal flag", "# which is used to force selecting the longest string in a multi-length s...
Returns the width of label text of the label in pixels. IMPORTANT: does not work when the labels are styled using style sheets. Unfortunately it is possible to retrieve the settings (e.g. padding) that were set by the style sheet without parsing the style sheet as text.
[ "Returns", "the", "width", "of", "label", "text", "of", "the", "label", "in", "pixels", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/labeledwidget.py#L66-L108
titusjan/argos
argos/qt/labeledwidget.py
harmonizeLabelsTextWidth
def harmonizeLabelsTextWidth(labels, width=None): """ Sets the the maximum width of the labels If width is None, the maximum width is calculated using labelsMaxTextWidth() """ if width is None: width = labelsMaxTextWidth(labels) for label in labels: #label.setFixedWidth(width) ...
python
def harmonizeLabelsTextWidth(labels, width=None): """ Sets the the maximum width of the labels If width is None, the maximum width is calculated using labelsMaxTextWidth() """ if width is None: width = labelsMaxTextWidth(labels) for label in labels: #label.setFixedWidth(width) ...
[ "def", "harmonizeLabelsTextWidth", "(", "labels", ",", "width", "=", "None", ")", ":", "if", "width", "is", "None", ":", "width", "=", "labelsMaxTextWidth", "(", "labels", ")", "for", "label", "in", "labels", ":", "#label.setFixedWidth(width)", "label", ".", ...
Sets the the maximum width of the labels If width is None, the maximum width is calculated using labelsMaxTextWidth()
[ "Sets", "the", "the", "maximum", "width", "of", "the", "labels", "If", "width", "is", "None", "the", "maximum", "width", "is", "calculated", "using", "labelsMaxTextWidth", "()" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/labeledwidget.py#L118-L127
titusjan/argos
argos/config/abstractcti.py
jsonAsCti
def jsonAsCti(dct): """ Config tree item JSON decoding function. Returns a CTI given a dictionary of attributes. The full class name of desired CTI class should be in dct['_class_'']. """ if '_class_'in dct: full_class_name = dct['_class_'] # TODO: how to handle the full_class_name? ...
python
def jsonAsCti(dct): """ Config tree item JSON decoding function. Returns a CTI given a dictionary of attributes. The full class name of desired CTI class should be in dct['_class_'']. """ if '_class_'in dct: full_class_name = dct['_class_'] # TODO: how to handle the full_class_name? ...
[ "def", "jsonAsCti", "(", "dct", ")", ":", "if", "'_class_'", "in", "dct", ":", "full_class_name", "=", "dct", "[", "'_class_'", "]", "# TODO: how to handle the full_class_name?", "cls", "=", "import_symbol", "(", "full_class_name", ")", "return", "cls", ".", "cr...
Config tree item JSON decoding function. Returns a CTI given a dictionary of attributes. The full class name of desired CTI class should be in dct['_class_''].
[ "Config", "tree", "item", "JSON", "decoding", "function", ".", "Returns", "a", "CTI", "given", "a", "dictionary", "of", "attributes", ".", "The", "full", "class", "name", "of", "desired", "CTI", "class", "should", "be", "in", "dct", "[", "_class_", "]", ...
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/abstractcti.py#L64-L73
titusjan/argos
argos/config/abstractcti.py
AbstractCti.enableBranch
def enableBranch(self, enabled): """ Sets the enabled member to True or False for a node and all it's children """ self.enabled = enabled for child in self.childItems: child.enableBranch(enabled)
python
def enableBranch(self, enabled): """ Sets the enabled member to True or False for a node and all it's children """ self.enabled = enabled for child in self.childItems: child.enableBranch(enabled)
[ "def", "enableBranch", "(", "self", ",", "enabled", ")", ":", "self", ".", "enabled", "=", "enabled", "for", "child", "in", "self", ".", "childItems", ":", "child", ".", "enableBranch", "(", "enabled", ")" ]
Sets the enabled member to True or False for a node and all it's children
[ "Sets", "the", "enabled", "member", "to", "True", "or", "False", "for", "a", "node", "and", "all", "it", "s", "children" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/abstractcti.py#L291-L296
titusjan/argos
argos/config/abstractcti.py
AbstractCti.resetToDefault
def resetToDefault(self, resetChildren=True): """ Resets the data to the default data. By default the children will be reset as well """ self.data = self.defaultData if resetChildren: for child in self.childItems: child.resetToDefault(resetChildren=True)
python
def resetToDefault(self, resetChildren=True): """ Resets the data to the default data. By default the children will be reset as well """ self.data = self.defaultData if resetChildren: for child in self.childItems: child.resetToDefault(resetChildren=True)
[ "def", "resetToDefault", "(", "self", ",", "resetChildren", "=", "True", ")", ":", "self", ".", "data", "=", "self", ".", "defaultData", "if", "resetChildren", ":", "for", "child", "in", "self", ".", "childItems", ":", "child", ".", "resetToDefault", "(", ...
Resets the data to the default data. By default the children will be reset as well
[ "Resets", "the", "data", "to", "the", "default", "data", ".", "By", "default", "the", "children", "will", "be", "reset", "as", "well" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/abstractcti.py#L299-L305
titusjan/argos
argos/config/abstractcti.py
AbstractCti.refreshFromTarget
def refreshFromTarget(self, level=0): """ Refreshes the configuration tree from the target it monitors (if present). Recursively call _refreshNodeFromTarget for itself and all children. Subclasses should typically override _refreshNodeFromTarget instead of this function. Duri...
python
def refreshFromTarget(self, level=0): """ Refreshes the configuration tree from the target it monitors (if present). Recursively call _refreshNodeFromTarget for itself and all children. Subclasses should typically override _refreshNodeFromTarget instead of this function. Duri...
[ "def", "refreshFromTarget", "(", "self", ",", "level", "=", "0", ")", ":", "if", "self", ".", "getRefreshBlocked", "(", ")", ":", "logger", ".", "debug", "(", "\"_refreshNodeFromTarget blocked\"", ")", "return", "if", "False", "and", "level", "==", "0", ":...
Refreshes the configuration tree from the target it monitors (if present). Recursively call _refreshNodeFromTarget for itself and all children. Subclasses should typically override _refreshNodeFromTarget instead of this function. During updateTarget's execution refreshFromTarget is b...
[ "Refreshes", "the", "configuration", "tree", "from", "the", "target", "it", "monitors", "(", "if", "present", ")", ".", "Recursively", "call", "_refreshNodeFromTarget", "for", "itself", "and", "all", "children", ".", "Subclasses", "should", "typically", "override"...
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/abstractcti.py#L316-L331
titusjan/argos
argos/config/abstractcti.py
AbstractCti.updateTarget
def updateTarget(self, level=0): """ Applies the configuration to the target it monitors (if present). Recursively call _updateTargetFromNode for itself and all children. Subclasses should typically override _updateTargetFromNode instead of this function. :param level: the l...
python
def updateTarget(self, level=0): """ Applies the configuration to the target it monitors (if present). Recursively call _updateTargetFromNode for itself and all children. Subclasses should typically override _updateTargetFromNode instead of this function. :param level: the l...
[ "def", "updateTarget", "(", "self", ",", "level", "=", "0", ")", ":", "#if level == 0:", "# logger.debug(\"updateTarget: {}\".format(self.nodePath))", "self", ".", "_updateTargetFromNode", "(", ")", "for", "child", "in", "self", ".", "childItems", ":", "child", "...
Applies the configuration to the target it monitors (if present). Recursively call _updateTargetFromNode for itself and all children. Subclasses should typically override _updateTargetFromNode instead of this function. :param level: the level of recursion.
[ "Applies", "the", "configuration", "to", "the", "target", "it", "monitors", "(", "if", "present", ")", ".", "Recursively", "call", "_updateTargetFromNode", "for", "itself", "and", "all", "children", ".", "Subclasses", "should", "typically", "override", "_updateTar...
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/abstractcti.py#L343-L355
titusjan/argos
argos/config/abstractcti.py
AbstractCti._nodeGetNonDefaultsDict
def _nodeGetNonDefaultsDict(self): """ Retrieves this nodes` values as a dictionary to be used for persistence. A dictionary with the data value will be returned if the data is not equal to the defaultData, the node is enabled and the node is editable. Otherwise and empty dic...
python
def _nodeGetNonDefaultsDict(self): """ Retrieves this nodes` values as a dictionary to be used for persistence. A dictionary with the data value will be returned if the data is not equal to the defaultData, the node is enabled and the node is editable. Otherwise and empty dic...
[ "def", "_nodeGetNonDefaultsDict", "(", "self", ")", ":", "dct", "=", "{", "}", "isEditable", "=", "bool", "(", "int", "(", "self", ".", "valueColumnItemFlags", ")", "and", "Qt", ".", "ItemIsEditable", ")", "if", "(", "self", ".", "data", "!=", "self", ...
Retrieves this nodes` values as a dictionary to be used for persistence. A dictionary with the data value will be returned if the data is not equal to the defaultData, the node is enabled and the node is editable. Otherwise and empty dictionary is returned. Non-recursive...
[ "Retrieves", "this", "nodes", "values", "as", "a", "dictionary", "to", "be", "used", "for", "persistence", ".", "A", "dictionary", "with", "the", "data", "value", "will", "be", "returned", "if", "the", "data", "is", "not", "equal", "to", "the", "defaultDat...
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/abstractcti.py#L400-L412
titusjan/argos
argos/config/abstractcti.py
AbstractCti.getNonDefaultsDict
def getNonDefaultsDict(self): """ Recursively retrieves values as a dictionary to be used for persistence. Does not save defaultData and other properties, only stores values if they differ from the defaultData. If the CTI and none of its children differ from their default, a ...
python
def getNonDefaultsDict(self): """ Recursively retrieves values as a dictionary to be used for persistence. Does not save defaultData and other properties, only stores values if they differ from the defaultData. If the CTI and none of its children differ from their default, a ...
[ "def", "getNonDefaultsDict", "(", "self", ")", ":", "dct", "=", "self", ".", "_nodeGetNonDefaultsDict", "(", ")", "childList", "=", "[", "]", "for", "childCti", "in", "self", ".", "childItems", ":", "childDct", "=", "childCti", ".", "getNonDefaultsDict", "("...
Recursively retrieves values as a dictionary to be used for persistence. Does not save defaultData and other properties, only stores values if they differ from the defaultData. If the CTI and none of its children differ from their default, a completely empty dictionary is returned. T...
[ "Recursively", "retrieves", "values", "as", "a", "dictionary", "to", "be", "used", "for", "persistence", ".", "Does", "not", "save", "defaultData", "and", "other", "properties", "only", "stores", "values", "if", "they", "differ", "from", "the", "defaultData", ...
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/abstractcti.py#L417-L439
titusjan/argos
argos/config/abstractcti.py
AbstractCti.setValuesFromDict
def setValuesFromDict(self, dct): """ Recursively sets values from a dictionary created by getNonDefaultsDict. Does not raise exceptions (logs warnings instead) so that we can remove/rename node names in future Argos versions (or remove them) without breaking the application. ...
python
def setValuesFromDict(self, dct): """ Recursively sets values from a dictionary created by getNonDefaultsDict. Does not raise exceptions (logs warnings instead) so that we can remove/rename node names in future Argos versions (or remove them) without breaking the application. ...
[ "def", "setValuesFromDict", "(", "self", ",", "dct", ")", ":", "if", "'nodeName'", "not", "in", "dct", ":", "return", "nodeName", "=", "dct", "[", "'nodeName'", "]", "if", "nodeName", "!=", "self", ".", "nodeName", ":", "msg", "=", "\"nodeName mismatch: ex...
Recursively sets values from a dictionary created by getNonDefaultsDict. Does not raise exceptions (logs warnings instead) so that we can remove/rename node names in future Argos versions (or remove them) without breaking the application. Typically descendants should override _node...
[ "Recursively", "sets", "values", "from", "a", "dictionary", "created", "by", "getNonDefaultsDict", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/abstractcti.py#L449-L478
titusjan/argos
argos/config/abstractcti.py
AbstractCtiEditor.finalize
def finalize(self): """ Called at clean up, when the editor is closed. Can be used to disconnect signals. This is often called after the client (e.g. the inspector) is updated. If you want to take action before the update, override prepareCommit instead. Be sure to call the f...
python
def finalize(self): """ Called at clean up, when the editor is closed. Can be used to disconnect signals. This is often called after the client (e.g. the inspector) is updated. If you want to take action before the update, override prepareCommit instead. Be sure to call the f...
[ "def", "finalize", "(", "self", ")", ":", "for", "subEditor", "in", "self", ".", "_subEditors", ":", "self", ".", "removeSubEditor", "(", "subEditor", ")", "self", ".", "cti", ".", "model", ".", "sigItemChanged", ".", "disconnect", "(", "self", ".", "mod...
Called at clean up, when the editor is closed. Can be used to disconnect signals. This is often called after the client (e.g. the inspector) is updated. If you want to take action before the update, override prepareCommit instead. Be sure to call the finalize of the super class if yo...
[ "Called", "at", "clean", "up", "when", "the", "editor", "is", "closed", ".", "Can", "be", "used", "to", "disconnect", "signals", ".", "This", "is", "often", "called", "after", "the", "client", "(", "e", ".", "g", ".", "the", "inspector", ")", "is", "...
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/abstractcti.py#L567-L579
titusjan/argos
argos/config/abstractcti.py
AbstractCtiEditor.addSubEditor
def addSubEditor(self, subEditor, isFocusProxy=False): """ Adds a sub editor to the layout (at the right but before the reset button) Will add the necessary event filter to handle tabs and sets the strong focus so that events will not propagate to the tree view. If isFocusPr...
python
def addSubEditor(self, subEditor, isFocusProxy=False): """ Adds a sub editor to the layout (at the right but before the reset button) Will add the necessary event filter to handle tabs and sets the strong focus so that events will not propagate to the tree view. If isFocusPr...
[ "def", "addSubEditor", "(", "self", ",", "subEditor", ",", "isFocusProxy", "=", "False", ")", ":", "self", ".", "hBoxLayout", ".", "insertWidget", "(", "len", "(", "self", ".", "_subEditors", ")", ",", "subEditor", ")", "self", ".", "_subEditors", ".", "...
Adds a sub editor to the layout (at the right but before the reset button) Will add the necessary event filter to handle tabs and sets the strong focus so that events will not propagate to the tree view. If isFocusProxy is True the sub editor will be the focus proxy of the CTI.
[ "Adds", "a", "sub", "editor", "to", "the", "layout", "(", "at", "the", "right", "but", "before", "the", "reset", "button", ")", "Will", "add", "the", "necessary", "event", "filter", "to", "handle", "tabs", "and", "sets", "the", "strong", "focus", "so", ...
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/abstractcti.py#L590-L606
titusjan/argos
argos/config/abstractcti.py
AbstractCtiEditor.removeSubEditor
def removeSubEditor(self, subEditor): """ Removes the subEditor from the layout and removes the event filter. """ if subEditor is self.focusProxy(): self.setFocusProxy(None) subEditor.removeEventFilter(self) self._subEditors.remove(subEditor) self.hBoxLayout....
python
def removeSubEditor(self, subEditor): """ Removes the subEditor from the layout and removes the event filter. """ if subEditor is self.focusProxy(): self.setFocusProxy(None) subEditor.removeEventFilter(self) self._subEditors.remove(subEditor) self.hBoxLayout....
[ "def", "removeSubEditor", "(", "self", ",", "subEditor", ")", ":", "if", "subEditor", "is", "self", ".", "focusProxy", "(", ")", ":", "self", ".", "setFocusProxy", "(", "None", ")", "subEditor", ".", "removeEventFilter", "(", "self", ")", "self", ".", "_...
Removes the subEditor from the layout and removes the event filter.
[ "Removes", "the", "subEditor", "from", "the", "layout", "and", "removes", "the", "event", "filter", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/abstractcti.py#L609-L617
titusjan/argos
argos/config/abstractcti.py
AbstractCtiEditor.eventFilter
def eventFilter(self, watchedObject, event): """ Calls commitAndClose when the tab and back-tab are pressed. This is necessary because, normally the event filter of QStyledItemDelegate does this for us. However, that event filter works on this object, not on the sub editor. """ ...
python
def eventFilter(self, watchedObject, event): """ Calls commitAndClose when the tab and back-tab are pressed. This is necessary because, normally the event filter of QStyledItemDelegate does this for us. However, that event filter works on this object, not on the sub editor. """ ...
[ "def", "eventFilter", "(", "self", ",", "watchedObject", ",", "event", ")", ":", "if", "event", ".", "type", "(", ")", "==", "QtCore", ".", "QEvent", ".", "KeyPress", ":", "key", "=", "event", ".", "key", "(", ")", "if", "key", "in", "(", "Qt", "...
Calls commitAndClose when the tab and back-tab are pressed. This is necessary because, normally the event filter of QStyledItemDelegate does this for us. However, that event filter works on this object, not on the sub editor.
[ "Calls", "commitAndClose", "when", "the", "tab", "and", "back", "-", "tab", "are", "pressed", ".", "This", "is", "necessary", "because", "normally", "the", "event", "filter", "of", "QStyledItemDelegate", "does", "this", "for", "us", ".", "However", "that", "...
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/abstractcti.py#L634-L647
titusjan/argos
argos/config/abstractcti.py
AbstractCtiEditor.modelItemChanged
def modelItemChanged(self, cti): """ Called when the an Config Tree Item (CTI) in the model has changed. If the CTI is a different one than the CTI that belongs to this editor, the editor is closed. This can happen if the user has checked a checkbox. Qt does not close other ...
python
def modelItemChanged(self, cti): """ Called when the an Config Tree Item (CTI) in the model has changed. If the CTI is a different one than the CTI that belongs to this editor, the editor is closed. This can happen if the user has checked a checkbox. Qt does not close other ...
[ "def", "modelItemChanged", "(", "self", ",", "cti", ")", ":", "if", "cti", "is", "not", "self", ".", "cti", ":", "logger", ".", "debug", "(", "\"Another config tree item has changed: {}. Closing editor for {}\"", ".", "format", "(", "cti", ",", "self", ".", "c...
Called when the an Config Tree Item (CTI) in the model has changed. If the CTI is a different one than the CTI that belongs to this editor, the editor is closed. This can happen if the user has checked a checkbox. Qt does not close other editors in the view in that case, so this is ...
[ "Called", "when", "the", "an", "Config", "Tree", "Item", "(", "CTI", ")", "in", "the", "model", "has", "changed", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/abstractcti.py#L651-L666
titusjan/argos
argos/config/abstractcti.py
AbstractCtiEditor.commitAndClose
def commitAndClose(self): """ Commits the data of the sub editor and instructs the delegate to close this ctiEditor. The delegate will emit the closeEditor signal which is connected to the closeEditor method of the ConfigTreeView class. This, in turn will, call the finalize method of ...
python
def commitAndClose(self): """ Commits the data of the sub editor and instructs the delegate to close this ctiEditor. The delegate will emit the closeEditor signal which is connected to the closeEditor method of the ConfigTreeView class. This, in turn will, call the finalize method of ...
[ "def", "commitAndClose", "(", "self", ")", ":", "if", "self", ".", "delegate", ":", "self", ".", "delegate", ".", "commitData", ".", "emit", "(", "self", ")", "self", ".", "delegate", ".", "closeEditor", ".", "emit", "(", "self", ",", "QtWidgets", ".",...
Commits the data of the sub editor and instructs the delegate to close this ctiEditor. The delegate will emit the closeEditor signal which is connected to the closeEditor method of the ConfigTreeView class. This, in turn will, call the finalize method of this object so that signals ...
[ "Commits", "the", "data", "of", "the", "sub", "editor", "and", "instructs", "the", "delegate", "to", "close", "this", "ctiEditor", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/abstractcti.py#L670-L686
titusjan/argos
argos/config/abstractcti.py
AbstractCtiEditor.resetEditorValue
def resetEditorValue(self, checked=False): """ Resets the editor to the default value. Also resets the children. """ # Block all signals to prevent duplicate inspector updates. # No need to restore, the editors will be deleted after the reset. for subEditor in self._subEditors: ...
python
def resetEditorValue(self, checked=False): """ Resets the editor to the default value. Also resets the children. """ # Block all signals to prevent duplicate inspector updates. # No need to restore, the editors will be deleted after the reset. for subEditor in self._subEditors: ...
[ "def", "resetEditorValue", "(", "self", ",", "checked", "=", "False", ")", ":", "# Block all signals to prevent duplicate inspector updates.", "# No need to restore, the editors will be deleted after the reset.", "for", "subEditor", "in", "self", ".", "_subEditors", ":", "subEd...
Resets the editor to the default value. Also resets the children.
[ "Resets", "the", "editor", "to", "the", "default", "value", ".", "Also", "resets", "the", "children", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/abstractcti.py#L690-L701
titusjan/argos
argos/config/abstractcti.py
AbstractCtiEditor.paintEvent
def paintEvent(self, event): """ Reimplementation of paintEvent to allow for style sheets See: http://qt-project.org/wiki/How_to_Change_the_Background_Color_of_QWidget """ opt = QtWidgets.QStyleOption() opt.initFrom(self) painter = QtGui.QPainter(self) self.st...
python
def paintEvent(self, event): """ Reimplementation of paintEvent to allow for style sheets See: http://qt-project.org/wiki/How_to_Change_the_Background_Color_of_QWidget """ opt = QtWidgets.QStyleOption() opt.initFrom(self) painter = QtGui.QPainter(self) self.st...
[ "def", "paintEvent", "(", "self", ",", "event", ")", ":", "opt", "=", "QtWidgets", ".", "QStyleOption", "(", ")", "opt", ".", "initFrom", "(", "self", ")", "painter", "=", "QtGui", ".", "QPainter", "(", "self", ")", "self", ".", "style", "(", ")", ...
Reimplementation of paintEvent to allow for style sheets See: http://qt-project.org/wiki/How_to_Change_the_Background_Color_of_QWidget
[ "Reimplementation", "of", "paintEvent", "to", "allow", "for", "style", "sheets", "See", ":", "http", ":", "//", "qt", "-", "project", ".", "org", "/", "wiki", "/", "How_to_Change_the_Background_Color_of_QWidget" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/abstractcti.py#L704-L712
titusjan/argos
argos/widgets/display.py
MessageDisplay.setError
def setError(self, msg=None, title=None): """ Shows and error message """ if msg is not None: self.messageLabel.setText(msg) if title is not None: self.titleLabel.setText(title)
python
def setError(self, msg=None, title=None): """ Shows and error message """ if msg is not None: self.messageLabel.setText(msg) if title is not None: self.titleLabel.setText(title)
[ "def", "setError", "(", "self", ",", "msg", "=", "None", ",", "title", "=", "None", ")", ":", "if", "msg", "is", "not", "None", ":", "self", ".", "messageLabel", ".", "setText", "(", "msg", ")", "if", "title", "is", "not", "None", ":", "self", "....
Shows and error message
[ "Shows", "and", "error", "message" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/widgets/display.py#L66-L73
titusjan/argos
argos/inspector/qtplugins/table.py
resizeAllSections
def resizeAllSections(header, sectionSize): """ Sets all sections (columns or rows) of a header to the same section size. :param header: a QHeaderView :param sectionSize: the new size of the header section in pixels """ for idx in range(header.length()): header.resizeSection(idx, se...
python
def resizeAllSections(header, sectionSize): """ Sets all sections (columns or rows) of a header to the same section size. :param header: a QHeaderView :param sectionSize: the new size of the header section in pixels """ for idx in range(header.length()): header.resizeSection(idx, se...
[ "def", "resizeAllSections", "(", "header", ",", "sectionSize", ")", ":", "for", "idx", "in", "range", "(", "header", ".", "length", "(", ")", ")", ":", "header", ".", "resizeSection", "(", "idx", ",", "sectionSize", ")" ]
Sets all sections (columns or rows) of a header to the same section size. :param header: a QHeaderView :param sectionSize: the new size of the header section in pixels
[ "Sets", "all", "sections", "(", "columns", "or", "rows", ")", "of", "a", "header", "to", "the", "same", "section", "size", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/qtplugins/table.py#L48-L55
titusjan/argos
argos/inspector/qtplugins/table.py
makeReplacementField
def makeReplacementField(formatSpec, altFormatSpec='', testValue=None): """ Prepends a colon and wraps the formatSpec in curly braces to yield a replacement field. The format specification is part of a replacement field, which can be used in new-style string formatting. See: https://doc...
python
def makeReplacementField(formatSpec, altFormatSpec='', testValue=None): """ Prepends a colon and wraps the formatSpec in curly braces to yield a replacement field. The format specification is part of a replacement field, which can be used in new-style string formatting. See: https://doc...
[ "def", "makeReplacementField", "(", "formatSpec", ",", "altFormatSpec", "=", "''", ",", "testValue", "=", "None", ")", ":", "check_is_a_string", "(", "formatSpec", ")", "check_is_a_string", "(", "altFormatSpec", ")", "fmt", "=", "altFormatSpec", "if", "not", "fo...
Prepends a colon and wraps the formatSpec in curly braces to yield a replacement field. The format specification is part of a replacement field, which can be used in new-style string formatting. See: https://docs.python.org/3/library/string.html#format-string-syntax https://docs...
[ "Prepends", "a", "colon", "and", "wraps", "the", "formatSpec", "in", "curly", "braces", "to", "yield", "a", "replacement", "field", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/qtplugins/table.py#L58-L98
titusjan/argos
argos/inspector/qtplugins/table.py
TableInspectorCti._refreshNodeFromTarget
def _refreshNodeFromTarget(self): """ Refreshes the TableInspectorCti from the TableInspector target it monitors. Disables auto-sizing of the header sizes for very large headers (> 10000 elements). Otherwise the resizing may take to long and the program will hang. """ ta...
python
def _refreshNodeFromTarget(self): """ Refreshes the TableInspectorCti from the TableInspector target it monitors. Disables auto-sizing of the header sizes for very large headers (> 10000 elements). Otherwise the resizing may take to long and the program will hang. """ ta...
[ "def", "_refreshNodeFromTarget", "(", "self", ")", ":", "tableModel", "=", "self", ".", "tableInspector", ".", "model", "# Disable row height and column with settings for large headers (too slow otherwise)", "if", "tableModel", ".", "rowCount", "(", ")", ">=", "RESET_HEADER...
Refreshes the TableInspectorCti from the TableInspector target it monitors. Disables auto-sizing of the header sizes for very large headers (> 10000 elements). Otherwise the resizing may take to long and the program will hang.
[ "Refreshes", "the", "TableInspectorCti", "from", "the", "TableInspector", "target", "it", "monitors", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/qtplugins/table.py#L187-L208
titusjan/argos
argos/inspector/qtplugins/table.py
TableInspector._drawContents
def _drawContents(self, reason=None, initiator=None): """ Draws the table contents from the sliced array of the collected repo tree item. See AbstractInspector.updateContents for the reason and initiator description. """ logger.debug("TableInspector._drawContents: {}".format(self)) ...
python
def _drawContents(self, reason=None, initiator=None): """ Draws the table contents from the sliced array of the collected repo tree item. See AbstractInspector.updateContents for the reason and initiator description. """ logger.debug("TableInspector._drawContents: {}".format(self)) ...
[ "def", "_drawContents", "(", "self", ",", "reason", "=", "None", ",", "initiator", "=", "None", ")", ":", "logger", ".", "debug", "(", "\"TableInspector._drawContents: {}\"", ".", "format", "(", "self", ")", ")", "oldTableIndex", "=", "self", ".", "tableView...
Draws the table contents from the sliced array of the collected repo tree item. See AbstractInspector.updateContents for the reason and initiator description.
[ "Draws", "the", "table", "contents", "from", "the", "sliced", "array", "of", "the", "collected", "repo", "tree", "item", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/qtplugins/table.py#L267-L366
titusjan/argos
argos/inspector/qtplugins/table.py
TableInspectorModel.updateState
def updateState(self, slicedArray, rtiInfo, separateFields): """ Sets the slicedArray and rtiInfo and other members. This will reset the model. Will be called from the tableInspector._drawContents. """ self.beginResetModel() try: # The sliced array can be a maske...
python
def updateState(self, slicedArray, rtiInfo, separateFields): """ Sets the slicedArray and rtiInfo and other members. This will reset the model. Will be called from the tableInspector._drawContents. """ self.beginResetModel() try: # The sliced array can be a maske...
[ "def", "updateState", "(", "self", ",", "slicedArray", ",", "rtiInfo", ",", "separateFields", ")", ":", "self", ".", "beginResetModel", "(", ")", "try", ":", "# The sliced array can be a masked array or a (regular) numpy array.", "# The table works fine with masked arrays, no...
Sets the slicedArray and rtiInfo and other members. This will reset the model. Will be called from the tableInspector._drawContents.
[ "Sets", "the", "slicedArray", "and", "rtiInfo", "and", "other", "members", ".", "This", "will", "reset", "the", "model", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/qtplugins/table.py#L404-L446
titusjan/argos
argos/inspector/qtplugins/table.py
TableInspectorModel._cellValue
def _cellValue(self, index): """ Returns the data value of the cell at the index (without any string conversion) """ row = index.row() col = index.column() if (row < 0 or row >= self.rowCount() or col < 0 or col >= self.columnCount()): return None # The check...
python
def _cellValue(self, index): """ Returns the data value of the cell at the index (without any string conversion) """ row = index.row() col = index.column() if (row < 0 or row >= self.rowCount() or col < 0 or col >= self.columnCount()): return None # The check...
[ "def", "_cellValue", "(", "self", ",", "index", ")", ":", "row", "=", "index", ".", "row", "(", ")", "col", "=", "index", ".", "column", "(", ")", "if", "(", "row", "<", "0", "or", "row", ">=", "self", ".", "rowCount", "(", ")", "or", "col", ...
Returns the data value of the cell at the index (without any string conversion)
[ "Returns", "the", "data", "value", "of", "the", "cell", "at", "the", "index", "(", "without", "any", "string", "conversion", ")" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/qtplugins/table.py#L449-L470
titusjan/argos
argos/inspector/qtplugins/table.py
TableInspectorModel._cellMask
def _cellMask(self, index): """ Returns the data mask of the cell at the index (without any string conversion) """ row = index.row() col = index.column() if (row < 0 or row >= self.rowCount() or col < 0 or col >= self.columnCount()): return None # The check a...
python
def _cellMask(self, index): """ Returns the data mask of the cell at the index (without any string conversion) """ row = index.row() col = index.column() if (row < 0 or row >= self.rowCount() or col < 0 or col >= self.columnCount()): return None # The check a...
[ "def", "_cellMask", "(", "self", ",", "index", ")", ":", "row", "=", "index", ".", "row", "(", ")", "col", "=", "index", ".", "column", "(", ")", "if", "(", "row", "<", "0", "or", "row", ">=", "self", ".", "rowCount", "(", ")", "or", "col", "...
Returns the data mask of the cell at the index (without any string conversion)
[ "Returns", "the", "data", "mask", "of", "the", "cell", "at", "the", "index", "(", "without", "any", "string", "conversion", ")" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/qtplugins/table.py#L473-L506
titusjan/argos
argos/inspector/qtplugins/table.py
TableInspectorModel.data
def data(self, index, role = Qt.DisplayRole): """ Returns the data at an index for a certain role """ try: if role == Qt.DisplayRole: return to_string(self._cellValue(index), masked=self._cellMask(index), decode_bytes=self.encoding, ma...
python
def data(self, index, role = Qt.DisplayRole): """ Returns the data at an index for a certain role """ try: if role == Qt.DisplayRole: return to_string(self._cellValue(index), masked=self._cellMask(index), decode_bytes=self.encoding, ma...
[ "def", "data", "(", "self", ",", "index", ",", "role", "=", "Qt", ".", "DisplayRole", ")", ":", "try", ":", "if", "role", "==", "Qt", ".", "DisplayRole", ":", "return", "to_string", "(", "self", ".", "_cellValue", "(", "index", ")", ",", "masked", ...
Returns the data at an index for a certain role
[ "Returns", "the", "data", "at", "an", "index", "for", "a", "certain", "role" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/qtplugins/table.py#L509-L544
titusjan/argos
argos/inspector/qtplugins/table.py
TableInspectorModel.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 == Qt.DisplayRole: if self._separateFieldOrientation == orie...
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 == Qt.DisplayRole: if self._separateFieldOrientation == orie...
[ "def", "headerData", "(", "self", ",", "section", ",", "orientation", ",", "role", ")", ":", "if", "role", "==", "Qt", ".", "DisplayRole", ":", "if", "self", ".", "_separateFieldOrientation", "==", "orientation", ":", "nFields", "=", "len", "(", "self", ...
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/inspector/qtplugins/table.py#L553-L569
titusjan/argos
argos/inspector/qtplugins/table.py
TableInspectorModel.rowCount
def rowCount(self, parent=None): """ The number of rows of the sliced array. The 'parent' parameter can be a QModelIndex. It is ignored since the number of rows does not depend on the parent. """ if self._separateFieldOrientation == Qt.Vertical: return self._n...
python
def rowCount(self, parent=None): """ The number of rows of the sliced array. The 'parent' parameter can be a QModelIndex. It is ignored since the number of rows does not depend on the parent. """ if self._separateFieldOrientation == Qt.Vertical: return self._n...
[ "def", "rowCount", "(", "self", ",", "parent", "=", "None", ")", ":", "if", "self", ".", "_separateFieldOrientation", "==", "Qt", ".", "Vertical", ":", "return", "self", ".", "_nRows", "*", "len", "(", "self", ".", "_fieldNames", ")", "else", ":", "ret...
The number of rows of the sliced array. The 'parent' parameter can be a QModelIndex. It is ignored since the number of rows does not depend on the parent.
[ "The", "number", "of", "rows", "of", "the", "sliced", "array", ".", "The", "parent", "parameter", "can", "be", "a", "QModelIndex", ".", "It", "is", "ignored", "since", "the", "number", "of", "rows", "does", "not", "depend", "on", "the", "parent", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/qtplugins/table.py#L572-L580
titusjan/argos
argos/inspector/qtplugins/table.py
TableInspectorModel.columnCount
def columnCount(self, parent=None): """ The number of columns of the sliced array. The 'parent' parameter can be a QModelIndex. It is ignored since the number of columns does not depend on the parent. """ if self._separateFieldOrientation == Qt.Horizontal: ret...
python
def columnCount(self, parent=None): """ The number of columns of the sliced array. The 'parent' parameter can be a QModelIndex. It is ignored since the number of columns does not depend on the parent. """ if self._separateFieldOrientation == Qt.Horizontal: ret...
[ "def", "columnCount", "(", "self", ",", "parent", "=", "None", ")", ":", "if", "self", ".", "_separateFieldOrientation", "==", "Qt", ".", "Horizontal", ":", "return", "self", ".", "_nCols", "*", "len", "(", "self", ".", "_fieldNames", ")", "else", ":", ...
The number of columns of the sliced array. The 'parent' parameter can be a QModelIndex. It is ignored since the number of columns does not depend on the parent.
[ "The", "number", "of", "columns", "of", "the", "sliced", "array", ".", "The", "parent", "parameter", "can", "be", "a", "QModelIndex", ".", "It", "is", "ignored", "since", "the", "number", "of", "columns", "does", "not", "depend", "on", "the", "parent", "...
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/qtplugins/table.py#L583-L591
titusjan/argos
argos/inspector/qtplugins/table.py
TableInspectorModel.setFont
def setFont(self, font): """ Sets the font that will be returned when data() is called with the Qt.FontRole. Can be a QFont or None if no font is set. """ check_class(font, QtGui.QFont, allow_none=True) self._font = font
python
def setFont(self, font): """ Sets the font that will be returned when data() is called with the Qt.FontRole. Can be a QFont or None if no font is set. """ check_class(font, QtGui.QFont, allow_none=True) self._font = font
[ "def", "setFont", "(", "self", ",", "font", ")", ":", "check_class", "(", "font", ",", "QtGui", ".", "QFont", ",", "allow_none", "=", "True", ")", "self", ".", "_font", "=", "font" ]
Sets the font that will be returned when data() is called with the Qt.FontRole. Can be a QFont or None if no font is set.
[ "Sets", "the", "font", "that", "will", "be", "returned", "when", "data", "()", "is", "called", "with", "the", "Qt", ".", "FontRole", ".", "Can", "be", "a", "QFont", "or", "None", "if", "no", "font", "is", "set", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/qtplugins/table.py#L601-L606
titusjan/argos
argos/inspector/pgplugins/pgctis.py
viewBoxAxisRange
def viewBoxAxisRange(viewBox, axisNumber): """ Calculates the range of an axis of a viewBox. """ rect = viewBox.childrenBoundingRect() # taken from viewBox.autoRange() if rect is not None: if axisNumber == X_AXIS: return rect.left(), rect.right() elif axisNumber == Y_AXIS: ...
python
def viewBoxAxisRange(viewBox, axisNumber): """ Calculates the range of an axis of a viewBox. """ rect = viewBox.childrenBoundingRect() # taken from viewBox.autoRange() if rect is not None: if axisNumber == X_AXIS: return rect.left(), rect.right() elif axisNumber == Y_AXIS: ...
[ "def", "viewBoxAxisRange", "(", "viewBox", ",", "axisNumber", ")", ":", "rect", "=", "viewBox", ".", "childrenBoundingRect", "(", ")", "# taken from viewBox.autoRange()", "if", "rect", "is", "not", "None", ":", "if", "axisNumber", "==", "X_AXIS", ":", "return", ...
Calculates the range of an axis of a viewBox.
[ "Calculates", "the", "range", "of", "an", "axis", "of", "a", "viewBox", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L113-L126
titusjan/argos
argos/inspector/pgplugins/pgctis.py
inspectorDataRange
def inspectorDataRange(inspector, percentage): """ Calculates the range from the inspectors' sliced array. Discards percentage of the minimum and percentage of the maximum values of the inspector.slicedArray Meant to be used with functools.partial for filling the autorange methods combobox. ...
python
def inspectorDataRange(inspector, percentage): """ Calculates the range from the inspectors' sliced array. Discards percentage of the minimum and percentage of the maximum values of the inspector.slicedArray Meant to be used with functools.partial for filling the autorange methods combobox. ...
[ "def", "inspectorDataRange", "(", "inspector", ",", "percentage", ")", ":", "logger", ".", "debug", "(", "\"Discarding {}% from id: {}\"", ".", "format", "(", "percentage", ",", "id", "(", "inspector", ".", "slicedArray", ")", ")", ")", "return", "maskedNanPerce...
Calculates the range from the inspectors' sliced array. Discards percentage of the minimum and percentage of the maximum values of the inspector.slicedArray Meant to be used with functools.partial for filling the autorange methods combobox. The first parameter is an inspector, it's not an array...
[ "Calculates", "the", "range", "from", "the", "inspectors", "sliced", "array", ".", "Discards", "percentage", "of", "the", "minimum", "and", "percentage", "of", "the", "maximum", "values", "of", "the", "inspector", ".", "slicedArray" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L129-L138
titusjan/argos
argos/inspector/pgplugins/pgctis.py
defaultAutoRangeMethods
def defaultAutoRangeMethods(inspector, intialItems=None): """ Creates an ordered dict with default autorange methods for an inspector. :param inspector: the range methods will work on (the sliced array) of this inspector. :param intialItems: will be passed on to the OrderedDict constructor. ""...
python
def defaultAutoRangeMethods(inspector, intialItems=None): """ Creates an ordered dict with default autorange methods for an inspector. :param inspector: the range methods will work on (the sliced array) of this inspector. :param intialItems: will be passed on to the OrderedDict constructor. ""...
[ "def", "defaultAutoRangeMethods", "(", "inspector", ",", "intialItems", "=", "None", ")", ":", "rangeFunctions", "=", "OrderedDict", "(", "{", "}", "if", "intialItems", "is", "None", "else", "intialItems", ")", "rangeFunctions", "[", "'use all data'", "]", "=", ...
Creates an ordered dict with default autorange methods for an inspector. :param inspector: the range methods will work on (the sliced array) of this inspector. :param intialItems: will be passed on to the OrderedDict constructor.
[ "Creates", "an", "ordered", "dict", "with", "default", "autorange", "methods", "for", "an", "inspector", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L141-L152
titusjan/argos
argos/inspector/pgplugins/pgctis.py
setXYAxesAutoRangeOn
def setXYAxesAutoRangeOn(commonCti, xAxisRangeCti, yAxisRangeCti, axisNumber): """ Turns on the auto range of an X and Y axis simultaneously. It sets the autoRangeCti.data of the xAxisRangeCti and yAxisRangeCti to True. After that, it emits the sigItemChanged signal of the commonCti. Can be...
python
def setXYAxesAutoRangeOn(commonCti, xAxisRangeCti, yAxisRangeCti, axisNumber): """ Turns on the auto range of an X and Y axis simultaneously. It sets the autoRangeCti.data of the xAxisRangeCti and yAxisRangeCti to True. After that, it emits the sigItemChanged signal of the commonCti. Can be...
[ "def", "setXYAxesAutoRangeOn", "(", "commonCti", ",", "xAxisRangeCti", ",", "yAxisRangeCti", ",", "axisNumber", ")", ":", "assert", "axisNumber", "in", "VALID_AXIS_NUMBERS", ",", "\"Axis number should be one of {}, got {}\"", ".", "format", "(", "VALID_AXIS_NUMBERS", ",",...
Turns on the auto range of an X and Y axis simultaneously. It sets the autoRangeCti.data of the xAxisRangeCti and yAxisRangeCti to True. After that, it emits the sigItemChanged signal of the commonCti. Can be used with functools.partial to make a slot that atomically resets the X and Y axis. ...
[ "Turns", "on", "the", "auto", "range", "of", "an", "X", "and", "Y", "axis", "simultaneously", ".", "It", "sets", "the", "autoRangeCti", ".", "data", "of", "the", "xAxisRangeCti", "and", "yAxisRangeCti", "to", "True", ".", "After", "that", "it", "emits", ...
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L155-L180
titusjan/argos
argos/inspector/pgplugins/pgctis.py
ViewBoxDebugCti._refreshNodeFromTarget
def _refreshNodeFromTarget(self): """ Updates the config settings """ for key, value in self.viewBox.state.items(): if key != "limits": childItem = self.childByNodeName(key) childItem.data = value else: # limits contains a d...
python
def _refreshNodeFromTarget(self): """ Updates the config settings """ for key, value in self.viewBox.state.items(): if key != "limits": childItem = self.childByNodeName(key) childItem.data = value else: # limits contains a d...
[ "def", "_refreshNodeFromTarget", "(", "self", ")", ":", "for", "key", ",", "value", "in", "self", ".", "viewBox", ".", "state", ".", "items", "(", ")", ":", "if", "key", "!=", "\"limits\"", ":", "childItem", "=", "self", ".", "childByNodeName", "(", "k...
Updates the config settings
[ "Updates", "the", "config", "settings" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L98-L109
titusjan/argos
argos/inspector/pgplugins/pgctis.py
AbstractRangeCti.autoRangeMethod
def autoRangeMethod(self): """ The currently selected auto range method. If there is no method child CTI, there will be only one method (which will be returned). """ if self.methodCti: return self.methodCti.configValue else: assert len(self._rangeFunct...
python
def autoRangeMethod(self): """ The currently selected auto range method. If there is no method child CTI, there will be only one method (which will be returned). """ if self.methodCti: return self.methodCti.configValue else: assert len(self._rangeFunct...
[ "def", "autoRangeMethod", "(", "self", ")", ":", "if", "self", ".", "methodCti", ":", "return", "self", ".", "methodCti", ".", "configValue", "else", ":", "assert", "len", "(", "self", ".", "_rangeFunctions", ")", "==", "1", ",", "\"Assumed only one _rangeFu...
The currently selected auto range method. If there is no method child CTI, there will be only one method (which will be returned).
[ "The", "currently", "selected", "auto", "range", "method", ".", "If", "there", "is", "no", "method", "child", "CTI", "there", "will", "be", "only", "one", "method", "(", "which", "will", "be", "returned", ")", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L223-L232
titusjan/argos
argos/inspector/pgplugins/pgctis.py
AbstractRangeCti._forceRefreshMinMax
def _forceRefreshMinMax(self): """ Refreshes the min max config values from the axes' state. """ #logger.debug("_forceRefreshMinMax", stack_info=True) # Set the precision from by looking how many decimals are needed to show the difference # between the minimum and maximum, given...
python
def _forceRefreshMinMax(self): """ Refreshes the min max config values from the axes' state. """ #logger.debug("_forceRefreshMinMax", stack_info=True) # Set the precision from by looking how many decimals are needed to show the difference # between the minimum and maximum, given...
[ "def", "_forceRefreshMinMax", "(", "self", ")", ":", "#logger.debug(\"_forceRefreshMinMax\", stack_info=True)", "# Set the precision from by looking how many decimals are needed to show the difference", "# between the minimum and maximum, given the maximum. E.g. if min = 0.04 and max = 0.07,", "# ...
Refreshes the min max config values from the axes' state.
[ "Refreshes", "the", "min", "max", "config", "values", "from", "the", "axes", "state", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L248-L275
titusjan/argos
argos/inspector/pgplugins/pgctis.py
AbstractRangeCti.refreshMinMax
def refreshMinMax(self): """ Refreshes the min max config values from the axes' state. Does nothing when self.getRefreshBlocked() returns True. """ if self.getRefreshBlocked(): logger.debug("refreshMinMax blocked for {}".format(self.nodeName)) return ...
python
def refreshMinMax(self): """ Refreshes the min max config values from the axes' state. Does nothing when self.getRefreshBlocked() returns True. """ if self.getRefreshBlocked(): logger.debug("refreshMinMax blocked for {}".format(self.nodeName)) return ...
[ "def", "refreshMinMax", "(", "self", ")", ":", "if", "self", ".", "getRefreshBlocked", "(", ")", ":", "logger", ".", "debug", "(", "\"refreshMinMax blocked for {}\"", ".", "format", "(", "self", ".", "nodeName", ")", ")", "return", "self", ".", "_forceRefres...
Refreshes the min max config values from the axes' state. Does nothing when self.getRefreshBlocked() returns True.
[ "Refreshes", "the", "min", "max", "config", "values", "from", "the", "axes", "state", ".", "Does", "nothing", "when", "self", ".", "getRefreshBlocked", "()", "returns", "True", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L278-L286
titusjan/argos
argos/inspector/pgplugins/pgctis.py
AbstractRangeCti._forceRefreshAutoRange
def _forceRefreshAutoRange(self): """ The min and max config items will be disabled if auto range is on. """ enabled = self.autoRangeCti and self.autoRangeCti.configValue self.rangeMinCti.enabled = not enabled self.rangeMaxCti.enabled = not enabled self.model.emitDataChan...
python
def _forceRefreshAutoRange(self): """ The min and max config items will be disabled if auto range is on. """ enabled = self.autoRangeCti and self.autoRangeCti.configValue self.rangeMinCti.enabled = not enabled self.rangeMaxCti.enabled = not enabled self.model.emitDataChan...
[ "def", "_forceRefreshAutoRange", "(", "self", ")", ":", "enabled", "=", "self", ".", "autoRangeCti", "and", "self", ".", "autoRangeCti", ".", "configValue", "self", ".", "rangeMinCti", ".", "enabled", "=", "not", "enabled", "self", ".", "rangeMaxCti", ".", "...
The min and max config items will be disabled if auto range is on.
[ "The", "min", "and", "max", "config", "items", "will", "be", "disabled", "if", "auto", "range", "is", "on", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L289-L295
titusjan/argos
argos/inspector/pgplugins/pgctis.py
AbstractRangeCti.setAutoRangeOff
def setAutoRangeOff(self): """ Turns off the auto range checkbox. Calls _refreshNodeFromTarget, not _updateTargetFromNode, because setting auto range off does not require a redraw of the target. """ # TODO: catch exceptions. How? # /argos/hdf-eos/DeepBlue-SeaWiFS-...
python
def setAutoRangeOff(self): """ Turns off the auto range checkbox. Calls _refreshNodeFromTarget, not _updateTargetFromNode, because setting auto range off does not require a redraw of the target. """ # TODO: catch exceptions. How? # /argos/hdf-eos/DeepBlue-SeaWiFS-...
[ "def", "setAutoRangeOff", "(", "self", ")", ":", "# TODO: catch exceptions. How?", "# /argos/hdf-eos/DeepBlue-SeaWiFS-1.0_L3_20100101_v002-20110527T191319Z.h5/aerosol_optical_thickness_stddev_ocean", "if", "self", ".", "getRefreshBlocked", "(", ")", ":", "logger", ".", "debug", "...
Turns off the auto range checkbox. Calls _refreshNodeFromTarget, not _updateTargetFromNode, because setting auto range off does not require a redraw of the target.
[ "Turns", "off", "the", "auto", "range", "checkbox", ".", "Calls", "_refreshNodeFromTarget", "not", "_updateTargetFromNode", "because", "setting", "auto", "range", "off", "does", "not", "require", "a", "redraw", "of", "the", "target", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L298-L312
titusjan/argos
argos/inspector/pgplugins/pgctis.py
AbstractRangeCti.setAutoRangeOn
def setAutoRangeOn(self): """ Turns on the auto range checkbox for the equivalent axes Emits the sigItemChanged signal so that the inspector may be updated. Use the setXYAxesAutoRangeOn stand-alone function if you want to set the autorange on for both axes of a viewport. ...
python
def setAutoRangeOn(self): """ Turns on the auto range checkbox for the equivalent axes Emits the sigItemChanged signal so that the inspector may be updated. Use the setXYAxesAutoRangeOn stand-alone function if you want to set the autorange on for both axes of a viewport. ...
[ "def", "setAutoRangeOn", "(", "self", ")", ":", "if", "self", ".", "getRefreshBlocked", "(", ")", ":", "logger", ".", "debug", "(", "\"Set autorange on blocked for {}\"", ".", "format", "(", "self", ".", "nodeName", ")", ")", "return", "if", "self", ".", "...
Turns on the auto range checkbox for the equivalent axes Emits the sigItemChanged signal so that the inspector may be updated. Use the setXYAxesAutoRangeOn stand-alone function if you want to set the autorange on for both axes of a viewport.
[ "Turns", "on", "the", "auto", "range", "checkbox", "for", "the", "equivalent", "axes", "Emits", "the", "sigItemChanged", "signal", "so", "that", "the", "inspector", "may", "be", "updated", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L315-L328
titusjan/argos
argos/inspector/pgplugins/pgctis.py
AbstractRangeCti.calculateRange
def calculateRange(self): """ Calculates the range depending on the config settings. """ if not self.autoRangeCti or not self.autoRangeCti.configValue: return (self.rangeMinCti.data, self.rangeMaxCti.data) else: rangeFunction = self._rangeFunctions[self.autoRangeM...
python
def calculateRange(self): """ Calculates the range depending on the config settings. """ if not self.autoRangeCti or not self.autoRangeCti.configValue: return (self.rangeMinCti.data, self.rangeMaxCti.data) else: rangeFunction = self._rangeFunctions[self.autoRangeM...
[ "def", "calculateRange", "(", "self", ")", ":", "if", "not", "self", ".", "autoRangeCti", "or", "not", "self", ".", "autoRangeCti", ".", "configValue", ":", "return", "(", "self", ".", "rangeMinCti", ".", "data", ",", "self", ".", "rangeMaxCti", ".", "da...
Calculates the range depending on the config settings.
[ "Calculates", "the", "range", "depending", "on", "the", "config", "settings", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L331-L338
titusjan/argos
argos/inspector/pgplugins/pgctis.py
AbstractRangeCti._updateTargetFromNode
def _updateTargetFromNode(self): """ Applies the configuration to the target axis. """ if not self.autoRangeCti or not self.autoRangeCti.configValue: padding = 0 elif self.paddingCti.configValue == -1: # specialValueText # PyQtGraph dynamic padding: between 0.02 a...
python
def _updateTargetFromNode(self): """ Applies the configuration to the target axis. """ if not self.autoRangeCti or not self.autoRangeCti.configValue: padding = 0 elif self.paddingCti.configValue == -1: # specialValueText # PyQtGraph dynamic padding: between 0.02 a...
[ "def", "_updateTargetFromNode", "(", "self", ")", ":", "if", "not", "self", ".", "autoRangeCti", "or", "not", "self", ".", "autoRangeCti", ".", "configValue", ":", "padding", "=", "0", "elif", "self", ".", "paddingCti", ".", "configValue", "==", "-", "1", ...
Applies the configuration to the target axis.
[ "Applies", "the", "configuration", "to", "the", "target", "axis", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L341-L358
titusjan/argos
argos/inspector/pgplugins/pgctis.py
PgAxisRangeCti._closeResources
def _closeResources(self): """ Disconnects signals. Is called by self.finalize when the cti is deleted. """ self.viewBox.sigRangeChangedManually.disconnect(self.setAutoRangeOff) self.viewBox.sigRangeChanged.disconnect(self.refreshMinMax)
python
def _closeResources(self): """ Disconnects signals. Is called by self.finalize when the cti is deleted. """ self.viewBox.sigRangeChangedManually.disconnect(self.setAutoRangeOff) self.viewBox.sigRangeChanged.disconnect(self.refreshMinMax)
[ "def", "_closeResources", "(", "self", ")", ":", "self", ".", "viewBox", ".", "sigRangeChangedManually", ".", "disconnect", "(", "self", ".", "setAutoRangeOff", ")", "self", ".", "viewBox", ".", "sigRangeChanged", ".", "disconnect", "(", "self", ".", "refreshM...
Disconnects signals. Is called by self.finalize when the cti is deleted.
[ "Disconnects", "signals", ".", "Is", "called", "by", "self", ".", "finalize", "when", "the", "cti", "is", "deleted", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L414-L419
titusjan/argos
argos/inspector/pgplugins/pgctis.py
PgAxisRangeCti.setTargetRange
def setTargetRange(self, targetRange, padding=None): """ Sets the range of the target. """ # viewBox.setRange doesn't accept an axis number :-( if self.axisNumber == X_AXIS: xRange, yRange = targetRange, None else: xRange, yRange = None, targetRange ...
python
def setTargetRange(self, targetRange, padding=None): """ Sets the range of the target. """ # viewBox.setRange doesn't accept an axis number :-( if self.axisNumber == X_AXIS: xRange, yRange = targetRange, None else: xRange, yRange = None, targetRange ...
[ "def", "setTargetRange", "(", "self", ",", "targetRange", ",", "padding", "=", "None", ")", ":", "# viewBox.setRange doesn't accept an axis number :-(", "if", "self", ".", "axisNumber", "==", "X_AXIS", ":", "xRange", ",", "yRange", "=", "targetRange", ",", "None",...
Sets the range of the target.
[ "Sets", "the", "range", "of", "the", "target", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L428-L440
titusjan/argos
argos/inspector/pgplugins/pgctis.py
PgHistLutColorRangeCti._closeResources
def _closeResources(self): """ Disconnects signals. Is called by self.finalize when the cti is deleted. """ self.histLutItem.sigLevelsChanged.disconnect(self.setAutoRangeOff) self.histLutItem.sigLevelsChanged.disconnect(self.refreshMinMax)
python
def _closeResources(self): """ Disconnects signals. Is called by self.finalize when the cti is deleted. """ self.histLutItem.sigLevelsChanged.disconnect(self.setAutoRangeOff) self.histLutItem.sigLevelsChanged.disconnect(self.refreshMinMax)
[ "def", "_closeResources", "(", "self", ")", ":", "self", ".", "histLutItem", ".", "sigLevelsChanged", ".", "disconnect", "(", "self", ".", "setAutoRangeOff", ")", "self", ".", "histLutItem", ".", "sigLevelsChanged", ".", "disconnect", "(", "self", ".", "refres...
Disconnects signals. Is called by self.finalize when the cti is deleted.
[ "Disconnects", "signals", ".", "Is", "called", "by", "self", ".", "finalize", "when", "the", "cti", "is", "deleted", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L470-L475
titusjan/argos
argos/inspector/pgplugins/pgctis.py
PgHistLutColorRangeCti.setTargetRange
def setTargetRange(self, targetRange, padding=None): """ Sets the (color) range of the HistogramLUTItem The padding variable is ignored. """ rangeMin, rangeMax = targetRange self.histLutItem.setLevels(rangeMin, rangeMax)
python
def setTargetRange(self, targetRange, padding=None): """ Sets the (color) range of the HistogramLUTItem The padding variable is ignored. """ rangeMin, rangeMax = targetRange self.histLutItem.setLevels(rangeMin, rangeMax)
[ "def", "setTargetRange", "(", "self", ",", "targetRange", ",", "padding", "=", "None", ")", ":", "rangeMin", ",", "rangeMax", "=", "targetRange", "self", ".", "histLutItem", ".", "setLevels", "(", "rangeMin", ",", "rangeMax", ")" ]
Sets the (color) range of the HistogramLUTItem The padding variable is ignored.
[ "Sets", "the", "(", "color", ")", "range", "of", "the", "HistogramLUTItem", "The", "padding", "variable", "is", "ignored", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L484-L489
titusjan/argos
argos/inspector/pgplugins/pgctis.py
PgAspectRatioCti._updateTargetFromNode
def _updateTargetFromNode(self): """ Applies the configuration to its target axis """ self.viewBox.setAspectLocked(lock=self.configValue, ratio=self.aspectRatioCti.configValue)
python
def _updateTargetFromNode(self): """ Applies the configuration to its target axis """ self.viewBox.setAspectLocked(lock=self.configValue, ratio=self.aspectRatioCti.configValue)
[ "def", "_updateTargetFromNode", "(", "self", ")", ":", "self", ".", "viewBox", ".", "setAspectLocked", "(", "lock", "=", "self", ".", "configValue", ",", "ratio", "=", "self", ".", "aspectRatioCti", ".", "configValue", ")" ]
Applies the configuration to its target axis
[ "Applies", "the", "configuration", "to", "its", "target", "axis" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L530-L533
titusjan/argos
argos/inspector/pgplugins/pgctis.py
PgAxisFlipCti._updateTargetFromNode
def _updateTargetFromNode(self): """ Applies the configuration to its target axis """ if self.axisNumber == X_AXIS: self.viewBox.invertX(self.configValue) else: self.viewBox.invertY(self.configValue)
python
def _updateTargetFromNode(self): """ Applies the configuration to its target axis """ if self.axisNumber == X_AXIS: self.viewBox.invertX(self.configValue) else: self.viewBox.invertY(self.configValue)
[ "def", "_updateTargetFromNode", "(", "self", ")", ":", "if", "self", ".", "axisNumber", "==", "X_AXIS", ":", "self", ".", "viewBox", ".", "invertX", "(", "self", ".", "configValue", ")", "else", ":", "self", ".", "viewBox", ".", "invertY", "(", "self", ...
Applies the configuration to its target axis
[ "Applies", "the", "configuration", "to", "its", "target", "axis" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L552-L558
titusjan/argos
argos/inspector/pgplugins/pgctis.py
PgAxisLabelCti._updateTargetFromNode
def _updateTargetFromNode(self): """ Applies the configuration to the target axis it monitors. The axis label will be set to the configValue. If the configValue equals PgAxisLabelCti.NO_LABEL, the label will be hidden. """ rtiInfo = self.collector.rtiInfo self.pl...
python
def _updateTargetFromNode(self): """ Applies the configuration to the target axis it monitors. The axis label will be set to the configValue. If the configValue equals PgAxisLabelCti.NO_LABEL, the label will be hidden. """ rtiInfo = self.collector.rtiInfo self.pl...
[ "def", "_updateTargetFromNode", "(", "self", ")", ":", "rtiInfo", "=", "self", ".", "collector", ".", "rtiInfo", "self", ".", "plotItem", ".", "setLabel", "(", "self", ".", "axisPosition", ",", "self", ".", "configValue", ".", "format", "(", "*", "*", "r...
Applies the configuration to the target axis it monitors. The axis label will be set to the configValue. If the configValue equals PgAxisLabelCti.NO_LABEL, the label will be hidden.
[ "Applies", "the", "configuration", "to", "the", "target", "axis", "it", "monitors", ".", "The", "axis", "label", "will", "be", "set", "to", "the", "configValue", ".", "If", "the", "configValue", "equals", "PgAxisLabelCti", ".", "NO_LABEL", "the", "label", "w...
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L586-L593
titusjan/argos
argos/inspector/pgplugins/pgctis.py
PgAxisShowCti._updateTargetFromNode
def _updateTargetFromNode(self): """ Applies the configuration to its target axis """ logger.debug("showAxis: {}, {}".format(self.axisPosition, self.configValue)) self.plotItem.showAxis(self.axisPosition, show=self.configValue)
python
def _updateTargetFromNode(self): """ Applies the configuration to its target axis """ logger.debug("showAxis: {}, {}".format(self.axisPosition, self.configValue)) self.plotItem.showAxis(self.axisPosition, show=self.configValue)
[ "def", "_updateTargetFromNode", "(", "self", ")", ":", "logger", ".", "debug", "(", "\"showAxis: {}, {}\"", ".", "format", "(", "self", ".", "axisPosition", ",", "self", ".", "configValue", ")", ")", "self", ".", "plotItem", ".", "showAxis", "(", "self", "...
Applies the configuration to its target axis
[ "Applies", "the", "configuration", "to", "its", "target", "axis" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L615-L619
titusjan/argos
argos/inspector/pgplugins/pgctis.py
PgAxisLogModeCti._updateTargetFromNode
def _updateTargetFromNode(self): """ Applies the configuration to its target axis """ if self.axisNumber == X_AXIS: xMode, yMode = self.configValue, None else: xMode, yMode = None, self.configValue self.plotItem.setLogMode(x=xMode, y=yMode)
python
def _updateTargetFromNode(self): """ Applies the configuration to its target axis """ if self.axisNumber == X_AXIS: xMode, yMode = self.configValue, None else: xMode, yMode = None, self.configValue self.plotItem.setLogMode(x=xMode, y=yMode)
[ "def", "_updateTargetFromNode", "(", "self", ")", ":", "if", "self", ".", "axisNumber", "==", "X_AXIS", ":", "xMode", ",", "yMode", "=", "self", ".", "configValue", ",", "None", "else", ":", "xMode", ",", "yMode", "=", "None", ",", "self", ".", "config...
Applies the configuration to its target axis
[ "Applies", "the", "configuration", "to", "its", "target", "axis" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L634-L642
titusjan/argos
argos/inspector/pgplugins/pgctis.py
PgGridCti._updateTargetFromNode
def _updateTargetFromNode(self): """ Applies the configuration to the grid of the plot item. """ self.plotItem.showGrid(x=self.xGridCti.configValue, y=self.yGridCti.configValue, alpha=self.alphaCti.configValue) self.plotItem.updateGrid()
python
def _updateTargetFromNode(self): """ Applies the configuration to the grid of the plot item. """ self.plotItem.showGrid(x=self.xGridCti.configValue, y=self.yGridCti.configValue, alpha=self.alphaCti.configValue) self.plotItem.updateGrid()
[ "def", "_updateTargetFromNode", "(", "self", ")", ":", "self", ".", "plotItem", ".", "showGrid", "(", "x", "=", "self", ".", "xGridCti", ".", "configValue", ",", "y", "=", "self", ".", "yGridCti", ".", "configValue", ",", "alpha", "=", "self", ".", "al...
Applies the configuration to the grid of the plot item.
[ "Applies", "the", "configuration", "to", "the", "grid", "of", "the", "plot", "item", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L667-L672
titusjan/argos
argos/inspector/pgplugins/pgctis.py
PgPlotDataItemCti.createPlotDataItem
def createPlotDataItem(self): """ Creates a PyQtGraph PlotDataItem from the config values """ antialias = self.antiAliasCti.configValue color = self.penColor if self.lineCti.configValue: pen = QtGui.QPen() pen.setCosmetic(True) pen.setColor(co...
python
def createPlotDataItem(self): """ Creates a PyQtGraph PlotDataItem from the config values """ antialias = self.antiAliasCti.configValue color = self.penColor if self.lineCti.configValue: pen = QtGui.QPen() pen.setCosmetic(True) pen.setColor(co...
[ "def", "createPlotDataItem", "(", "self", ")", ":", "antialias", "=", "self", ".", "antiAliasCti", ".", "configValue", "color", "=", "self", ".", "penColor", "if", "self", ".", "lineCti", ".", "configValue", ":", "pen", "=", "QtGui", ".", "QPen", "(", ")...
Creates a PyQtGraph PlotDataItem from the config values
[ "Creates", "a", "PyQtGraph", "PlotDataItem", "from", "the", "config", "values" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/pgplugins/pgctis.py#L721-L748
titusjan/argos
argos/repo/detailplugins/prop.py
PropertiesPane._drawContents
def _drawContents(self, currentRti=None): """ Draws the attributes of the currentRTI """ table = self.table table.setUpdatesEnabled(False) try: table.clearContents() verticalHeader = table.verticalHeader() verticalHeader.setSectionResizeMode(Qt...
python
def _drawContents(self, currentRti=None): """ Draws the attributes of the currentRTI """ table = self.table table.setUpdatesEnabled(False) try: table.clearContents() verticalHeader = table.verticalHeader() verticalHeader.setSectionResizeMode(Qt...
[ "def", "_drawContents", "(", "self", ",", "currentRti", "=", "None", ")", ":", "table", "=", "self", ".", "table", "table", ".", "setUpdatesEnabled", "(", "False", ")", "try", ":", "table", ".", "clearContents", "(", ")", "verticalHeader", "=", "table", ...
Draws the attributes of the currentRTI
[ "Draws", "the", "attributes", "of", "the", "currentRTI" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/detailplugins/prop.py#L52-L83
titusjan/argos
argos/repo/repotreemodel.py
RepoTreeModel.itemData
def itemData(self, treeItem, column, role=Qt.DisplayRole): """ Returns the data stored under the given role for the item. O """ if role == Qt.DisplayRole: if column == self.COL_NODE_NAME: return treeItem.nodeName elif column == self.COL_NODE_PATH: ...
python
def itemData(self, treeItem, column, role=Qt.DisplayRole): """ Returns the data stored under the given role for the item. O """ if role == Qt.DisplayRole: if column == self.COL_NODE_NAME: return treeItem.nodeName elif column == self.COL_NODE_PATH: ...
[ "def", "itemData", "(", "self", ",", "treeItem", ",", "column", ",", "role", "=", "Qt", ".", "DisplayRole", ")", ":", "if", "role", "==", "Qt", ".", "DisplayRole", ":", "if", "column", "==", "self", ".", "COL_NODE_NAME", ":", "return", "treeItem", ".",...
Returns the data stored under the given role for the item. O
[ "Returns", "the", "data", "stored", "under", "the", "given", "role", "for", "the", "item", ".", "O" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/repotreemodel.py#L53-L113
titusjan/argos
argos/repo/repotreemodel.py
RepoTreeModel.canFetchMore
def canFetchMore(self, parentIndex): """ Returns true if there is more data available for parent; otherwise returns false. """ parentItem = self.getItem(parentIndex) if not parentItem: return False return parentItem.canFetchChildren()
python
def canFetchMore(self, parentIndex): """ Returns true if there is more data available for parent; otherwise returns false. """ parentItem = self.getItem(parentIndex) if not parentItem: return False return parentItem.canFetchChildren()
[ "def", "canFetchMore", "(", "self", ",", "parentIndex", ")", ":", "parentItem", "=", "self", ".", "getItem", "(", "parentIndex", ")", "if", "not", "parentItem", ":", "return", "False", "return", "parentItem", ".", "canFetchChildren", "(", ")" ]
Returns true if there is more data available for parent; otherwise returns false.
[ "Returns", "true", "if", "there", "is", "more", "data", "available", "for", "parent", ";", "otherwise", "returns", "false", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/repotreemodel.py#L116-L123
titusjan/argos
argos/repo/repotreemodel.py
RepoTreeModel.fetchMore
def fetchMore(self, parentIndex): # TODO: Make LazyLoadRepoTreeModel? """ Fetches any available data for the items with the parent specified by the parent index. """ parentItem = self.getItem(parentIndex) if not parentItem: return if not parentItem.canFetchChildren(...
python
def fetchMore(self, parentIndex): # TODO: Make LazyLoadRepoTreeModel? """ Fetches any available data for the items with the parent specified by the parent index. """ parentItem = self.getItem(parentIndex) if not parentItem: return if not parentItem.canFetchChildren(...
[ "def", "fetchMore", "(", "self", ",", "parentIndex", ")", ":", "# TODO: Make LazyLoadRepoTreeModel?", "parentItem", "=", "self", ".", "getItem", "(", "parentIndex", ")", "if", "not", "parentItem", ":", "return", "if", "not", "parentItem", ".", "canFetchChildren", ...
Fetches any available data for the items with the parent specified by the parent index.
[ "Fetches", "any", "available", "data", "for", "the", "items", "with", "the", "parent", "specified", "by", "the", "parent", "index", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/repotreemodel.py#L126-L142
titusjan/argos
argos/repo/repotreemodel.py
RepoTreeModel.findFileRtiIndex
def findFileRtiIndex(self, childIndex): """ Traverses the tree upwards from the item at childIndex until the tree item is found that represents the file the item at childIndex """ parentIndex = childIndex.parent() if not parentIndex.isValid(): return childIndex ...
python
def findFileRtiIndex(self, childIndex): """ Traverses the tree upwards from the item at childIndex until the tree item is found that represents the file the item at childIndex """ parentIndex = childIndex.parent() if not parentIndex.isValid(): return childIndex ...
[ "def", "findFileRtiIndex", "(", "self", ",", "childIndex", ")", ":", "parentIndex", "=", "childIndex", ".", "parent", "(", ")", "if", "not", "parentIndex", ".", "isValid", "(", ")", ":", "return", "childIndex", "else", ":", "parentItem", "=", "self", ".", ...
Traverses the tree upwards from the item at childIndex until the tree item is found that represents the file the item at childIndex
[ "Traverses", "the", "tree", "upwards", "from", "the", "item", "at", "childIndex", "until", "the", "tree", "item", "is", "found", "that", "represents", "the", "file", "the", "item", "at", "childIndex" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/repotreemodel.py#L145-L158
titusjan/argos
argos/repo/repotreemodel.py
RepoTreeModel.reloadFileAtIndex
def reloadFileAtIndex(self, itemIndex, rtiClass=None): """ Reloads the item at the index by removing the repo tree item and inserting a new one. The new item will have by of type rtiClass. If rtiClass is None (the default), the new rtiClass will be the same as the old one. """ ...
python
def reloadFileAtIndex(self, itemIndex, rtiClass=None): """ Reloads the item at the index by removing the repo tree item and inserting a new one. The new item will have by of type rtiClass. If rtiClass is None (the default), the new rtiClass will be the same as the old one. """ ...
[ "def", "reloadFileAtIndex", "(", "self", ",", "itemIndex", ",", "rtiClass", "=", "None", ")", ":", "fileRtiParentIndex", "=", "itemIndex", ".", "parent", "(", ")", "fileRti", "=", "self", ".", "getItem", "(", "itemIndex", ")", "position", "=", "fileRti", "...
Reloads the item at the index by removing the repo tree item and inserting a new one. The new item will have by of type rtiClass. If rtiClass is None (the default), the new rtiClass will be the same as the old one.
[ "Reloads", "the", "item", "at", "the", "index", "by", "removing", "the", "repo", "tree", "item", "and", "inserting", "a", "new", "one", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/repotreemodel.py#L161-L177
titusjan/argos
argos/repo/repotreemodel.py
RepoTreeModel.loadFile
def loadFile(self, fileName, rtiClass=None, position=None, parentIndex=QtCore.QModelIndex()): """ Loads a file in the repository as a repo tree item of class rtiClass. Autodetects the RTI type if rtiClass is None. If position is None the child will be appended as the las...
python
def loadFile(self, fileName, rtiClass=None, position=None, parentIndex=QtCore.QModelIndex()): """ Loads a file in the repository as a repo tree item of class rtiClass. Autodetects the RTI type if rtiClass is None. If position is None the child will be appended as the las...
[ "def", "loadFile", "(", "self", ",", "fileName", ",", "rtiClass", "=", "None", ",", "position", "=", "None", ",", "parentIndex", "=", "QtCore", ".", "QModelIndex", "(", ")", ")", ":", "logger", ".", "info", "(", "\"Loading data from: {!r}\"", ".", "format"...
Loads a file in the repository as a repo tree item of class rtiClass. Autodetects the RTI type if rtiClass is None. If position is None the child will be appended as the last child of the parent. Returns the index of the newly inserted RTI
[ "Loads", "a", "file", "in", "the", "repository", "as", "a", "repo", "tree", "item", "of", "class", "rtiClass", ".", "Autodetects", "the", "RTI", "type", "if", "rtiClass", "is", "None", ".", "If", "position", "is", "None", "the", "child", "will", "be", ...
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/repotreemodel.py#L180-L193
titusjan/argos
argos/repo/repotreeview.py
RepoTreeView.finalize
def finalize(self): """ Disconnects signals and frees resources """ self.model().sigItemChanged.disconnect(self.repoTreeItemChanged) selectionModel = self.selectionModel() # need to store reference to prevent crash in PySide selectionModel.currentChanged.disconnect(self.currentI...
python
def finalize(self): """ Disconnects signals and frees resources """ self.model().sigItemChanged.disconnect(self.repoTreeItemChanged) selectionModel = self.selectionModel() # need to store reference to prevent crash in PySide selectionModel.currentChanged.disconnect(self.currentI...
[ "def", "finalize", "(", "self", ")", ":", "self", ".", "model", "(", ")", ".", "sigItemChanged", ".", "disconnect", "(", "self", ".", "repoTreeItemChanged", ")", "selectionModel", "=", "self", ".", "selectionModel", "(", ")", "# need to store reference to preven...
Disconnects signals and frees resources
[ "Disconnects", "signals", "and", "frees", "resources" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/repotreeview.py#L127-L133
titusjan/argos
argos/repo/repotreeview.py
RepoTreeView.contextMenuEvent
def contextMenuEvent(self, event): """ Creates and executes the context menu for the tree view """ menu = QtWidgets.QMenu(self) for action in self.actions(): menu.addAction(action) openAsMenu = self.createOpenAsMenu(parent=menu) menu.insertMenu(self.closeIte...
python
def contextMenuEvent(self, event): """ Creates and executes the context menu for the tree view """ menu = QtWidgets.QMenu(self) for action in self.actions(): menu.addAction(action) openAsMenu = self.createOpenAsMenu(parent=menu) menu.insertMenu(self.closeIte...
[ "def", "contextMenuEvent", "(", "self", ",", "event", ")", ":", "menu", "=", "QtWidgets", ".", "QMenu", "(", "self", ")", "for", "action", "in", "self", ".", "actions", "(", ")", ":", "menu", ".", "addAction", "(", "action", ")", "openAsMenu", "=", "...
Creates and executes the context menu for the tree view
[ "Creates", "and", "executes", "the", "context", "menu", "for", "the", "tree", "view" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/repotreeview.py#L136-L147
titusjan/argos
argos/repo/repotreeview.py
RepoTreeView.createOpenAsMenu
def createOpenAsMenu(self, parent=None): """ Creates the submenu for the Open As choice """ openAsMenu = QtWidgets.QMenu(parent=parent) openAsMenu.setTitle("Open Item As") registry = globalRtiRegistry() for rtiRegItem in registry.items: #rtiRegItem.tryImportC...
python
def createOpenAsMenu(self, parent=None): """ Creates the submenu for the Open As choice """ openAsMenu = QtWidgets.QMenu(parent=parent) openAsMenu.setTitle("Open Item As") registry = globalRtiRegistry() for rtiRegItem in registry.items: #rtiRegItem.tryImportC...
[ "def", "createOpenAsMenu", "(", "self", ",", "parent", "=", "None", ")", ":", "openAsMenu", "=", "QtWidgets", ".", "QMenu", "(", "parent", "=", "parent", ")", "openAsMenu", ".", "setTitle", "(", "\"Open Item As\"", ")", "registry", "=", "globalRtiRegistry", ...
Creates the submenu for the Open As choice
[ "Creates", "the", "submenu", "for", "the", "Open", "As", "choice" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/repotreeview.py#L150-L169
titusjan/argos
argos/repo/repotreeview.py
RepoTreeView.openCurrentItem
def openCurrentItem(self): """ Opens the current item in the repository. """ logger.debug("openCurrentItem") _currentItem, currentIndex = self.getCurrentItem() if not currentIndex.isValid(): return # Expanding the node will call indirectly call RepoTreeModel....
python
def openCurrentItem(self): """ Opens the current item in the repository. """ logger.debug("openCurrentItem") _currentItem, currentIndex = self.getCurrentItem() if not currentIndex.isValid(): return # Expanding the node will call indirectly call RepoTreeModel....
[ "def", "openCurrentItem", "(", "self", ")", ":", "logger", ".", "debug", "(", "\"openCurrentItem\"", ")", "_currentItem", ",", "currentIndex", "=", "self", ".", "getCurrentItem", "(", ")", "if", "not", "currentIndex", ".", "isValid", "(", ")", ":", "return",...
Opens the current item in the repository.
[ "Opens", "the", "current", "item", "in", "the", "repository", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/repotreeview.py#L201-L213
titusjan/argos
argos/repo/repotreeview.py
RepoTreeView.closeCurrentItem
def closeCurrentItem(self): """ Closes the current item in the repository. All its children will be unfetched and closed. """ logger.debug("closeCurrentItem") currentItem, currentIndex = self.getCurrentItem() if not currentIndex.isValid(): return ...
python
def closeCurrentItem(self): """ Closes the current item in the repository. All its children will be unfetched and closed. """ logger.debug("closeCurrentItem") currentItem, currentIndex = self.getCurrentItem() if not currentIndex.isValid(): return ...
[ "def", "closeCurrentItem", "(", "self", ")", ":", "logger", ".", "debug", "(", "\"closeCurrentItem\"", ")", "currentItem", ",", "currentIndex", "=", "self", ".", "getCurrentItem", "(", ")", "if", "not", "currentIndex", ".", "isValid", "(", ")", ":", "return"...
Closes the current item in the repository. All its children will be unfetched and closed.
[ "Closes", "the", "current", "item", "in", "the", "repository", ".", "All", "its", "children", "will", "be", "unfetched", "and", "closed", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/repotreeview.py#L217-L233
titusjan/argos
argos/repo/repotreeview.py
RepoTreeView.removeCurrentItem
def removeCurrentItem(self): """ Removes the current item from the repository tree. """ logger.debug("removeCurrentFile") currentIndex = self.getRowCurrentIndex() if not currentIndex.isValid(): return self.model().deleteItemAtIndex(currentIndex)
python
def removeCurrentItem(self): """ Removes the current item from the repository tree. """ logger.debug("removeCurrentFile") currentIndex = self.getRowCurrentIndex() if not currentIndex.isValid(): return self.model().deleteItemAtIndex(currentIndex)
[ "def", "removeCurrentItem", "(", "self", ")", ":", "logger", ".", "debug", "(", "\"removeCurrentFile\"", ")", "currentIndex", "=", "self", ".", "getRowCurrentIndex", "(", ")", "if", "not", "currentIndex", ".", "isValid", "(", ")", ":", "return", "self", ".",...
Removes the current item from the repository tree.
[ "Removes", "the", "current", "item", "from", "the", "repository", "tree", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/repotreeview.py#L253-L261
titusjan/argos
argos/repo/repotreeview.py
RepoTreeView.reloadFileOfCurrentItem
def reloadFileOfCurrentItem(self, rtiRegItem=None): """ Finds the repo tree item that holds the file of the current item and reloads it. Reloading is done by removing the repo tree item and inserting a new one. The new item will have by of type rtiRegItem.cls. If rtiRegItem is None (the...
python
def reloadFileOfCurrentItem(self, rtiRegItem=None): """ Finds the repo tree item that holds the file of the current item and reloads it. Reloading is done by removing the repo tree item and inserting a new one. The new item will have by of type rtiRegItem.cls. If rtiRegItem is None (the...
[ "def", "reloadFileOfCurrentItem", "(", "self", ",", "rtiRegItem", "=", "None", ")", ":", "logger", ".", "debug", "(", "\"reloadFileOfCurrentItem, rtiClass={}\"", ".", "format", "(", "rtiRegItem", ")", ")", "currentIndex", "=", "self", ".", "getRowCurrentIndex", "(...
Finds the repo tree item that holds the file of the current item and reloads it. Reloading is done by removing the repo tree item and inserting a new one. The new item will have by of type rtiRegItem.cls. If rtiRegItem is None (the default), the new rtiClass will be the same as the ...
[ "Finds", "the", "repo", "tree", "item", "that", "holds", "the", "file", "of", "the", "current", "item", "and", "reloads", "it", ".", "Reloading", "is", "done", "by", "removing", "the", "repo", "tree", "item", "and", "inserting", "a", "new", "one", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/repotreeview.py#L265-L305
titusjan/argos
argos/repo/repotreeview.py
RepoTreeView.repoTreeItemChanged
def repoTreeItemChanged(self, rti): """ Called when repo tree item has changed (the item itself, not a new selection) If the item is the currently selected item, the the collector (inspector) and metadata widgets are updated. """ logger.debug("onItemChanged: {}".format(r...
python
def repoTreeItemChanged(self, rti): """ Called when repo tree item has changed (the item itself, not a new selection) If the item is the currently selected item, the the collector (inspector) and metadata widgets are updated. """ logger.debug("onItemChanged: {}".format(r...
[ "def", "repoTreeItemChanged", "(", "self", ",", "rti", ")", ":", "logger", ".", "debug", "(", "\"onItemChanged: {}\"", ".", "format", "(", "rti", ")", ")", "currentItem", ",", "_currentIndex", "=", "self", ".", "getCurrentItem", "(", ")", "if", "rti", "=="...
Called when repo tree item has changed (the item itself, not a new selection) If the item is the currently selected item, the the collector (inspector) and metadata widgets are updated.
[ "Called", "when", "repo", "tree", "item", "has", "changed", "(", "the", "item", "itself", "not", "a", "new", "selection", ")" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/repotreeview.py#L320-L332
titusjan/argos
argos/repo/repotreeview.py
RepoTreeView.currentRepoTreeItemChanged
def currentRepoTreeItemChanged(self): """ Called to update the GUI when a repo tree item has changed or a new one was selected. """ # When the model is empty the current index may be invalid and the currentItem may be None. currentItem, currentIndex = self.getCurrentItem() hasCu...
python
def currentRepoTreeItemChanged(self): """ Called to update the GUI when a repo tree item has changed or a new one was selected. """ # When the model is empty the current index may be invalid and the currentItem may be None. currentItem, currentIndex = self.getCurrentItem() hasCu...
[ "def", "currentRepoTreeItemChanged", "(", "self", ")", ":", "# When the model is empty the current index may be invalid and the currentItem may be None.", "currentItem", ",", "currentIndex", "=", "self", ".", "getCurrentItem", "(", ")", "hasCurrent", "=", "currentIndex", ".", ...
Called to update the GUI when a repo tree item has changed or a new one was selected.
[ "Called", "to", "update", "the", "GUI", "when", "a", "repo", "tree", "item", "has", "changed", "or", "a", "new", "one", "was", "selected", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/repotreeview.py#L335-L365
titusjan/argos
argos/qt/misc.py
initQApplication
def initQApplication(): """ Initializes the QtWidgets.QApplication instance. Creates one if it doesn't exist. Sets Argos specific attributes, such as the OrganizationName, so that the application persistent settings are read/written to the correct settings file/winreg. It is therefore impor...
python
def initQApplication(): """ Initializes the QtWidgets.QApplication instance. Creates one if it doesn't exist. Sets Argos specific attributes, such as the OrganizationName, so that the application persistent settings are read/written to the correct settings file/winreg. It is therefore impor...
[ "def", "initQApplication", "(", ")", ":", "# PyQtGraph recommends raster graphics system for OS-X.", "if", "'darwin'", "in", "sys", ".", "platform", ":", "graphicsSystem", "=", "\"raster\"", "# raster, native or opengl", "os", ".", "environ", ".", "setdefault", "(", "'Q...
Initializes the QtWidgets.QApplication instance. Creates one if it doesn't exist. Sets Argos specific attributes, such as the OrganizationName, so that the application persistent settings are read/written to the correct settings file/winreg. It is therefore important to call this function at st...
[ "Initializes", "the", "QtWidgets", ".", "QApplication", "instance", ".", "Creates", "one", "if", "it", "doesn", "t", "exist", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/misc.py#L116-L133
titusjan/argos
argos/qt/misc.py
initArgosApplicationSettings
def initArgosApplicationSettings(app): # TODO: this is Argos specific. Move somewhere else. """ Sets Argos specific attributes, such as the OrganizationName, so that the application persistent settings are read/written to the correct settings file/winreg. It is therefore important to call this funct...
python
def initArgosApplicationSettings(app): # TODO: this is Argos specific. Move somewhere else. """ Sets Argos specific attributes, such as the OrganizationName, so that the application persistent settings are read/written to the correct settings file/winreg. It is therefore important to call this funct...
[ "def", "initArgosApplicationSettings", "(", "app", ")", ":", "# TODO: this is Argos specific. Move somewhere else.", "assert", "app", ",", "\"app undefined. Call QtWidgets.QApplication.instance() or QtCor.QApplication.instance() first.\"", "logger", ".", "debug", "(", "\"Setting Argos ...
Sets Argos specific attributes, such as the OrganizationName, so that the application persistent settings are read/written to the correct settings file/winreg. It is therefore important to call this function at startup. The ArgosApplication constructor does this.
[ "Sets", "Argos", "specific", "attributes", "such", "as", "the", "OrganizationName", "so", "that", "the", "application", "persistent", "settings", "are", "read", "/", "written", "to", "the", "correct", "settings", "file", "/", "winreg", ".", "It", "is", "theref...
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/misc.py#L136-L148
titusjan/argos
argos/qt/misc.py
removeSettingsGroup
def removeSettingsGroup(groupName, settings=None): """ Removes a group from the persistent settings """ logger.debug("Removing settings group: {}".format(groupName)) settings = QtCore.QSettings() if settings is None else settings settings.remove(groupName)
python
def removeSettingsGroup(groupName, settings=None): """ Removes a group from the persistent settings """ logger.debug("Removing settings group: {}".format(groupName)) settings = QtCore.QSettings() if settings is None else settings settings.remove(groupName)
[ "def", "removeSettingsGroup", "(", "groupName", ",", "settings", "=", "None", ")", ":", "logger", ".", "debug", "(", "\"Removing settings group: {}\"", ".", "format", "(", "groupName", ")", ")", "settings", "=", "QtCore", ".", "QSettings", "(", ")", "if", "s...
Removes a group from the persistent settings
[ "Removes", "a", "group", "from", "the", "persistent", "settings" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/misc.py#L217-L222
titusjan/argos
argos/qt/misc.py
containsSettingsGroup
def containsSettingsGroup(groupName, settings=None): """ Returns True if the settings contain a group with the name groupName. Works recursively when the groupName is a slash separated path. """ def _containsPath(path, settings): "Aux function for containsSettingsGroup. Does the actual recur...
python
def containsSettingsGroup(groupName, settings=None): """ Returns True if the settings contain a group with the name groupName. Works recursively when the groupName is a slash separated path. """ def _containsPath(path, settings): "Aux function for containsSettingsGroup. Does the actual recur...
[ "def", "containsSettingsGroup", "(", "groupName", ",", "settings", "=", "None", ")", ":", "def", "_containsPath", "(", "path", ",", "settings", ")", ":", "\"Aux function for containsSettingsGroup. Does the actual recursive search.\"", "if", "len", "(", "path", ")", "=...
Returns True if the settings contain a group with the name groupName. Works recursively when the groupName is a slash separated path.
[ "Returns", "True", "if", "the", "settings", "contain", "a", "group", "with", "the", "name", "groupName", ".", "Works", "recursively", "when", "the", "groupName", "is", "a", "slash", "separated", "path", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/misc.py#L225-L249
titusjan/argos
argos/qt/misc.py
printChildren
def printChildren(obj, indent=""): """ Recursively prints the children of a QObject. Useful for debugging. """ children=obj.children() if children==None: return for child in children: try: childName = child.objectName() except AttributeError: childName...
python
def printChildren(obj, indent=""): """ Recursively prints the children of a QObject. Useful for debugging. """ children=obj.children() if children==None: return for child in children: try: childName = child.objectName() except AttributeError: childName...
[ "def", "printChildren", "(", "obj", ",", "indent", "=", "\"\"", ")", ":", "children", "=", "obj", ".", "children", "(", ")", "if", "children", "==", "None", ":", "return", "for", "child", "in", "children", ":", "try", ":", "childName", "=", "child", ...
Recursively prints the children of a QObject. Useful for debugging.
[ "Recursively", "prints", "the", "children", "of", "a", "QObject", ".", "Useful", "for", "debugging", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/misc.py#L255-L269
titusjan/argos
argos/qt/misc.py
printAllWidgets
def printAllWidgets(qApplication, ofType=None): """ Prints list of all widgets to stdout (for debugging) """ print ("Application's widgets {}".format(('of type: ' + str(ofType)) if ofType else '')) for widget in qApplication.allWidgets(): if ofType is None or isinstance(widget, ofType): ...
python
def printAllWidgets(qApplication, ofType=None): """ Prints list of all widgets to stdout (for debugging) """ print ("Application's widgets {}".format(('of type: ' + str(ofType)) if ofType else '')) for widget in qApplication.allWidgets(): if ofType is None or isinstance(widget, ofType): ...
[ "def", "printAllWidgets", "(", "qApplication", ",", "ofType", "=", "None", ")", ":", "print", "(", "\"Application's widgets {}\"", ".", "format", "(", "(", "'of type: '", "+", "str", "(", "ofType", ")", ")", "if", "ofType", "else", "''", ")", ")", "for", ...
Prints list of all widgets to stdout (for debugging)
[ "Prints", "list", "of", "all", "widgets", "to", "stdout", "(", "for", "debugging", ")" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/misc.py#L272-L278
titusjan/argos
argos/qt/misc.py
widgetSubCheckBoxRect
def widgetSubCheckBoxRect(widget, option): """ Returns the rectangle of a check box drawn as a sub element of widget """ opt = QtWidgets.QStyleOption() opt.initFrom(widget) style = widget.style() return style.subElementRect(QtWidgets.QStyle.SE_ViewItemCheckIndicator, opt, widget)
python
def widgetSubCheckBoxRect(widget, option): """ Returns the rectangle of a check box drawn as a sub element of widget """ opt = QtWidgets.QStyleOption() opt.initFrom(widget) style = widget.style() return style.subElementRect(QtWidgets.QStyle.SE_ViewItemCheckIndicator, opt, widget)
[ "def", "widgetSubCheckBoxRect", "(", "widget", ",", "option", ")", ":", "opt", "=", "QtWidgets", ".", "QStyleOption", "(", ")", "opt", ".", "initFrom", "(", "widget", ")", "style", "=", "widget", ".", "style", "(", ")", "return", "style", ".", "subElemen...
Returns the rectangle of a check box drawn as a sub element of widget
[ "Returns", "the", "rectangle", "of", "a", "check", "box", "drawn", "as", "a", "sub", "element", "of", "widget" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/misc.py#L286-L292
titusjan/argos
argos/qt/misc.py
ResizeDetailsMessageBox.resizeEvent
def resizeEvent(self, event): """ Resizes the details box if present (i.e. when 'Show Details' button was clicked) """ result = super(ResizeDetailsMessageBox, self).resizeEvent(event) details_box = self.findChild(QtWidgets.QTextEdit) if details_box is not None: #deta...
python
def resizeEvent(self, event): """ Resizes the details box if present (i.e. when 'Show Details' button was clicked) """ result = super(ResizeDetailsMessageBox, self).resizeEvent(event) details_box = self.findChild(QtWidgets.QTextEdit) if details_box is not None: #deta...
[ "def", "resizeEvent", "(", "self", ",", "event", ")", ":", "result", "=", "super", "(", "ResizeDetailsMessageBox", ",", "self", ")", ".", "resizeEvent", "(", "event", ")", "details_box", "=", "self", ".", "findChild", "(", "QtWidgets", ".", "QTextEdit", ")...
Resizes the details box if present (i.e. when 'Show Details' button was clicked)
[ "Resizes", "the", "details", "box", "if", "present", "(", "i", ".", "e", ".", "when", "Show", "Details", "button", "was", "clicked", ")" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/qt/misc.py#L173-L183
titusjan/argos
argos/repo/detailplugins/attr.py
AttributesPane._drawContents
def _drawContents(self, currentRti=None): """ Draws the attributes of the currentRTI """ #logger.debug("_drawContents: {}".format(currentRti)) table = self.table table.setUpdatesEnabled(False) try: table.clearContents() verticalHeader = table.verti...
python
def _drawContents(self, currentRti=None): """ Draws the attributes of the currentRTI """ #logger.debug("_drawContents: {}".format(currentRti)) table = self.table table.setUpdatesEnabled(False) try: table.clearContents() verticalHeader = table.verti...
[ "def", "_drawContents", "(", "self", ",", "currentRti", "=", "None", ")", ":", "#logger.debug(\"_drawContents: {}\".format(currentRti))", "table", "=", "self", ".", "table", "table", ".", "setUpdatesEnabled", "(", "False", ")", "try", ":", "table", ".", "clearCont...
Draws the attributes of the currentRTI
[ "Draws", "the", "attributes", "of", "the", "currentRTI" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/repo/detailplugins/attr.py#L51-L86
titusjan/argos
argos/inspector/abstract.py
UpdateReason.checkValid
def checkValid(cls, reason): """ Raises ValueError if the reason is not one of the valid enumerations """ if reason not in cls.__VALID_REASONS: raise ValueError("reason must be one of {}, got {}".format(cls.__VALID_REASONS, reason))
python
def checkValid(cls, reason): """ Raises ValueError if the reason is not one of the valid enumerations """ if reason not in cls.__VALID_REASONS: raise ValueError("reason must be one of {}, got {}".format(cls.__VALID_REASONS, reason))
[ "def", "checkValid", "(", "cls", ",", "reason", ")", ":", "if", "reason", "not", "in", "cls", ".", "__VALID_REASONS", ":", "raise", "ValueError", "(", "\"reason must be one of {}, got {}\"", ".", "format", "(", "cls", ".", "__VALID_REASONS", ",", "reason", ")"...
Raises ValueError if the reason is not one of the valid enumerations
[ "Raises", "ValueError", "if", "the", "reason", "is", "not", "one", "of", "the", "valid", "enumerations" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/abstract.py#L60-L64
titusjan/argos
argos/inspector/abstract.py
AbstractInspector.updateContents
def updateContents(self, reason=None, initiator=None): # TODO: reason mandatory? """ Tries to draw the widget contents with the updated RTI. Shows the error page in case an exception is raised while drawing the contents. Descendants should override _drawContents, not updateContents. ...
python
def updateContents(self, reason=None, initiator=None): # TODO: reason mandatory? """ Tries to draw the widget contents with the updated RTI. Shows the error page in case an exception is raised while drawing the contents. Descendants should override _drawContents, not updateContents. ...
[ "def", "updateContents", "(", "self", ",", "reason", "=", "None", ",", "initiator", "=", "None", ")", ":", "# TODO: reason mandatory?", "UpdateReason", ".", "checkValid", "(", "reason", ")", "logger", ".", "debug", "(", "\"---- Inspector updateContents, reason: {}, ...
Tries to draw the widget contents with the updated RTI. Shows the error page in case an exception is raised while drawing the contents. Descendants should override _drawContents, not updateContents. During the call of _drawContents, the updating of the configuration tree is blocked ...
[ "Tries", "to", "draw", "the", "widget", "contents", "with", "the", "updated", "RTI", ".", "Shows", "the", "error", "page", "in", "case", "an", "exception", "is", "raised", "while", "drawing", "the", "contents", ".", "Descendants", "should", "override", "_dra...
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/abstract.py#L167-L222
titusjan/argos
argos/inspector/abstract.py
AbstractInspector._showError
def _showError(self, msg="", title="Error"): """ Shows an error message. """ self.errorWidget.setError(msg=msg, title=title)
python
def _showError(self, msg="", title="Error"): """ Shows an error message. """ self.errorWidget.setError(msg=msg, title=title)
[ "def", "_showError", "(", "self", ",", "msg", "=", "\"\"", ",", "title", "=", "\"Error\"", ")", ":", "self", ".", "errorWidget", ".", "setError", "(", "msg", "=", "msg", ",", "title", "=", "title", ")" ]
Shows an error message.
[ "Shows", "an", "error", "message", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/inspector/abstract.py#L244-L247
titusjan/argos
argos/config/choicecti.py
ChoiceCti._enforceDataType
def _enforceDataType(self, data): """ Converts to int so that this CTI always stores that type. The data be set to a negative value, e.g. use -1 to select the last item by default. However, it will be converted to a positive by this method. """ idx = int(data) if...
python
def _enforceDataType(self, data): """ Converts to int so that this CTI always stores that type. The data be set to a negative value, e.g. use -1 to select the last item by default. However, it will be converted to a positive by this method. """ idx = int(data) if...
[ "def", "_enforceDataType", "(", "self", ",", "data", ")", ":", "idx", "=", "int", "(", "data", ")", "if", "idx", "<", "0", ":", "idx", "+=", "len", "(", "self", ".", "_displayValues", ")", "assert", "0", "<=", "idx", "<", "len", "(", "self", ".",...
Converts to int so that this CTI always stores that type. The data be set to a negative value, e.g. use -1 to select the last item by default. However, it will be converted to a positive by this method.
[ "Converts", "to", "int", "so", "that", "this", "CTI", "always", "stores", "that", "type", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/choicecti.py#L91-L102
titusjan/argos
argos/config/choicecti.py
ChoiceCti._nodeGetNonDefaultsDict
def _nodeGetNonDefaultsDict(self): """ Retrieves this nodes` values as a dictionary to be used for persistence. Non-recursive auxiliary function for getNonDefaultsDict """ dct = super(ChoiceCti, self)._nodeGetNonDefaultsDict() if self._configValues != self._defaultConfigValue...
python
def _nodeGetNonDefaultsDict(self): """ Retrieves this nodes` values as a dictionary to be used for persistence. Non-recursive auxiliary function for getNonDefaultsDict """ dct = super(ChoiceCti, self)._nodeGetNonDefaultsDict() if self._configValues != self._defaultConfigValue...
[ "def", "_nodeGetNonDefaultsDict", "(", "self", ")", ":", "dct", "=", "super", "(", "ChoiceCti", ",", "self", ")", ".", "_nodeGetNonDefaultsDict", "(", ")", "if", "self", ".", "_configValues", "!=", "self", ".", "_defaultConfigValues", ":", "dct", "[", "'choi...
Retrieves this nodes` values as a dictionary to be used for persistence. Non-recursive auxiliary function for getNonDefaultsDict
[ "Retrieves", "this", "nodes", "values", "as", "a", "dictionary", "to", "be", "used", "for", "persistence", ".", "Non", "-", "recursive", "auxiliary", "function", "for", "getNonDefaultsDict" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/choicecti.py#L133-L141
titusjan/argos
argos/config/choicecti.py
ChoiceCti._nodeSetValuesFromDict
def _nodeSetValuesFromDict(self, dct): """ Sets values from a dictionary in the current node. Non-recursive auxiliary function for setValuesFromDict """ if 'choices' in dct: self._configValues = list(dct['choices']) self._displayValues = list(dct['choices']) ...
python
def _nodeSetValuesFromDict(self, dct): """ Sets values from a dictionary in the current node. Non-recursive auxiliary function for setValuesFromDict """ if 'choices' in dct: self._configValues = list(dct['choices']) self._displayValues = list(dct['choices']) ...
[ "def", "_nodeSetValuesFromDict", "(", "self", ",", "dct", ")", ":", "if", "'choices'", "in", "dct", ":", "self", ".", "_configValues", "=", "list", "(", "dct", "[", "'choices'", "]", ")", "self", ".", "_displayValues", "=", "list", "(", "dct", "[", "'c...
Sets values from a dictionary in the current node. Non-recursive auxiliary function for setValuesFromDict
[ "Sets", "values", "from", "a", "dictionary", "in", "the", "current", "node", ".", "Non", "-", "recursive", "auxiliary", "function", "for", "setValuesFromDict" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/choicecti.py#L144-L151
titusjan/argos
argos/config/choicecti.py
ChoiceCti.createEditor
def createEditor(self, delegate, parent, option): """ Creates a ChoiceCtiEditor. For the parameters see the AbstractCti constructor documentation. """ return ChoiceCtiEditor(self, delegate, parent=parent)
python
def createEditor(self, delegate, parent, option): """ Creates a ChoiceCtiEditor. For the parameters see the AbstractCti constructor documentation. """ return ChoiceCtiEditor(self, delegate, parent=parent)
[ "def", "createEditor", "(", "self", ",", "delegate", ",", "parent", ",", "option", ")", ":", "return", "ChoiceCtiEditor", "(", "self", ",", "delegate", ",", "parent", "=", "parent", ")" ]
Creates a ChoiceCtiEditor. For the parameters see the AbstractCti constructor documentation.
[ "Creates", "a", "ChoiceCtiEditor", ".", "For", "the", "parameters", "see", "the", "AbstractCti", "constructor", "documentation", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/choicecti.py#L161-L165
titusjan/argos
argos/config/choicecti.py
ChoiceCti.insertValue
def insertValue(self, pos, configValue, displayValue=None): """ Will insert the configValue in the configValues and the displayValue in the displayValues list. If displayValue is None, the configValue is set in the displayValues as well """ self._configValues.insert(pos, ...
python
def insertValue(self, pos, configValue, displayValue=None): """ Will insert the configValue in the configValues and the displayValue in the displayValues list. If displayValue is None, the configValue is set in the displayValues as well """ self._configValues.insert(pos, ...
[ "def", "insertValue", "(", "self", ",", "pos", ",", "configValue", ",", "displayValue", "=", "None", ")", ":", "self", ".", "_configValues", ".", "insert", "(", "pos", ",", "configValue", ")", "self", ".", "_displayValues", ".", "insert", "(", "pos", ","...
Will insert the configValue in the configValues and the displayValue in the displayValues list. If displayValue is None, the configValue is set in the displayValues as well
[ "Will", "insert", "the", "configValue", "in", "the", "configValues", "and", "the", "displayValue", "in", "the", "displayValues", "list", ".", "If", "displayValue", "is", "None", "the", "configValue", "is", "set", "in", "the", "displayValues", "as", "well" ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/choicecti.py#L168-L174
titusjan/argos
argos/config/choicecti.py
ChoiceCtiEditor.finalize
def finalize(self): """ Is called when the editor is closed. Disconnect signals. """ self._comboboxListView.removeEventFilter(self) self.comboBox.model().rowsInserted.disconnect(self.comboBoxRowsInserted) self.comboBox.activated.disconnect(self.comboBoxActivated) super(Ch...
python
def finalize(self): """ Is called when the editor is closed. Disconnect signals. """ self._comboboxListView.removeEventFilter(self) self.comboBox.model().rowsInserted.disconnect(self.comboBoxRowsInserted) self.comboBox.activated.disconnect(self.comboBoxActivated) super(Ch...
[ "def", "finalize", "(", "self", ")", ":", "self", ".", "_comboboxListView", ".", "removeEventFilter", "(", "self", ")", "self", ".", "comboBox", ".", "model", "(", ")", ".", "rowsInserted", ".", "disconnect", "(", "self", ".", "comboBoxRowsInserted", ")", ...
Is called when the editor is closed. Disconnect signals.
[ "Is", "called", "when", "the", "editor", "is", "closed", ".", "Disconnect", "signals", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/choicecti.py#L220-L226
titusjan/argos
argos/config/choicecti.py
ChoiceCtiEditor.comboBoxRowsInserted
def comboBoxRowsInserted(self, _parent, start, end): """ Called when the user has entered a new value in the combobox. Puts the combobox values back into the cti. """ assert start == end, "Bug, please report: more than one row inserted" configValue = self.comboBox.itemText(st...
python
def comboBoxRowsInserted(self, _parent, start, end): """ Called when the user has entered a new value in the combobox. Puts the combobox values back into the cti. """ assert start == end, "Bug, please report: more than one row inserted" configValue = self.comboBox.itemText(st...
[ "def", "comboBoxRowsInserted", "(", "self", ",", "_parent", ",", "start", ",", "end", ")", ":", "assert", "start", "==", "end", ",", "\"Bug, please report: more than one row inserted\"", "configValue", "=", "self", ".", "comboBox", ".", "itemText", "(", "start", ...
Called when the user has entered a new value in the combobox. Puts the combobox values back into the cti.
[ "Called", "when", "the", "user", "has", "entered", "a", "new", "value", "in", "the", "combobox", ".", "Puts", "the", "combobox", "values", "back", "into", "the", "cti", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/choicecti.py#L250-L258
titusjan/argos
argos/config/choicecti.py
ChoiceCtiEditor.eventFilter
def eventFilter(self, watchedObject, event): """ Deletes an item from an editable combobox when the delete or backspace key is pressed in the list of items, or when ctrl-delete or ctrl-back space is pressed in the line-edit. When the combobox is not editable the filter does ...
python
def eventFilter(self, watchedObject, event): """ Deletes an item from an editable combobox when the delete or backspace key is pressed in the list of items, or when ctrl-delete or ctrl-back space is pressed in the line-edit. When the combobox is not editable the filter does ...
[ "def", "eventFilter", "(", "self", ",", "watchedObject", ",", "event", ")", ":", "if", "self", ".", "comboBox", ".", "isEditable", "(", ")", "and", "event", ".", "type", "(", ")", "==", "QtCore", ".", "QEvent", ".", "KeyPress", ":", "key", "=", "even...
Deletes an item from an editable combobox when the delete or backspace key is pressed in the list of items, or when ctrl-delete or ctrl-back space is pressed in the line-edit. When the combobox is not editable the filter does nothing.
[ "Deletes", "an", "item", "from", "an", "editable", "combobox", "when", "the", "delete", "or", "backspace", "key", "is", "pressed", "in", "the", "list", "of", "items", "or", "when", "ctrl", "-", "delete", "or", "ctrl", "-", "back", "space", "is", "pressed...
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/choicecti.py#L261-L285
titusjan/argos
argos/config/configtreemodel.py
ConfigTreeModel.debug
def debug(self, topLeftIndex, bottomRightIndex): """ Temporary debug to test the dataChanged signal. TODO: remove. """ if topLeftIndex.isValid() and bottomRightIndex.isValid(): topRow = topLeftIndex.row() bottomRow = bottomRightIndex.row() for row in range(top...
python
def debug(self, topLeftIndex, bottomRightIndex): """ Temporary debug to test the dataChanged signal. TODO: remove. """ if topLeftIndex.isValid() and bottomRightIndex.isValid(): topRow = topLeftIndex.row() bottomRow = bottomRightIndex.row() for row in range(top...
[ "def", "debug", "(", "self", ",", "topLeftIndex", ",", "bottomRightIndex", ")", ":", "if", "topLeftIndex", ".", "isValid", "(", ")", "and", "bottomRightIndex", ".", "isValid", "(", ")", ":", "topRow", "=", "topLeftIndex", ".", "row", "(", ")", "bottomRow",...
Temporary debug to test the dataChanged signal. TODO: remove.
[ "Temporary", "debug", "to", "test", "the", "dataChanged", "signal", ".", "TODO", ":", "remove", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/configtreemodel.py#L55-L64
titusjan/argos
argos/config/configtreemodel.py
ConfigTreeModel.flags
def flags(self, index): """ Returns the item flags for the given index. """ if not index.isValid(): return 0 cti = self.getItem(index) result = Qt.ItemIsSelectable if cti.enabled: result |= Qt.ItemIsEnabled if index.column() == self.COL...
python
def flags(self, index): """ Returns the item flags for the given index. """ if not index.isValid(): return 0 cti = self.getItem(index) result = Qt.ItemIsSelectable if cti.enabled: result |= Qt.ItemIsEnabled if index.column() == self.COL...
[ "def", "flags", "(", "self", ",", "index", ")", ":", "if", "not", "index", ".", "isValid", "(", ")", ":", "return", "0", "cti", "=", "self", ".", "getItem", "(", "index", ")", "result", "=", "Qt", ".", "ItemIsSelectable", "if", "cti", ".", "enabled...
Returns the item flags for the given index.
[ "Returns", "the", "item", "flags", "for", "the", "given", "index", "." ]
train
https://github.com/titusjan/argos/blob/20d0a3cae26c36ea789a5d219c02ca7df21279dd/argos/config/configtreemodel.py#L67-L83