repo
stringlengths
7
55
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
19
28.4k
docstring
stringlengths
1
46.9k
docstring_tokens
listlengths
1
1.97k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
3 values
summary
stringlengths
4
350
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setPenColor
def setPenColor(self, color): """ Sets the pen for this node. :param color <QColor> || None """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) self._palette.setColor(self._pal...
python
def setPenColor(self, color): """ Sets the pen for this node. :param color <QColor> || None """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) self._palette.setColor(self._pal...
[ "def", "setPenColor", "(", "self", ",", "color", ")", ":", "color", "=", "QColor", "(", "color", ")", "if", "self", ".", "_palette", "is", "None", ":", "self", ".", "_palette", "=", "XNodePalette", "(", "self", ".", "_scenePalette", ")", "self", ".", ...
Sets the pen for this node. :param color <QColor> || None
[ "Sets", "the", "pen", "for", "this", "node", ".", ":", "param", "color", "<QColor", ">", "||", "None" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1932-L1943
train
Sets the pen color for this node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setPinch
def setPinch(self, topLeft=None, topRight=None, bottomLeft=None, bottomRight=None): """ Sets the pinch amounts for this node. This will pinch in the borders based on the inputed information generating a variety of edged...
python
def setPinch(self, topLeft=None, topRight=None, bottomLeft=None, bottomRight=None): """ Sets the pinch amounts for this node. This will pinch in the borders based on the inputed information generating a variety of edged...
[ "def", "setPinch", "(", "self", ",", "topLeft", "=", "None", ",", "topRight", "=", "None", ",", "bottomLeft", "=", "None", ",", "bottomRight", "=", "None", ")", ":", "pinch", "=", "list", "(", "self", ".", "_pinch", ")", "if", "topLeft", "is", "not",...
Sets the pinch amounts for this node. This will pinch in the borders based on the inputed information generating a variety of edged shapes. If the keyword is not specified, then it will use the already existing pinch value for that section. :param left | <int> || None ...
[ "Sets", "the", "pinch", "amounts", "for", "this", "node", ".", "This", "will", "pinch", "in", "the", "borders", "based", "on", "the", "inputed", "information", "generating", "a", "variety", "of", "edged", "shapes", ".", "If", "the", "keyword", "is", "not",...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1945-L1971
train
Sets the amount of pinch in the section of this node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setPixmap
def setPixmap(self, pixmap): """ Sets the pixmap associated with this node. :param pixmap | <str> || <QtGui.QPixmap> || None """ if pixmap is not None: self._style = XNode.NodeStyle.Pixmap self._pixmap = QPixmap(pixmap) else: ...
python
def setPixmap(self, pixmap): """ Sets the pixmap associated with this node. :param pixmap | <str> || <QtGui.QPixmap> || None """ if pixmap is not None: self._style = XNode.NodeStyle.Pixmap self._pixmap = QPixmap(pixmap) else: ...
[ "def", "setPixmap", "(", "self", ",", "pixmap", ")", ":", "if", "pixmap", "is", "not", "None", ":", "self", ".", "_style", "=", "XNode", ".", "NodeStyle", ".", "Pixmap", "self", ".", "_pixmap", "=", "QPixmap", "(", "pixmap", ")", "else", ":", "self",...
Sets the pixmap associated with this node. :param pixmap | <str> || <QtGui.QPixmap> || None
[ "Sets", "the", "pixmap", "associated", "with", "this", "node", ".", ":", "param", "pixmap", "|", "<str", ">", "||", "<QtGui", ".", "QPixmap", ">", "||", "None" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1973-L1986
train
Sets the pixmap associated with this node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setRect
def setRect( self, rect ): """ Sets the rect for this node, ensuring that the width and height \ meet the minimum requirements. :param rect <QRectF> """ mwidth = self.minimumWidth() mheight = self.minimumHeight() if ( rect.wi...
python
def setRect( self, rect ): """ Sets the rect for this node, ensuring that the width and height \ meet the minimum requirements. :param rect <QRectF> """ mwidth = self.minimumWidth() mheight = self.minimumHeight() if ( rect.wi...
[ "def", "setRect", "(", "self", ",", "rect", ")", ":", "mwidth", "=", "self", ".", "minimumWidth", "(", ")", "mheight", "=", "self", ".", "minimumHeight", "(", ")", "if", "(", "rect", ".", "width", "(", ")", "<", "mwidth", ")", ":", "rect", ".", "...
Sets the rect for this node, ensuring that the width and height \ meet the minimum requirements. :param rect <QRectF>
[ "Sets", "the", "rect", "for", "this", "node", "ensuring", "that", "the", "width", "and", "height", "\\", "meet", "the", "minimum", "requirements", ".", ":", "param", "rect", "<QRectF", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1988-L2003
train
Sets the rect for this node ensuring that the width and height meet the minimum requirements.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setSnapToGrid
def setSnapToGrid( self, state = True ): """ Sets the snap to grid property for both the x and y directions \ based on the inputed value. :param state <bool> """ self._xSnapToGrid = state self._ySnapToGrid = state
python
def setSnapToGrid( self, state = True ): """ Sets the snap to grid property for both the x and y directions \ based on the inputed value. :param state <bool> """ self._xSnapToGrid = state self._ySnapToGrid = state
[ "def", "setSnapToGrid", "(", "self", ",", "state", "=", "True", ")", ":", "self", ".", "_xSnapToGrid", "=", "state", "self", ".", "_ySnapToGrid", "=", "state" ]
Sets the snap to grid property for both the x and y directions \ based on the inputed value. :param state <bool>
[ "Sets", "the", "snap", "to", "grid", "property", "for", "both", "the", "x", "and", "y", "directions", "\\", "based", "on", "the", "inputed", "value", ".", ":", "param", "state", "<bool", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L2014-L2022
train
Sets the snap to grid property for both the x and y directions
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setVisible
def setVisible( self, state ): """ Sets whether or not this node is visible in the scene. :param state | <bool> """ self._visible = state super(XNode, self).setVisible(self.isVisible()) self.dispatch.visibilityChanged.emit(state) ...
python
def setVisible( self, state ): """ Sets whether or not this node is visible in the scene. :param state | <bool> """ self._visible = state super(XNode, self).setVisible(self.isVisible()) self.dispatch.visibilityChanged.emit(state) ...
[ "def", "setVisible", "(", "self", ",", "state", ")", ":", "self", ".", "_visible", "=", "state", "super", "(", "XNode", ",", "self", ")", ".", "setVisible", "(", "self", ".", "isVisible", "(", ")", ")", "self", ".", "dispatch", ".", "visibilityChanged"...
Sets whether or not this node is visible in the scene. :param state | <bool>
[ "Sets", "whether", "or", "not", "this", "node", "is", "visible", "in", "the", "scene", ".", ":", "param", "state", "|", "<bool", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L2032-L2043
train
Sets whether or not this node is visible in the scene.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.syncLayerData
def syncLayerData(self, layerData=None): """ Syncs the layer information for this item from the given layer data. :param layerData | <dict> || None """ if not self._layer: return if not layerData: layerData = self._layer....
python
def syncLayerData(self, layerData=None): """ Syncs the layer information for this item from the given layer data. :param layerData | <dict> || None """ if not self._layer: return if not layerData: layerData = self._layer....
[ "def", "syncLayerData", "(", "self", ",", "layerData", "=", "None", ")", ":", "if", "not", "self", ".", "_layer", ":", "return", "if", "not", "layerData", ":", "layerData", "=", "self", ".", "_layer", ".", "layerData", "(", ")", "self", ".", "setVisibl...
Syncs the layer information for this item from the given layer data. :param layerData | <dict> || None
[ "Syncs", "the", "layer", "information", "for", "this", "item", "from", "the", "given", "layer", "data", ".", ":", "param", "layerData", "|", "<dict", ">", "||", "None" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L2109-L2145
train
Updates the internal state of the item based on the given layer data.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.triggerDropzoneAt
def triggerDropzoneAt( self, point, connection ): """ Triggers the connected dropzone slot at the inputed point. :param point | <QPointF> connection | <Connection> """ dropzone = self.dropzoneAt(point) if dropzone: drop...
python
def triggerDropzoneAt( self, point, connection ): """ Triggers the connected dropzone slot at the inputed point. :param point | <QPointF> connection | <Connection> """ dropzone = self.dropzoneAt(point) if dropzone: drop...
[ "def", "triggerDropzoneAt", "(", "self", ",", "point", ",", "connection", ")", ":", "dropzone", "=", "self", ".", "dropzoneAt", "(", "point", ")", "if", "dropzone", ":", "dropzone", ".", "slot", "(", ")", "(", "connection", ")" ]
Triggers the connected dropzone slot at the inputed point. :param point | <QPointF> connection | <Connection>
[ "Triggers", "the", "connected", "dropzone", "slot", "at", "the", "inputed", "point", ".", ":", "param", "point", "|", "<QPointF", ">", "connection", "|", "<Connection", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L2158-L2167
train
Triggers the connected dropzone slot at the inputed point.
core/uricore
uricore/wkz_datastructures.py
MultiDict.iteritems
def iteritems(self, multi=False): """Like :meth:`items` but returns an iterator.""" for key, values in dict.iteritems(self): if multi: for value in values: yield key, value else: yield key, values[0]
python
def iteritems(self, multi=False): """Like :meth:`items` but returns an iterator.""" for key, values in dict.iteritems(self): if multi: for value in values: yield key, value else: yield key, values[0]
[ "def", "iteritems", "(", "self", ",", "multi", "=", "False", ")", ":", "for", "key", ",", "values", "in", "dict", ".", "iteritems", "(", "self", ")", ":", "if", "multi", ":", "for", "value", "in", "values", ":", "yield", "key", ",", "value", "else"...
Like :meth:`items` but returns an iterator.
[ "Like", ":", "meth", ":", "items", "but", "returns", "an", "iterator", "." ]
dc5ef4be7bd93da4c39e5c1cbd1ae4f3ad3f1f2a
https://github.com/core/uricore/blob/dc5ef4be7bd93da4c39e5c1cbd1ae4f3ad3f1f2a/uricore/wkz_datastructures.py#L266-L273
train
Like dict. iteritems but returns an iterator.
core/uricore
uricore/wkz_datastructures.py
MultiDict.iterlists
def iterlists(self): """Like :meth:`items` but returns an iterator.""" for key, values in dict.iteritems(self): yield key, list(values)
python
def iterlists(self): """Like :meth:`items` but returns an iterator.""" for key, values in dict.iteritems(self): yield key, list(values)
[ "def", "iterlists", "(", "self", ")", ":", "for", "key", ",", "values", "in", "dict", ".", "iteritems", "(", "self", ")", ":", "yield", "key", ",", "list", "(", "values", ")" ]
Like :meth:`items` but returns an iterator.
[ "Like", ":", "meth", ":", "items", "but", "returns", "an", "iterator", "." ]
dc5ef4be7bd93da4c39e5c1cbd1ae4f3ad3f1f2a
https://github.com/core/uricore/blob/dc5ef4be7bd93da4c39e5c1cbd1ae4f3ad3f1f2a/uricore/wkz_datastructures.py#L275-L278
train
Like dict. iterlists but returns an iterator.
core/uricore
uricore/wkz_datastructures.py
MultiDict.to_dict
def to_dict(self, flat=True): """Return the contents as regular dict. If `flat` is `True` the returned dict will only have the first item present, if `flat` is `False` all values will be returned as lists. :param flat: If set to `False` the dict returned will have lists ...
python
def to_dict(self, flat=True): """Return the contents as regular dict. If `flat` is `True` the returned dict will only have the first item present, if `flat` is `False` all values will be returned as lists. :param flat: If set to `False` the dict returned will have lists ...
[ "def", "to_dict", "(", "self", ",", "flat", "=", "True", ")", ":", "if", "flat", ":", "return", "dict", "(", "self", ".", "iteritems", "(", ")", ")", "return", "dict", "(", "self", ".", "lists", "(", ")", ")" ]
Return the contents as regular dict. If `flat` is `True` the returned dict will only have the first item present, if `flat` is `False` all values will be returned as lists. :param flat: If set to `False` the dict returned will have lists with all the values in it. Otherwi...
[ "Return", "the", "contents", "as", "regular", "dict", ".", "If", "flat", "is", "True", "the", "returned", "dict", "will", "only", "have", "the", "first", "item", "present", "if", "flat", "is", "False", "all", "values", "will", "be", "returned", "as", "li...
dc5ef4be7bd93da4c39e5c1cbd1ae4f3ad3f1f2a
https://github.com/core/uricore/blob/dc5ef4be7bd93da4c39e5c1cbd1ae4f3ad3f1f2a/uricore/wkz_datastructures.py#L293-L305
train
Return the contents as regular dict.
core/uricore
uricore/wkz_datastructures.py
MultiDict.update
def update(self, other_dict): """update() extends rather than replaces existing key lists.""" for key, value in iter_multi_items(other_dict): MultiDict.add(self, key, value)
python
def update(self, other_dict): """update() extends rather than replaces existing key lists.""" for key, value in iter_multi_items(other_dict): MultiDict.add(self, key, value)
[ "def", "update", "(", "self", ",", "other_dict", ")", ":", "for", "key", ",", "value", "in", "iter_multi_items", "(", "other_dict", ")", ":", "MultiDict", ".", "add", "(", "self", ",", "key", ",", "value", ")" ]
update() extends rather than replaces existing key lists.
[ "update", "()", "extends", "rather", "than", "replaces", "existing", "key", "lists", "." ]
dc5ef4be7bd93da4c39e5c1cbd1ae4f3ad3f1f2a
https://github.com/core/uricore/blob/dc5ef4be7bd93da4c39e5c1cbd1ae4f3ad3f1f2a/uricore/wkz_datastructures.py#L307-L310
train
update method extends rather than replaces existing key lists.
core/uricore
uricore/wkz_datastructures.py
MultiDict.pop
def pop(self, key, default=_missing): """Pop the first item for a list on the dict. Afterwards the key is removed from the dict, so additional values are discarded: >>> d = MultiDict({"foo": [1, 2, 3]}) >>> d.pop("foo") 1 >>> "foo" in d False :param key...
python
def pop(self, key, default=_missing): """Pop the first item for a list on the dict. Afterwards the key is removed from the dict, so additional values are discarded: >>> d = MultiDict({"foo": [1, 2, 3]}) >>> d.pop("foo") 1 >>> "foo" in d False :param key...
[ "def", "pop", "(", "self", ",", "key", ",", "default", "=", "_missing", ")", ":", "try", ":", "return", "dict", ".", "pop", "(", "self", ",", "key", ")", "[", "0", "]", "except", "KeyError", ",", "e", ":", "if", "default", "is", "not", "_missing"...
Pop the first item for a list on the dict. Afterwards the key is removed from the dict, so additional values are discarded: >>> d = MultiDict({"foo": [1, 2, 3]}) >>> d.pop("foo") 1 >>> "foo" in d False :param key: the key to pop. :param default: if prov...
[ "Pop", "the", "first", "item", "for", "a", "list", "on", "the", "dict", ".", "Afterwards", "the", "key", "is", "removed", "from", "the", "dict", "so", "additional", "values", "are", "discarded", ":" ]
dc5ef4be7bd93da4c39e5c1cbd1ae4f3ad3f1f2a
https://github.com/core/uricore/blob/dc5ef4be7bd93da4c39e5c1cbd1ae4f3ad3f1f2a/uricore/wkz_datastructures.py#L312-L331
train
Pop the first item for a list on the dict.
core/uricore
uricore/wkz_datastructures.py
MultiDict.popitem
def popitem(self): """Pop an item from the dict.""" try: item = dict.popitem(self) return (item[0], item[1][0]) except KeyError, e: raise BadRequestKeyError(str(e))
python
def popitem(self): """Pop an item from the dict.""" try: item = dict.popitem(self) return (item[0], item[1][0]) except KeyError, e: raise BadRequestKeyError(str(e))
[ "def", "popitem", "(", "self", ")", ":", "try", ":", "item", "=", "dict", ".", "popitem", "(", "self", ")", "return", "(", "item", "[", "0", "]", ",", "item", "[", "1", "]", "[", "0", "]", ")", "except", "KeyError", ",", "e", ":", "raise", "B...
Pop an item from the dict.
[ "Pop", "an", "item", "from", "the", "dict", "." ]
dc5ef4be7bd93da4c39e5c1cbd1ae4f3ad3f1f2a
https://github.com/core/uricore/blob/dc5ef4be7bd93da4c39e5c1cbd1ae4f3ad3f1f2a/uricore/wkz_datastructures.py#L333-L339
train
Pop an item from the dict.
core/uricore
uricore/wkz_datastructures.py
MultiDict.popitemlist
def popitemlist(self): """Pop a ``(key, list)`` tuple from the dict.""" try: return dict.popitem(self) except KeyError, e: raise BadRequestKeyError(str(e))
python
def popitemlist(self): """Pop a ``(key, list)`` tuple from the dict.""" try: return dict.popitem(self) except KeyError, e: raise BadRequestKeyError(str(e))
[ "def", "popitemlist", "(", "self", ")", ":", "try", ":", "return", "dict", ".", "popitem", "(", "self", ")", "except", "KeyError", ",", "e", ":", "raise", "BadRequestKeyError", "(", "str", "(", "e", ")", ")" ]
Pop a ``(key, list)`` tuple from the dict.
[ "Pop", "a", "(", "key", "list", ")", "tuple", "from", "the", "dict", "." ]
dc5ef4be7bd93da4c39e5c1cbd1ae4f3ad3f1f2a
https://github.com/core/uricore/blob/dc5ef4be7bd93da4c39e5c1cbd1ae4f3ad3f1f2a/uricore/wkz_datastructures.py#L351-L356
train
Pop a ( key list ) tuple from the dict.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnodehotspot.py
XNodeHotspot.hoverEnterEvent
def hoverEnterEvent(self, event): """ Processes when this hotspot is entered. :param event | <QHoverEvent> :return <bool> | processed """ self._hovered = True if self.toolTip(): QToolTip.showText(QCursor.pos(), self...
python
def hoverEnterEvent(self, event): """ Processes when this hotspot is entered. :param event | <QHoverEvent> :return <bool> | processed """ self._hovered = True if self.toolTip(): QToolTip.showText(QCursor.pos(), self...
[ "def", "hoverEnterEvent", "(", "self", ",", "event", ")", ":", "self", ".", "_hovered", "=", "True", "if", "self", ".", "toolTip", "(", ")", ":", "QToolTip", ".", "showText", "(", "QCursor", ".", "pos", "(", ")", ",", "self", ".", "toolTip", "(", "...
Processes when this hotspot is entered. :param event | <QHoverEvent> :return <bool> | processed
[ "Processes", "when", "this", "hotspot", "is", "entered", ".", ":", "param", "event", "|", "<QHoverEvent", ">", ":", "return", "<bool", ">", "|", "processed" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodehotspot.py#L67-L80
train
Handles hoverEnter events.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnodehotspot.py
XNodeHotspot.hoverLeaveEvent
def hoverLeaveEvent(self, event): """ Processes when this hotspot is entered. :param event | <QHoverEvent> :return <bool> | processed """ self._hovered = False if self.toolTip(): QToolTip.hideText() ...
python
def hoverLeaveEvent(self, event): """ Processes when this hotspot is entered. :param event | <QHoverEvent> :return <bool> | processed """ self._hovered = False if self.toolTip(): QToolTip.hideText() ...
[ "def", "hoverLeaveEvent", "(", "self", ",", "event", ")", ":", "self", ".", "_hovered", "=", "False", "if", "self", ".", "toolTip", "(", ")", ":", "QToolTip", ".", "hideText", "(", ")", "return", "self", ".", "style", "(", ")", "==", "XNodeHotspot", ...
Processes when this hotspot is entered. :param event | <QHoverEvent> :return <bool> | processed
[ "Processes", "when", "this", "hotspot", "is", "entered", ".", ":", "param", "event", "|", "<QHoverEvent", ">", ":", "return", "<bool", ">", "|", "processed" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodehotspot.py#L90-L102
train
Handles the hoverLeave event.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnodehotspot.py
XNodeHotspot.render
def render(self, painter, node=None): """ Draws this node based on its style information :param painter | <QPainter> """ policy = self.visibilityPolicy() if policy == XNodeHotspot.VisibilityPolicy.Never: return elif pol...
python
def render(self, painter, node=None): """ Draws this node based on its style information :param painter | <QPainter> """ policy = self.visibilityPolicy() if policy == XNodeHotspot.VisibilityPolicy.Never: return elif pol...
[ "def", "render", "(", "self", ",", "painter", ",", "node", "=", "None", ")", ":", "policy", "=", "self", ".", "visibilityPolicy", "(", ")", "if", "policy", "==", "XNodeHotspot", ".", "VisibilityPolicy", ".", "Never", ":", "return", "elif", "policy", "=="...
Draws this node based on its style information :param painter | <QPainter>
[ "Draws", "this", "node", "based", "on", "its", "style", "information", ":", "param", "painter", "|", "<QPainter", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodehotspot.py#L138-L187
train
Renders the node based on its style information.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnodehotspot.py
XNodeHotspot.setHoverIcon
def setHoverIcon(self, icon): """ Sets the icon that will be used when this hotspot is hovered. :param icon | <QIcon> || None """ icon = QIcon(icon) if not icon.isNull(): self._hoverIcon = QIcon(icon) else: self._hov...
python
def setHoverIcon(self, icon): """ Sets the icon that will be used when this hotspot is hovered. :param icon | <QIcon> || None """ icon = QIcon(icon) if not icon.isNull(): self._hoverIcon = QIcon(icon) else: self._hov...
[ "def", "setHoverIcon", "(", "self", ",", "icon", ")", ":", "icon", "=", "QIcon", "(", "icon", ")", "if", "not", "icon", ".", "isNull", "(", ")", ":", "self", ".", "_hoverIcon", "=", "QIcon", "(", "icon", ")", "else", ":", "self", ".", "_hoverIcon",...
Sets the icon that will be used when this hotspot is hovered. :param icon | <QIcon> || None
[ "Sets", "the", "icon", "that", "will", "be", "used", "when", "this", "hotspot", "is", "hovered", ".", ":", "param", "icon", "|", "<QIcon", ">", "||", "None" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodehotspot.py#L214-L224
train
Sets the icon that will be used when this hotspot is hovered.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnodehotspot.py
XNodeHotspot.setIcon
def setIcon(self, icon): """ Sets the icon for this hotspot. If this method is called with a valid icon, then the style will automatically switch to Icon, otherwise, the style will be set to Invisible. :param icon | <QIcon> || <str> || None """ ...
python
def setIcon(self, icon): """ Sets the icon for this hotspot. If this method is called with a valid icon, then the style will automatically switch to Icon, otherwise, the style will be set to Invisible. :param icon | <QIcon> || <str> || None """ ...
[ "def", "setIcon", "(", "self", ",", "icon", ")", ":", "icon", "=", "QIcon", "(", "icon", ")", "if", "icon", ".", "isNull", "(", ")", ":", "self", ".", "_icon", "=", "None", "self", ".", "_style", "=", "XNodeHotspot", ".", "Style", ".", "Invisible",...
Sets the icon for this hotspot. If this method is called with a valid icon, then the style will automatically switch to Icon, otherwise, the style will be set to Invisible. :param icon | <QIcon> || <str> || None
[ "Sets", "the", "icon", "for", "this", "hotspot", ".", "If", "this", "method", "is", "called", "with", "a", "valid", "icon", "then", "the", "style", "will", "automatically", "switch", "to", "Icon", "otherwise", "the", "style", "will", "be", "set", "to", "...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodehotspot.py#L226-L240
train
Sets the icon for this hotspot.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.addRecord
def addRecord(self, record): """ Adds the given record to the system. :param record | <str> """ label_mapper = self.labelMapper() icon_mapper = self.iconMapper() self.addItem(label_mapper(record)) self.setItemData(se...
python
def addRecord(self, record): """ Adds the given record to the system. :param record | <str> """ label_mapper = self.labelMapper() icon_mapper = self.iconMapper() self.addItem(label_mapper(record)) self.setItemData(se...
[ "def", "addRecord", "(", "self", ",", "record", ")", ":", "label_mapper", "=", "self", ".", "labelMapper", "(", ")", "icon_mapper", "=", "self", ".", "iconMapper", "(", ")", "self", ".", "addItem", "(", "label_mapper", "(", "record", ")", ")", "self", ...
Adds the given record to the system. :param record | <str>
[ "Adds", "the", "given", "record", "to", "the", "system", ".", ":", "param", "record", "|", "<str", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L125-L142
train
Adds the given record to the system.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.addRecords
def addRecords(self, records): """ Adds the given record to the system. :param records | [<orb.Table>, ..] """ label_mapper = self.labelMapper() icon_mapper = self.iconMapper() # create the items to display tree = No...
python
def addRecords(self, records): """ Adds the given record to the system. :param records | [<orb.Table>, ..] """ label_mapper = self.labelMapper() icon_mapper = self.iconMapper() # create the items to display tree = No...
[ "def", "addRecords", "(", "self", ",", "records", ")", ":", "label_mapper", "=", "self", ".", "labelMapper", "(", ")", "icon_mapper", "=", "self", ".", "iconMapper", "(", ")", "# create the items to display\r", "tree", "=", "None", "if", "self", ".", "showTr...
Adds the given record to the system. :param records | [<orb.Table>, ..]
[ "Adds", "the", "given", "record", "to", "the", "system", ".", ":", "param", "records", "|", "[", "<orb", ".", "Table", ">", "..", "]" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L144-L178
train
Adds the given record to the system.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.addRecordsFromThread
def addRecordsFromThread(self, records): """ Adds the given record to the system. :param records | [<orb.Table>, ..] """ label_mapper = self.labelMapper() icon_mapper = self.iconMapper() tree = None if self.showTreeP...
python
def addRecordsFromThread(self, records): """ Adds the given record to the system. :param records | [<orb.Table>, ..] """ label_mapper = self.labelMapper() icon_mapper = self.iconMapper() tree = None if self.showTreeP...
[ "def", "addRecordsFromThread", "(", "self", ",", "records", ")", ":", "label_mapper", "=", "self", ".", "labelMapper", "(", ")", "icon_mapper", "=", "self", ".", "iconMapper", "(", ")", "tree", "=", "None", "if", "self", ".", "showTreePopup", "(", ")", "...
Adds the given record to the system. :param records | [<orb.Table>, ..]
[ "Adds", "the", "given", "record", "to", "the", "system", ".", ":", "param", "records", "|", "[", "<orb", ".", "Table", ">", "..", "]" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L180-L212
train
Adds the given records to the system.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.acceptRecord
def acceptRecord(self, item): """ Closes the tree popup and sets the current record. :param record | <orb.Table> """ record = item.record() self.treePopupWidget().close() self.setCurrentRecord(record)
python
def acceptRecord(self, item): """ Closes the tree popup and sets the current record. :param record | <orb.Table> """ record = item.record() self.treePopupWidget().close() self.setCurrentRecord(record)
[ "def", "acceptRecord", "(", "self", ",", "item", ")", ":", "record", "=", "item", ".", "record", "(", ")", "self", ".", "treePopupWidget", "(", ")", ".", "close", "(", ")", "self", ".", "setCurrentRecord", "(", "record", ")" ]
Closes the tree popup and sets the current record. :param record | <orb.Table>
[ "Closes", "the", "tree", "popup", "and", "sets", "the", "current", "record", ".", ":", "param", "record", "|", "<orb", ".", "Table", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L214-L222
train
Sets the current record for the given item. Closes the tree popup and sets the current record.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.assignCurrentRecord
def assignCurrentRecord(self, text): """ Assigns the current record from the inputed text. :param text | <str> """ if self.showTreePopup(): item = self._treePopupWidget.currentItem() if item: self._currentRecord = ite...
python
def assignCurrentRecord(self, text): """ Assigns the current record from the inputed text. :param text | <str> """ if self.showTreePopup(): item = self._treePopupWidget.currentItem() if item: self._currentRecord = ite...
[ "def", "assignCurrentRecord", "(", "self", ",", "text", ")", ":", "if", "self", ".", "showTreePopup", "(", ")", ":", "item", "=", "self", ".", "_treePopupWidget", ".", "currentItem", "(", ")", "if", "item", ":", "self", ".", "_currentRecord", "=", "item"...
Assigns the current record from the inputed text. :param text | <str>
[ "Assigns", "the", "current", "record", "from", "the", "inputed", "text", ".", ":", "param", "text", "|", "<str", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L224-L253
train
Assigns the current record from the inputed text.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.currentRecord
def currentRecord( self ): """ Returns the record found at the current index for this combo box. :rerturn <orb.Table> || None """ if self._currentRecord is None and self.isRequired(): self._currentRecord = self.recordAt(self.currentIndex()) ...
python
def currentRecord( self ): """ Returns the record found at the current index for this combo box. :rerturn <orb.Table> || None """ if self._currentRecord is None and self.isRequired(): self._currentRecord = self.recordAt(self.currentIndex()) ...
[ "def", "currentRecord", "(", "self", ")", ":", "if", "self", ".", "_currentRecord", "is", "None", "and", "self", ".", "isRequired", "(", ")", ":", "self", ".", "_currentRecord", "=", "self", ".", "recordAt", "(", "self", ".", "currentIndex", "(", ")", ...
Returns the record found at the current index for this combo box. :rerturn <orb.Table> || None
[ "Returns", "the", "record", "found", "at", "the", "current", "index", "for", "this", "combo", "box", ".", ":", "rerturn", "<orb", ".", "Table", ">", "||", "None" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L282-L290
train
Returns the record that is currently in the combo box.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.dragEnterEvent
def dragEnterEvent(self, event): """ Listens for query's being dragged and dropped onto this tree. :param event | <QDragEnterEvent> """ data = event.mimeData() if data.hasFormat('application/x-orb-table') and \ data.hasFormat('application/...
python
def dragEnterEvent(self, event): """ Listens for query's being dragged and dropped onto this tree. :param event | <QDragEnterEvent> """ data = event.mimeData() if data.hasFormat('application/x-orb-table') and \ data.hasFormat('application/...
[ "def", "dragEnterEvent", "(", "self", ",", "event", ")", ":", "data", "=", "event", ".", "mimeData", "(", ")", "if", "data", ".", "hasFormat", "(", "'application/x-orb-table'", ")", "and", "data", ".", "hasFormat", "(", "'application/x-orb-query'", ")", ":",...
Listens for query's being dragged and dropped onto this tree. :param event | <QDragEnterEvent>
[ "Listens", "for", "query", "s", "being", "dragged", "and", "dropped", "onto", "this", "tree", ".", ":", "param", "event", "|", "<QDragEnterEvent", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L292-L309
train
Returns the new tree entry ID for the given event.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.dropEvent
def dropEvent(self, event): """ Listens for query's being dragged and dropped onto this tree. :param event | <QDropEvent> """ # overload the current filtering options data = event.mimeData() if data.hasFormat('application/x-orb-table') and \ ...
python
def dropEvent(self, event): """ Listens for query's being dragged and dropped onto this tree. :param event | <QDropEvent> """ # overload the current filtering options data = event.mimeData() if data.hasFormat('application/x-orb-table') and \ ...
[ "def", "dropEvent", "(", "self", ",", "event", ")", ":", "# overload the current filtering options\r", "data", "=", "event", ".", "mimeData", "(", ")", "if", "data", ".", "hasFormat", "(", "'application/x-orb-table'", ")", "and", "data", ".", "hasFormat", "(", ...
Listens for query's being dragged and dropped onto this tree. :param event | <QDropEvent>
[ "Listens", "for", "query", "s", "being", "dragged", "and", "dropped", "onto", "this", "tree", ".", ":", "param", "event", "|", "<QDropEvent", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L330-L356
train
Override this method to handle the drop event.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.emitCurrentRecordChanged
def emitCurrentRecordChanged(self): """ Emits the current record changed signal for this combobox, provided \ the signals aren't blocked. """ record = unwrapVariant(self.itemData(self.currentIndex(), Qt.UserRole)) if not Table.recordcheck(record): recor...
python
def emitCurrentRecordChanged(self): """ Emits the current record changed signal for this combobox, provided \ the signals aren't blocked. """ record = unwrapVariant(self.itemData(self.currentIndex(), Qt.UserRole)) if not Table.recordcheck(record): recor...
[ "def", "emitCurrentRecordChanged", "(", "self", ")", ":", "record", "=", "unwrapVariant", "(", "self", ".", "itemData", "(", "self", ".", "currentIndex", "(", ")", ",", "Qt", ".", "UserRole", ")", ")", "if", "not", "Table", ".", "recordcheck", "(", "reco...
Emits the current record changed signal for this combobox, provided \ the signals aren't blocked.
[ "Emits", "the", "current", "record", "changed", "signal", "for", "this", "combobox", "provided", "\\", "the", "signals", "aren", "t", "blocked", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L358-L370
train
Emits the current record changed signal for this combobox.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.emitCurrentRecordEdited
def emitCurrentRecordEdited(self): """ Emits the current record edited signal for this combobox, provided the signals aren't blocked and the record has changed since the last time. """ if self._changedRecord == -1: return if self.signalsBlocke...
python
def emitCurrentRecordEdited(self): """ Emits the current record edited signal for this combobox, provided the signals aren't blocked and the record has changed since the last time. """ if self._changedRecord == -1: return if self.signalsBlocke...
[ "def", "emitCurrentRecordEdited", "(", "self", ")", ":", "if", "self", ".", "_changedRecord", "==", "-", "1", ":", "return", "if", "self", ".", "signalsBlocked", "(", ")", ":", "return", "record", "=", "self", ".", "_changedRecord", "self", ".", "_changedR...
Emits the current record edited signal for this combobox, provided the signals aren't blocked and the record has changed since the last time.
[ "Emits", "the", "current", "record", "edited", "signal", "for", "this", "combobox", "provided", "the", "signals", "aren", "t", "blocked", "and", "the", "record", "has", "changed", "since", "the", "last", "time", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L372-L385
train
Emits the current record edited signal for this combobox.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.eventFilter
def eventFilter(self, object, event): """ Filters events for the popup tree widget. :param object | <QObject> event | <QEvent> :retuen <bool> | consumed """ edit = self.lineEdit() if not (object a...
python
def eventFilter(self, object, event): """ Filters events for the popup tree widget. :param object | <QObject> event | <QEvent> :retuen <bool> | consumed """ edit = self.lineEdit() if not (object a...
[ "def", "eventFilter", "(", "self", ",", "object", ",", "event", ")", ":", "edit", "=", "self", ".", "lineEdit", "(", ")", "if", "not", "(", "object", "and", "object", "==", "self", ".", "_treePopupWidget", ")", ":", "return", "super", "(", "XOrbRecordB...
Filters events for the popup tree widget. :param object | <QObject> event | <QEvent> :retuen <bool> | consumed
[ "Filters", "events", "for", "the", "popup", "tree", "widget", ".", ":", "param", "object", "|", "<QObject", ">", "event", "|", "<QEvent", ">", ":", "retuen", "<bool", ">", "|", "consumed" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L387-L464
train
Filters the event for the popup tree widget.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.focusInEvent
def focusInEvent(self, event): """ When this widget loses focus, try to emit the record changed event signal. """ self._changedRecord = -1 super(XOrbRecordBox, self).focusInEvent(event)
python
def focusInEvent(self, event): """ When this widget loses focus, try to emit the record changed event signal. """ self._changedRecord = -1 super(XOrbRecordBox, self).focusInEvent(event)
[ "def", "focusInEvent", "(", "self", ",", "event", ")", ":", "self", ".", "_changedRecord", "=", "-", "1", "super", "(", "XOrbRecordBox", ",", "self", ")", ".", "focusInEvent", "(", "event", ")" ]
When this widget loses focus, try to emit the record changed event signal.
[ "When", "this", "widget", "loses", "focus", "try", "to", "emit", "the", "record", "changed", "event", "signal", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L480-L486
train
Called by the event handler when the record is changed.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.hidePopup
def hidePopup(self): """ Overloads the hide popup method to handle when the user hides the popup widget. """ if self._treePopupWidget and self.showTreePopup(): self._treePopupWidget.close() super(XOrbRecordBox, self).hidePopup()
python
def hidePopup(self): """ Overloads the hide popup method to handle when the user hides the popup widget. """ if self._treePopupWidget and self.showTreePopup(): self._treePopupWidget.close() super(XOrbRecordBox, self).hidePopup()
[ "def", "hidePopup", "(", "self", ")", ":", "if", "self", ".", "_treePopupWidget", "and", "self", ".", "showTreePopup", "(", ")", ":", "self", ".", "_treePopupWidget", ".", "close", "(", ")", "super", "(", "XOrbRecordBox", ",", "self", ")", ".", "hidePopu...
Overloads the hide popup method to handle when the user hides the popup widget.
[ "Overloads", "the", "hide", "popup", "method", "to", "handle", "when", "the", "user", "hides", "the", "popup", "widget", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L499-L507
train
Overloads the hidePopup method to handle when the user hides the popup widget.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.lookupRecords
def lookupRecords(self, record): """ Lookups records based on the inputed record. This will use the tableLookupIndex property to determine the Orb Index method to use to look up records. That index method should take the inputed record as an argument, and return a list of...
python
def lookupRecords(self, record): """ Lookups records based on the inputed record. This will use the tableLookupIndex property to determine the Orb Index method to use to look up records. That index method should take the inputed record as an argument, and return a list of...
[ "def", "lookupRecords", "(", "self", ",", "record", ")", ":", "table_type", "=", "self", ".", "tableType", "(", ")", "if", "not", "table_type", ":", "return", "index", "=", "getattr", "(", "table_type", ",", "self", ".", "tableLookupIndex", "(", ")", ","...
Lookups records based on the inputed record. This will use the tableLookupIndex property to determine the Orb Index method to use to look up records. That index method should take the inputed record as an argument, and return a list of records. :param record | <orb....
[ "Lookups", "records", "based", "on", "the", "inputed", "record", ".", "This", "will", "use", "the", "tableLookupIndex", "property", "to", "determine", "the", "Orb", "Index", "method", "to", "use", "to", "look", "up", "records", ".", "That", "index", "method"...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L554-L571
train
Lookups records based on the inputed record.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.markLoadingStarted
def markLoadingStarted(self): """ Marks this widget as loading records. """ if self.isThreadEnabled(): XLoaderWidget.start(self) if self.showTreePopup(): tree = self.treePopupWidget() tree.setCursor(Qt.WaitCursor) ...
python
def markLoadingStarted(self): """ Marks this widget as loading records. """ if self.isThreadEnabled(): XLoaderWidget.start(self) if self.showTreePopup(): tree = self.treePopupWidget() tree.setCursor(Qt.WaitCursor) ...
[ "def", "markLoadingStarted", "(", "self", ")", ":", "if", "self", ".", "isThreadEnabled", "(", ")", ":", "XLoaderWidget", ".", "start", "(", "self", ")", "if", "self", ".", "showTreePopup", "(", ")", ":", "tree", "=", "self", ".", "treePopupWidget", "(",...
Marks this widget as loading records.
[ "Marks", "this", "widget", "as", "loading", "records", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L573-L604
train
Marks this widget as loading records.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.markLoadingFinished
def markLoadingFinished(self): """ Marks this widget as finished loading records. """ XLoaderWidget.stop(self, force=True) hint, tree_hint = self._baseHints self.setHint(hint) # set the tree widget if self.showTreePopup(): ...
python
def markLoadingFinished(self): """ Marks this widget as finished loading records. """ XLoaderWidget.stop(self, force=True) hint, tree_hint = self._baseHints self.setHint(hint) # set the tree widget if self.showTreePopup(): ...
[ "def", "markLoadingFinished", "(", "self", ")", ":", "XLoaderWidget", ".", "stop", "(", "self", ",", "force", "=", "True", ")", "hint", ",", "tree_hint", "=", "self", ".", "_baseHints", "self", ".", "setHint", "(", "hint", ")", "# set the tree widget\r", "...
Marks this widget as finished loading records.
[ "Marks", "this", "widget", "as", "finished", "loading", "records", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L606-L626
train
Marks this widget as finished loading records.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.records
def records( self ): """ Returns the record list that ist linked with this combo box. :return [<orb.Table>, ..] """ records = [] for i in range(self.count()): record = self.recordAt(i) if record: records.appen...
python
def records( self ): """ Returns the record list that ist linked with this combo box. :return [<orb.Table>, ..] """ records = [] for i in range(self.count()): record = self.recordAt(i) if record: records.appen...
[ "def", "records", "(", "self", ")", ":", "records", "=", "[", "]", "for", "i", "in", "range", "(", "self", ".", "count", "(", ")", ")", ":", "record", "=", "self", ".", "recordAt", "(", "i", ")", "if", "record", ":", "records", ".", "append", "...
Returns the record list that ist linked with this combo box. :return [<orb.Table>, ..]
[ "Returns", "the", "record", "list", "that", "ist", "linked", "with", "this", "combo", "box", ".", ":", "return", "[", "<orb", ".", "Table", ">", "..", "]" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L644-L655
train
Returns the list of records linked with this combo box.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.refresh
def refresh(self, records): """ Refreshs the current user interface to match the latest settings. """ self._loaded = True if self.isLoading(): return # load the information if RecordSet.typecheck(records): table ...
python
def refresh(self, records): """ Refreshs the current user interface to match the latest settings. """ self._loaded = True if self.isLoading(): return # load the information if RecordSet.typecheck(records): table ...
[ "def", "refresh", "(", "self", ",", "records", ")", ":", "self", ".", "_loaded", "=", "True", "if", "self", ".", "isLoading", "(", ")", ":", "return", "# load the information\r", "if", "RecordSet", ".", "typecheck", "(", "records", ")", ":", "table", "="...
Refreshs the current user interface to match the latest settings.
[ "Refreshs", "the", "current", "user", "interface", "to", "match", "the", "latest", "settings", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L665-L730
train
Refreshes the current user interface with the latest settings.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.setBatchSize
def setBatchSize(self, size): """ Sets the batch size of records to look up for this record box. :param size | <int> """ self._batchSize = size try: self._worker.setBatchSize(size) except AttributeError: pass
python
def setBatchSize(self, size): """ Sets the batch size of records to look up for this record box. :param size | <int> """ self._batchSize = size try: self._worker.setBatchSize(size) except AttributeError: pass
[ "def", "setBatchSize", "(", "self", ",", "size", ")", ":", "self", ".", "_batchSize", "=", "size", "try", ":", "self", ".", "_worker", ".", "setBatchSize", "(", "size", ")", "except", "AttributeError", ":", "pass" ]
Sets the batch size of records to look up for this record box. :param size | <int>
[ "Sets", "the", "batch", "size", "of", "records", "to", "look", "up", "for", "this", "record", "box", ".", ":", "param", "size", "|", "<int", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L741-L751
train
Sets the batch size of records to look up for this record box.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.setCheckedRecords
def setCheckedRecords( self, records ): """ Sets the checked off records to the list of inputed records. :param records | [<orb.Table>, ..] """ QApplication.sendPostedEvents(self, -1) indexes = [] for i in range(self.count()): ...
python
def setCheckedRecords( self, records ): """ Sets the checked off records to the list of inputed records. :param records | [<orb.Table>, ..] """ QApplication.sendPostedEvents(self, -1) indexes = [] for i in range(self.count()): ...
[ "def", "setCheckedRecords", "(", "self", ",", "records", ")", ":", "QApplication", ".", "sendPostedEvents", "(", "self", ",", "-", "1", ")", "indexes", "=", "[", "]", "for", "i", "in", "range", "(", "self", ".", "count", "(", ")", ")", ":", "record",...
Sets the checked off records to the list of inputed records. :param records | [<orb.Table>, ..]
[ "Sets", "the", "checked", "off", "records", "to", "the", "list", "of", "inputed", "records", ".", ":", "param", "records", "|", "[", "<orb", ".", "Table", ">", "..", "]" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L753-L767
train
Sets the checked records to the list of inputed records.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.setCurrentRecord
def setCurrentRecord(self, record, autoAdd=False): """ Sets the index for this combobox to the inputed record instance. :param record <orb.Table> :return <bool> success """ if record is not None and not Table.recordcheck(record): ...
python
def setCurrentRecord(self, record, autoAdd=False): """ Sets the index for this combobox to the inputed record instance. :param record <orb.Table> :return <bool> success """ if record is not None and not Table.recordcheck(record): ...
[ "def", "setCurrentRecord", "(", "self", ",", "record", ",", "autoAdd", "=", "False", ")", ":", "if", "record", "is", "not", "None", "and", "not", "Table", ".", "recordcheck", "(", "record", ")", ":", "return", "False", "# don't reassign the current record\r", ...
Sets the index for this combobox to the inputed record instance. :param record <orb.Table> :return <bool> success
[ "Sets", "the", "index", "for", "this", "combobox", "to", "the", "inputed", "record", "instance", ".", ":", "param", "record", "<orb", ".", "Table", ">", ":", "return", "<bool", ">", "success" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L769-L817
train
Sets the index for this combobox to the inputed record instance.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.setQuery
def setQuery(self, query, autoRefresh=True): """ Sets the query for this record box for generating records. :param query | <Query> || None """ self._query = query tableType = self.tableType() if not tableType: return Fa...
python
def setQuery(self, query, autoRefresh=True): """ Sets the query for this record box for generating records. :param query | <Query> || None """ self._query = query tableType = self.tableType() if not tableType: return Fa...
[ "def", "setQuery", "(", "self", ",", "query", ",", "autoRefresh", "=", "True", ")", ":", "self", ".", "_query", "=", "query", "tableType", "=", "self", ".", "tableType", "(", ")", "if", "not", "tableType", ":", "return", "False", "if", "autoRefresh", "...
Sets the query for this record box for generating records. :param query | <Query> || None
[ "Sets", "the", "query", "for", "this", "record", "box", "for", "generating", "records", ".", ":", "param", "query", "|", "<Query", ">", "||", "None" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L849-L864
train
Sets the query for this record box for generating records.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.setTableType
def setTableType( self, tableType ): """ Sets the table type for this record box to the inputed table type. :param tableType | <orb.Table> """ self._tableType = tableType if tableType: self._tableTypeName = tableType.schema(...
python
def setTableType( self, tableType ): """ Sets the table type for this record box to the inputed table type. :param tableType | <orb.Table> """ self._tableType = tableType if tableType: self._tableTypeName = tableType.schema(...
[ "def", "setTableType", "(", "self", ",", "tableType", ")", ":", "self", ".", "_tableType", "=", "tableType", "if", "tableType", ":", "self", ".", "_tableTypeName", "=", "tableType", ".", "schema", "(", ")", ".", "name", "(", ")", "else", ":", "self", "...
Sets the table type for this record box to the inputed table type. :param tableType | <orb.Table>
[ "Sets", "the", "table", "type", "for", "this", "record", "box", "to", "the", "inputed", "table", "type", ".", ":", "param", "tableType", "|", "<orb", ".", "Table", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L919-L930
train
Sets the table type for this record box to the inputed table type.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.setVisible
def setVisible(self, state): """ Sets the visibility for this record box. :param state | <bool> """ super(XOrbRecordBox, self).setVisible(state) if state and not self._loaded: if self.autoInitialize(): table = s...
python
def setVisible(self, state): """ Sets the visibility for this record box. :param state | <bool> """ super(XOrbRecordBox, self).setVisible(state) if state and not self._loaded: if self.autoInitialize(): table = s...
[ "def", "setVisible", "(", "self", ",", "state", ")", ":", "super", "(", "XOrbRecordBox", ",", "self", ")", ".", "setVisible", "(", "state", ")", "if", "state", "and", "not", "self", ".", "_loaded", ":", "if", "self", ".", "autoInitialize", "(", ")", ...
Sets the visibility for this record box. :param state | <bool>
[ "Sets", "the", "visibility", "for", "this", "record", "box", ".", ":", "param", "state", "|", "<bool", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L951-L967
train
Sets the visibility of this record box.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.showPopup
def showPopup(self): """ Overloads the popup method from QComboBox to display an ORB tree widget when necessary. :sa setShowTreePopup """ if not self.showTreePopup(): return super(XOrbRecordBox, self).showPopup() tree = ...
python
def showPopup(self): """ Overloads the popup method from QComboBox to display an ORB tree widget when necessary. :sa setShowTreePopup """ if not self.showTreePopup(): return super(XOrbRecordBox, self).showPopup() tree = ...
[ "def", "showPopup", "(", "self", ")", ":", "if", "not", "self", ".", "showTreePopup", "(", ")", ":", "return", "super", "(", "XOrbRecordBox", ",", "self", ")", ".", "showPopup", "(", ")", "tree", "=", "self", ".", "treePopupWidget", "(", ")", "if", "...
Overloads the popup method from QComboBox to display an ORB tree widget when necessary. :sa setShowTreePopup
[ "Overloads", "the", "popup", "method", "from", "QComboBox", "to", "display", "an", "ORB", "tree", "widget", "when", "necessary", ".", ":", "sa", "setShowTreePopup" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L969-L987
train
Overloads the showPopup method from QComboBox to display an ORB tree widget when necessary.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.specifiedColumns
def specifiedColumns(self): """ Returns the list of columns that are specified based on the column view for this widget. :return [<orb.Column>, ..] """ columns = [] table = self.tableType() tree = self.treePopupWidget() schem...
python
def specifiedColumns(self): """ Returns the list of columns that are specified based on the column view for this widget. :return [<orb.Column>, ..] """ columns = [] table = self.tableType() tree = self.treePopupWidget() schem...
[ "def", "specifiedColumns", "(", "self", ")", ":", "columns", "=", "[", "]", "table", "=", "self", ".", "tableType", "(", ")", "tree", "=", "self", ".", "treePopupWidget", "(", ")", "schema", "=", "table", ".", "schema", "(", ")", "if", "self", ".", ...
Returns the list of columns that are specified based on the column view for this widget. :return [<orb.Column>, ..]
[ "Returns", "the", "list", "of", "columns", "that", "are", "specified", "based", "on", "the", "column", "view", "for", "this", "widget", ".", ":", "return", "[", "<orb", ".", "Column", ">", "..", "]" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L998-L1023
train
Returns the list of columns that are specified based on the column view for this widget.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.tableType
def tableType( self ): """ Returns the table type for this instance. :return <subclass of orb.Table> || None """ if not self._tableType: if self._tableTypeName: self._tableType = Orb.instance().model(nstr(self._tableTypeName)) ...
python
def tableType( self ): """ Returns the table type for this instance. :return <subclass of orb.Table> || None """ if not self._tableType: if self._tableTypeName: self._tableType = Orb.instance().model(nstr(self._tableTypeName)) ...
[ "def", "tableType", "(", "self", ")", ":", "if", "not", "self", ".", "_tableType", ":", "if", "self", ".", "_tableTypeName", ":", "self", ".", "_tableType", "=", "Orb", ".", "instance", "(", ")", ".", "model", "(", "nstr", "(", "self", ".", "_tableTy...
Returns the table type for this instance. :return <subclass of orb.Table> || None
[ "Returns", "the", "table", "type", "for", "this", "instance", ".", ":", "return", "<subclass", "of", "orb", ".", "Table", ">", "||", "None" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L1046-L1056
train
Returns the table type for this instance.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.treePopupWidget
def treePopupWidget(self): """ Returns the popup widget for this record box when it is supposed to be an ORB tree widget. :return <XTreeWidget> """ edit = self.lineEdit() if not self._treePopupWidget: # create the treewidget ...
python
def treePopupWidget(self): """ Returns the popup widget for this record box when it is supposed to be an ORB tree widget. :return <XTreeWidget> """ edit = self.lineEdit() if not self._treePopupWidget: # create the treewidget ...
[ "def", "treePopupWidget", "(", "self", ")", ":", "edit", "=", "self", ".", "lineEdit", "(", ")", "if", "not", "self", ".", "_treePopupWidget", ":", "# create the treewidget\r", "tree", "=", "XTreeWidget", "(", "self", ")", "tree", ".", "setWindowFlags", "(",...
Returns the popup widget for this record box when it is supposed to be an ORB tree widget. :return <XTreeWidget>
[ "Returns", "the", "popup", "widget", "for", "this", "record", "box", "when", "it", "is", "supposed", "to", "be", "an", "ORB", "tree", "widget", ".", ":", "return", "<XTreeWidget", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L1066-L1094
train
Returns the most appropriate tree widget for this record box when it is supposed to be an ORB tree widget.
bitesofcode/projexui
projexui/widgets/xorbrecordbox.py
XOrbRecordBox.worker
def worker(self): """ Returns the worker object for loading records for this record box. :return <XOrbLookupWorker> """ if self._worker is None: self._worker = XOrbLookupWorker(self.isThreadEnabled()) self._worker.setBatchSize(self._ba...
python
def worker(self): """ Returns the worker object for loading records for this record box. :return <XOrbLookupWorker> """ if self._worker is None: self._worker = XOrbLookupWorker(self.isThreadEnabled()) self._worker.setBatchSize(self._ba...
[ "def", "worker", "(", "self", ")", ":", "if", "self", ".", "_worker", "is", "None", ":", "self", ".", "_worker", "=", "XOrbLookupWorker", "(", "self", ".", "isThreadEnabled", "(", ")", ")", "self", ".", "_worker", ".", "setBatchSize", "(", "self", ".",...
Returns the worker object for loading records for this record box. :return <XOrbLookupWorker>
[ "Returns", "the", "worker", "object", "for", "loading", "records", "for", "this", "record", "box", ".", ":", "return", "<XOrbLookupWorker", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordbox.py#L1096-L1113
train
Returns a worker object for loading records for this record box.
bitesofcode/projexui
projexui/designer/__init__.py
generatePlugins
def generatePlugins(widgetPath = None, buildPath = None): """ Generates all the plugin files for the system and imports them. :param widgetPath | <str> || None buildPath | <str> || None """ if widgetPath is None: widgetPath = WIDGET_PATH if b...
python
def generatePlugins(widgetPath = None, buildPath = None): """ Generates all the plugin files for the system and imports them. :param widgetPath | <str> || None buildPath | <str> || None """ if widgetPath is None: widgetPath = WIDGET_PATH if b...
[ "def", "generatePlugins", "(", "widgetPath", "=", "None", ",", "buildPath", "=", "None", ")", ":", "if", "widgetPath", "is", "None", ":", "widgetPath", "=", "WIDGET_PATH", "if", "buildPath", "is", "None", ":", "buildPath", "=", "BUILD_PATH", "for", "basepath...
Generates all the plugin files for the system and imports them. :param widgetPath | <str> || None buildPath | <str> || None
[ "Generates", "all", "the", "plugin", "files", "for", "the", "system", "and", "imports", "them", ".", ":", "param", "widgetPath", "|", "<str", ">", "||", "None", "buildPath", "|", "<str", ">", "||", "None" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/designer/__init__.py#L120-L143
train
Generates all the plugin files for the system and imports them.
bitesofcode/projexui
projexui/designer/__init__.py
generatePlugin
def generatePlugin(sourcePath, buildPath = None): """ Generates a particular ui plugin for ths system and imports it. :param widgetPath | <str> buildPath | <str> || None """ if ( buildPath is None ): buildPath = BUILD_PATH pkg_name = projex...
python
def generatePlugin(sourcePath, buildPath = None): """ Generates a particular ui plugin for ths system and imports it. :param widgetPath | <str> buildPath | <str> || None """ if ( buildPath is None ): buildPath = BUILD_PATH pkg_name = projex...
[ "def", "generatePlugin", "(", "sourcePath", ",", "buildPath", "=", "None", ")", ":", "if", "(", "buildPath", "is", "None", ")", ":", "buildPath", "=", "BUILD_PATH", "pkg_name", "=", "projex", ".", "packageFromPath", "(", "sourcePath", ")", "module", "=", "...
Generates a particular ui plugin for ths system and imports it. :param widgetPath | <str> buildPath | <str> || None
[ "Generates", "a", "particular", "ui", "plugin", "for", "ths", "system", "and", "imports", "it", ".", ":", "param", "widgetPath", "|", "<str", ">", "buildPath", "|", "<str", ">", "||", "None" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/designer/__init__.py#L145-L189
train
Generates a particular ui plugin for the given source file and creates it if it does not exist.
bitesofcode/projexui
projexui/views/xscriptview.py
XScriptView.keyPressEvent
def keyPressEvent(self, event): """ Handles the key press event. When the user hits F5, the current code edit will be executed within the console's scope. :param event | <QtCore.QKeyEvent> """ if event.key() == QtCore.Qt.Key_F5 or \ (even...
python
def keyPressEvent(self, event): """ Handles the key press event. When the user hits F5, the current code edit will be executed within the console's scope. :param event | <QtCore.QKeyEvent> """ if event.key() == QtCore.Qt.Key_F5 or \ (even...
[ "def", "keyPressEvent", "(", "self", ",", "event", ")", ":", "if", "event", ".", "key", "(", ")", "==", "QtCore", ".", "Qt", ".", "Key_F5", "or", "(", "event", ".", "key", "(", ")", "==", "QtCore", ".", "Qt", ".", "Key_E", "and", "event", ".", ...
Handles the key press event. When the user hits F5, the current code edit will be executed within the console's scope. :param event | <QtCore.QKeyEvent>
[ "Handles", "the", "key", "press", "event", ".", "When", "the", "user", "hits", "F5", "the", "current", "code", "edit", "will", "be", "executed", "within", "the", "console", "s", "scope", ".", ":", "param", "event", "|", "<QtCore", ".", "QKeyEvent", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/views/xscriptview.py#L40-L55
train
Handles the key press event.
bitesofcode/projexui
projexui/views/xscriptview.py
XScriptView.restoreXml
def restoreXml(self, xml): """ Restores the view's content from XML. :param xml | <str> """ xscript = xml.find('script') if xscript is not None and xscript.text is not None: self._edit.setPlainText(unescape(xscript.text))
python
def restoreXml(self, xml): """ Restores the view's content from XML. :param xml | <str> """ xscript = xml.find('script') if xscript is not None and xscript.text is not None: self._edit.setPlainText(unescape(xscript.text))
[ "def", "restoreXml", "(", "self", ",", "xml", ")", ":", "xscript", "=", "xml", ".", "find", "(", "'script'", ")", "if", "xscript", "is", "not", "None", "and", "xscript", ".", "text", "is", "not", "None", ":", "self", ".", "_edit", ".", "setPlainText"...
Restores the view's content from XML. :param xml | <str>
[ "Restores", "the", "view", "s", "content", "from", "XML", ".", ":", "param", "xml", "|", "<str", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/views/xscriptview.py#L57-L65
train
Restores the view s content from XML.
bitesofcode/projexui
projexui/views/xscriptview.py
XScriptView.saveXml
def saveXml(self, xml): """ Saves this view's content to XML. :param xml | <str> """ xscript = ElementTree.SubElement(xml, 'script') xscript.text = escape(self._edit.toPlainText())
python
def saveXml(self, xml): """ Saves this view's content to XML. :param xml | <str> """ xscript = ElementTree.SubElement(xml, 'script') xscript.text = escape(self._edit.toPlainText())
[ "def", "saveXml", "(", "self", ",", "xml", ")", ":", "xscript", "=", "ElementTree", ".", "SubElement", "(", "xml", ",", "'script'", ")", "xscript", ".", "text", "=", "escape", "(", "self", ".", "_edit", ".", "toPlainText", "(", ")", ")" ]
Saves this view's content to XML. :param xml | <str>
[ "Saves", "this", "view", "s", "content", "to", "XML", ".", ":", "param", "xml", "|", "<str", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/views/xscriptview.py#L67-L74
train
Saves this view s content to XML.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem._updateFrame
def _updateFrame(self): """ Updates the frame for the given sender. """ for col, mov in self._movies.items(): self.setIcon(col, QtGui.QIcon(mov.currentPixmap()))
python
def _updateFrame(self): """ Updates the frame for the given sender. """ for col, mov in self._movies.items(): self.setIcon(col, QtGui.QIcon(mov.currentPixmap()))
[ "def", "_updateFrame", "(", "self", ")", ":", "for", "col", ",", "mov", "in", "self", ".", "_movies", ".", "items", "(", ")", ":", "self", ".", "setIcon", "(", "col", ",", "QtGui", ".", "QIcon", "(", "mov", ".", "currentPixmap", "(", ")", ")", ")...
Updates the frame for the given sender.
[ "Updates", "the", "frame", "for", "the", "given", "sender", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L98-L103
train
Updates the frame with the current movie icon.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.adjustHeight
def adjustHeight(self, column): """ Adjusts the height for this item based on the columna and its text. :param column | <int> """ tree = self.treeWidget() if not tree: return w = tree.width() if tree.verticalSc...
python
def adjustHeight(self, column): """ Adjusts the height for this item based on the columna and its text. :param column | <int> """ tree = self.treeWidget() if not tree: return w = tree.width() if tree.verticalSc...
[ "def", "adjustHeight", "(", "self", ",", "column", ")", ":", "tree", "=", "self", ".", "treeWidget", "(", ")", "if", "not", "tree", ":", "return", "w", "=", "tree", ".", "width", "(", ")", "if", "tree", ".", "verticalScrollBar", "(", ")", ".", "isV...
Adjusts the height for this item based on the columna and its text. :param column | <int>
[ "Adjusts", "the", "height", "for", "this", "item", "based", "on", "the", "columna", "and", "its", "text", ".", ":", "param", "column", "|", "<int", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L105-L123
train
Adjusts the height of this item based on the columna and its text.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.destroy
def destroy(self): """ Destroyes this item by disconnecting any signals that may exist. This is called when the tree clears itself or is deleted. If you are manually removing an item, you should call the destroy method yourself. This is required since Python allows for non...
python
def destroy(self): """ Destroyes this item by disconnecting any signals that may exist. This is called when the tree clears itself or is deleted. If you are manually removing an item, you should call the destroy method yourself. This is required since Python allows for non...
[ "def", "destroy", "(", "self", ")", ":", "try", ":", "tree", "=", "self", ".", "treeWidget", "(", ")", "tree", ".", "destroyed", ".", "disconnect", "(", "self", ".", "destroy", ")", "except", "StandardError", ":", "pass", "for", "movie", "in", "set", ...
Destroyes this item by disconnecting any signals that may exist. This is called when the tree clears itself or is deleted. If you are manually removing an item, you should call the destroy method yourself. This is required since Python allows for non-QObject connections, and since ...
[ "Destroyes", "this", "item", "by", "disconnecting", "any", "signals", "that", "may", "exist", ".", "This", "is", "called", "when", "the", "tree", "clears", "itself", "or", "is", "deleted", ".", "If", "you", "are", "manually", "removing", "an", "item", "you...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L125-L144
train
Destroys this item by disconnecting any signals that may exist.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.children
def children(self, recursive=False): """ Returns the list of child nodes for this item. :return [<QtGui.QTreeWidgetItem>, ..] """ for i in xrange(self.childCount()): child = self.child(i) yield child if recur...
python
def children(self, recursive=False): """ Returns the list of child nodes for this item. :return [<QtGui.QTreeWidgetItem>, ..] """ for i in xrange(self.childCount()): child = self.child(i) yield child if recur...
[ "def", "children", "(", "self", ",", "recursive", "=", "False", ")", ":", "for", "i", "in", "xrange", "(", "self", ".", "childCount", "(", ")", ")", ":", "child", "=", "self", ".", "child", "(", "i", ")", "yield", "child", "if", "recursive", ":", ...
Returns the list of child nodes for this item. :return [<QtGui.QTreeWidgetItem>, ..]
[ "Returns", "the", "list", "of", "child", "nodes", "for", "this", "item", ".", ":", "return", "[", "<QtGui", ".", "QTreeWidgetItem", ">", "..", "]" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L146-L158
train
Returns the list of child nodes for this item.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.dragData
def dragData(self, format=None, default=None): """ Returns the drag information that is associated with this tree widget item for the given format. :param format | <str> :return <variant> """ if format is None: retu...
python
def dragData(self, format=None, default=None): """ Returns the drag information that is associated with this tree widget item for the given format. :param format | <str> :return <variant> """ if format is None: retu...
[ "def", "dragData", "(", "self", ",", "format", "=", "None", ",", "default", "=", "None", ")", ":", "if", "format", "is", "None", ":", "return", "self", ".", "_dragData", "return", "self", ".", "_dragData", ".", "get", "(", "nativestring", "(", "format"...
Returns the drag information that is associated with this tree widget item for the given format. :param format | <str> :return <variant>
[ "Returns", "the", "drag", "information", "that", "is", "associated", "with", "this", "tree", "widget", "item", "for", "the", "given", "format", ".", ":", "param", "format", "|", "<str", ">", ":", "return", "<variant", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L160-L171
train
Returns the drag information associated with this tree widget item for the given format.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.ensureVisible
def ensureVisible(self): """ Expands all the parents of this item to ensure that it is visible to the user. """ parent = self.parent() while parent: parent.setExpanded(True) parent = parent.parent()
python
def ensureVisible(self): """ Expands all the parents of this item to ensure that it is visible to the user. """ parent = self.parent() while parent: parent.setExpanded(True) parent = parent.parent()
[ "def", "ensureVisible", "(", "self", ")", ":", "parent", "=", "self", ".", "parent", "(", ")", "while", "parent", ":", "parent", ".", "setExpanded", "(", "True", ")", "parent", "=", "parent", ".", "parent", "(", ")" ]
Expands all the parents of this item to ensure that it is visible to the user.
[ "Expands", "all", "the", "parents", "of", "this", "item", "to", "ensure", "that", "it", "is", "visible", "to", "the", "user", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L173-L181
train
Ensures that this item is visible to the user.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.initGroupStyle
def initGroupStyle(self, useIcons=True, columnCount=None): """ Initialzes this item with a grouping style option. """ flags = self.flags() if flags & QtCore.Qt.ItemIsSelectable: flags ^= QtCore.Qt.ItemIsSelectable self.setFlags(flags) ...
python
def initGroupStyle(self, useIcons=True, columnCount=None): """ Initialzes this item with a grouping style option. """ flags = self.flags() if flags & QtCore.Qt.ItemIsSelectable: flags ^= QtCore.Qt.ItemIsSelectable self.setFlags(flags) ...
[ "def", "initGroupStyle", "(", "self", ",", "useIcons", "=", "True", ",", "columnCount", "=", "None", ")", ":", "flags", "=", "self", ".", "flags", "(", ")", "if", "flags", "&", "QtCore", ".", "Qt", ".", "ItemIsSelectable", ":", "flags", "^=", "QtCore",...
Initialzes this item with a grouping style option.
[ "Initialzes", "this", "item", "with", "a", "grouping", "style", "option", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L242-L290
train
Initializes the group style of this item.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.requireCleanup
def requireCleanup(self): """ If you intend to use any signal/slot connections on this QTreeWidgetItem, you will need to call the requireCleanup method and implement manual disconnections in the destroy method. QTreeWidgetItem's do not inherit from QObject, and as such do not utili...
python
def requireCleanup(self): """ If you intend to use any signal/slot connections on this QTreeWidgetItem, you will need to call the requireCleanup method and implement manual disconnections in the destroy method. QTreeWidgetItem's do not inherit from QObject, and as such do not utili...
[ "def", "requireCleanup", "(", "self", ")", ":", "try", ":", "tree", ".", "destroyed", ".", "connect", "(", "self", ".", "destroy", ",", "QtCore", ".", "Qt", ".", "UniqueConnection", ")", "except", "StandardError", ":", "pass" ]
If you intend to use any signal/slot connections on this QTreeWidgetItem, you will need to call the requireCleanup method and implement manual disconnections in the destroy method. QTreeWidgetItem's do not inherit from QObject, and as such do not utilize the memory cleanup associated with Q...
[ "If", "you", "intend", "to", "use", "any", "signal", "/", "slot", "connections", "on", "this", "QTreeWidgetItem", "you", "will", "need", "to", "call", "the", "requireCleanup", "method", "and", "implement", "manual", "disconnections", "in", "the", "destroy", "m...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L319-L330
train
This method is called by the cleanup method of the related object.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.setChecked
def setChecked(self, column, state): """ Sets the check state of the inputed column based on the given bool state. This is a convenience method on top of the setCheckState method. :param column | <int> state | <bool> """ ...
python
def setChecked(self, column, state): """ Sets the check state of the inputed column based on the given bool state. This is a convenience method on top of the setCheckState method. :param column | <int> state | <bool> """ ...
[ "def", "setChecked", "(", "self", ",", "column", ",", "state", ")", ":", "self", ".", "setCheckState", "(", "column", ",", "QtCore", ".", "Qt", ".", "Checked", "if", "state", "else", "QtCore", ".", "Qt", ".", "Unchecked", ")" ]
Sets the check state of the inputed column based on the given bool state. This is a convenience method on top of the setCheckState method. :param column | <int> state | <bool>
[ "Sets", "the", "check", "state", "of", "the", "inputed", "column", "based", "on", "the", "given", "bool", "state", ".", "This", "is", "a", "convenience", "method", "on", "top", "of", "the", "setCheckState", "method", ".", ":", "param", "column", "|", "<i...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L341-L350
train
Sets the check state of the given column based on the given bool state.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.setDragData
def setDragData(self, format, value): """ Sets the drag information that is associated with this tree widget item for the given format. :param format | <str> value | <variant> """ if value is None: self._dragData.pop...
python
def setDragData(self, format, value): """ Sets the drag information that is associated with this tree widget item for the given format. :param format | <str> value | <variant> """ if value is None: self._dragData.pop...
[ "def", "setDragData", "(", "self", ",", "format", ",", "value", ")", ":", "if", "value", "is", "None", ":", "self", ".", "_dragData", ".", "pop", "(", "nativestring", "(", "format", ")", ",", "None", ")", "else", ":", "self", ".", "_dragData", "[", ...
Sets the drag information that is associated with this tree widget item for the given format. :param format | <str> value | <variant>
[ "Sets", "the", "drag", "information", "that", "is", "associated", "with", "this", "tree", "widget", "item", "for", "the", "given", "format", ".", ":", "param", "format", "|", "<str", ">", "value", "|", "<variant", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L352-L363
train
Sets the drag information that is associated with this tree widget item for the given format.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.setExpanded
def setExpanded(self, state): """ Sets whether or not this item is in an expanded state. :param state | <bool> """ if (state and self.testFlag(self.ItemIsExpandable)) or \ (not state and self.testFlag(self.ItemIsCollapsible)): super(XT...
python
def setExpanded(self, state): """ Sets whether or not this item is in an expanded state. :param state | <bool> """ if (state and self.testFlag(self.ItemIsExpandable)) or \ (not state and self.testFlag(self.ItemIsCollapsible)): super(XT...
[ "def", "setExpanded", "(", "self", ",", "state", ")", ":", "if", "(", "state", "and", "self", ".", "testFlag", "(", "self", ".", "ItemIsExpandable", ")", ")", "or", "(", "not", "state", "and", "self", ".", "testFlag", "(", "self", ".", "ItemIsCollapsib...
Sets whether or not this item is in an expanded state. :param state | <bool>
[ "Sets", "whether", "or", "not", "this", "item", "is", "in", "an", "expanded", "state", ".", ":", "param", "state", "|", "<bool", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L365-L373
train
Sets whether or not this item is in an expanded state.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.setExpandedIcon
def setExpandedIcon( self, column, icon ): """ Sets the icon to be used when the item is expanded. :param column | <int> icon | <QtGui.QIcon> || None """ self._expandedIcon[column] = QtGui.QIcon(icon)
python
def setExpandedIcon( self, column, icon ): """ Sets the icon to be used when the item is expanded. :param column | <int> icon | <QtGui.QIcon> || None """ self._expandedIcon[column] = QtGui.QIcon(icon)
[ "def", "setExpandedIcon", "(", "self", ",", "column", ",", "icon", ")", ":", "self", ".", "_expandedIcon", "[", "column", "]", "=", "QtGui", ".", "QIcon", "(", "icon", ")" ]
Sets the icon to be used when the item is expanded. :param column | <int> icon | <QtGui.QIcon> || None
[ "Sets", "the", "icon", "to", "be", "used", "when", "the", "item", "is", "expanded", ".", ":", "param", "column", "|", "<int", ">", "icon", "|", "<QtGui", ".", "QIcon", ">", "||", "None" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L375-L382
train
Sets the expanded icon for the item in the given column.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.setFlag
def setFlag(self, flag, state=True): """ Sets whether or not the inputed flag is associated with this item. :param flag | <QtCore.Qt.ItemFlags> state | <bool> """ if state: self.setFlags(self.flags() | flag) else: ...
python
def setFlag(self, flag, state=True): """ Sets whether or not the inputed flag is associated with this item. :param flag | <QtCore.Qt.ItemFlags> state | <bool> """ if state: self.setFlags(self.flags() | flag) else: ...
[ "def", "setFlag", "(", "self", ",", "flag", ",", "state", "=", "True", ")", ":", "if", "state", ":", "self", ".", "setFlags", "(", "self", ".", "flags", "(", ")", "|", "flag", ")", "else", ":", "self", ".", "setFlags", "(", "self", ".", "flags", ...
Sets whether or not the inputed flag is associated with this item. :param flag | <QtCore.Qt.ItemFlags> state | <bool>
[ "Sets", "whether", "or", "not", "the", "inputed", "flag", "is", "associated", "with", "this", "item", ".", ":", "param", "flag", "|", "<QtCore", ".", "Qt", ".", "ItemFlags", ">", "state", "|", "<bool", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L384-L394
train
Sets the flag associated with this item.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.setHtml
def setHtml(self, column, html): """ Creates a label with the given HTML for this item and column. This method requires the item to be a part of the tree. :param column | <int> html | <unicode> :return <bool> | success ...
python
def setHtml(self, column, html): """ Creates a label with the given HTML for this item and column. This method requires the item to be a part of the tree. :param column | <int> html | <unicode> :return <bool> | success ...
[ "def", "setHtml", "(", "self", ",", "column", ",", "html", ")", ":", "tree", "=", "self", ".", "treeWidget", "(", ")", "if", "not", "tree", ":", "return", "False", "lbl", "=", "tree", ".", "itemWidget", "(", "self", ",", "column", ")", "if", "not",...
Creates a label with the given HTML for this item and column. This method requires the item to be a part of the tree. :param column | <int> html | <unicode> :return <bool> | success
[ "Creates", "a", "label", "with", "the", "given", "HTML", "for", "this", "item", "and", "column", ".", "This", "method", "requires", "the", "item", "to", "be", "a", "part", "of", "the", "tree", ".", ":", "param", "column", "|", "<int", ">", "html", "|...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L404-L430
train
This method sets the HTML for the given item and column.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.setHoverBackground
def setHoverBackground( self, column, brush ): """ Returns the brush to use when coloring when the user hovers over the item for the given column. :param column | <int> brush | <QtGui.QBrush) """ self._hoverBackground[column] = Q...
python
def setHoverBackground( self, column, brush ): """ Returns the brush to use when coloring when the user hovers over the item for the given column. :param column | <int> brush | <QtGui.QBrush) """ self._hoverBackground[column] = Q...
[ "def", "setHoverBackground", "(", "self", ",", "column", ",", "brush", ")", ":", "self", ".", "_hoverBackground", "[", "column", "]", "=", "QtGui", ".", "QBrush", "(", "brush", ")" ]
Returns the brush to use when coloring when the user hovers over the item for the given column. :param column | <int> brush | <QtGui.QBrush)
[ "Returns", "the", "brush", "to", "use", "when", "coloring", "when", "the", "user", "hovers", "over", "the", "item", "for", "the", "given", "column", ".", ":", "param", "column", "|", "<int", ">", "brush", "|", "<QtGui", ".", "QBrush", ")" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L432-L440
train
Sets the hover background for the given column.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.setHoverIcon
def setHoverIcon( self, column, icon ): """ Returns the icon to use when coloring when the user hovers over the item for the given column. :param column | <int> icon | <QtGui.QIcon) """ self._hoverIcon[column] = QtGui.QIcon(icon...
python
def setHoverIcon( self, column, icon ): """ Returns the icon to use when coloring when the user hovers over the item for the given column. :param column | <int> icon | <QtGui.QIcon) """ self._hoverIcon[column] = QtGui.QIcon(icon...
[ "def", "setHoverIcon", "(", "self", ",", "column", ",", "icon", ")", ":", "self", ".", "_hoverIcon", "[", "column", "]", "=", "QtGui", ".", "QIcon", "(", "icon", ")" ]
Returns the icon to use when coloring when the user hovers over the item for the given column. :param column | <int> icon | <QtGui.QIcon)
[ "Returns", "the", "icon", "to", "use", "when", "coloring", "when", "the", "user", "hovers", "over", "the", "item", "for", "the", "given", "column", ".", ":", "param", "column", "|", "<int", ">", "icon", "|", "<QtGui", ".", "QIcon", ")" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L442-L450
train
Sets the hover icon for the given column.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.setHoverForeground
def setHoverForeground( self, column, brush ): """ Returns the brush to use when coloring when the user hovers over the item for the given column. :param column | <int> brush | <QtGui.QBrush> """ self._hoverForeground[column] = Q...
python
def setHoverForeground( self, column, brush ): """ Returns the brush to use when coloring when the user hovers over the item for the given column. :param column | <int> brush | <QtGui.QBrush> """ self._hoverForeground[column] = Q...
[ "def", "setHoverForeground", "(", "self", ",", "column", ",", "brush", ")", ":", "self", ".", "_hoverForeground", "[", "column", "]", "=", "QtGui", ".", "QBrush", "(", "brush", ")" ]
Returns the brush to use when coloring when the user hovers over the item for the given column. :param column | <int> brush | <QtGui.QBrush>
[ "Returns", "the", "brush", "to", "use", "when", "coloring", "when", "the", "user", "hovers", "over", "the", "item", "for", "the", "given", "column", ".", ":", "param", "column", "|", "<int", ">", "brush", "|", "<QtGui", ".", "QBrush", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L452-L460
train
Sets the color to use when coloring when the user hovers over the given column.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.setIconOverlay
def setIconOverlay(self, column, icon): """ Sets the icon overlay for this item at the inputed column to the given icon. :param column | <int> icon | <str> || <QtGui.QIcon> """ self._iconOverlays[column] = QtGui.QIcon(icon)
python
def setIconOverlay(self, column, icon): """ Sets the icon overlay for this item at the inputed column to the given icon. :param column | <int> icon | <str> || <QtGui.QIcon> """ self._iconOverlays[column] = QtGui.QIcon(icon)
[ "def", "setIconOverlay", "(", "self", ",", "column", ",", "icon", ")", ":", "self", ".", "_iconOverlays", "[", "column", "]", "=", "QtGui", ".", "QIcon", "(", "icon", ")" ]
Sets the icon overlay for this item at the inputed column to the given icon. :param column | <int> icon | <str> || <QtGui.QIcon>
[ "Sets", "the", "icon", "overlay", "for", "this", "item", "at", "the", "inputed", "column", "to", "the", "given", "icon", ".", ":", "param", "column", "|", "<int", ">", "icon", "|", "<str", ">", "||", "<QtGui", ".", "QIcon", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L462-L470
train
Sets the icon overlay for this item at the inputed column to the given icon.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.setMovie
def setMovie(self, column, movie): """ Sets the movie that will play for the given column. :param column | <int> movie | <QtGui.QMovie> || None """ curr = self._movies.get(column) if curr == movie: return True ...
python
def setMovie(self, column, movie): """ Sets the movie that will play for the given column. :param column | <int> movie | <QtGui.QMovie> || None """ curr = self._movies.get(column) if curr == movie: return True ...
[ "def", "setMovie", "(", "self", ",", "column", ",", "movie", ")", ":", "curr", "=", "self", ".", "_movies", ".", "get", "(", "column", ")", "if", "curr", "==", "movie", ":", "return", "True", "else", ":", "try", ":", "curr", ".", "frameChanged", "....
Sets the movie that will play for the given column. :param column | <int> movie | <QtGui.QMovie> || None
[ "Sets", "the", "movie", "that", "will", "play", "for", "the", "given", "column", ".", ":", "param", "column", "|", "<int", ">", "movie", "|", "<QtGui", ".", "QMovie", ">", "||", "None" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L472-L500
train
Sets the movie that will play for the given column.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.setSizeHint
def setSizeHint(self, column, hint): """ Sets the size hint for this item to the inputed size. This will also updated the fixed height property if the hieght of the inputed hint is larger than the current fixed height. :param hint | <QtCore.QSize> ""...
python
def setSizeHint(self, column, hint): """ Sets the size hint for this item to the inputed size. This will also updated the fixed height property if the hieght of the inputed hint is larger than the current fixed height. :param hint | <QtCore.QSize> ""...
[ "def", "setSizeHint", "(", "self", ",", "column", ",", "hint", ")", ":", "self", ".", "_fixedHeight", "=", "max", "(", "hint", ".", "height", "(", ")", ",", "self", ".", "_fixedHeight", ")", "super", "(", "XTreeWidgetItem", ",", "self", ")", ".", "se...
Sets the size hint for this item to the inputed size. This will also updated the fixed height property if the hieght of the inputed hint is larger than the current fixed height. :param hint | <QtCore.QSize>
[ "Sets", "the", "size", "hint", "for", "this", "item", "to", "the", "inputed", "size", ".", "This", "will", "also", "updated", "the", "fixed", "height", "property", "if", "the", "hieght", "of", "the", "inputed", "hint", "is", "larger", "than", "the", "cur...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L502-L511
train
Sets the size hint for this item.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.setSortData
def setSortData( self, column, data ): """ Sets the sorting information for the inputed column to the given data. :param column | <int> data | <variant> """ self.setData(column, self.SortRole, wrapVariant(data))
python
def setSortData( self, column, data ): """ Sets the sorting information for the inputed column to the given data. :param column | <int> data | <variant> """ self.setData(column, self.SortRole, wrapVariant(data))
[ "def", "setSortData", "(", "self", ",", "column", ",", "data", ")", ":", "self", ".", "setData", "(", "column", ",", "self", ".", "SortRole", ",", "wrapVariant", "(", "data", ")", ")" ]
Sets the sorting information for the inputed column to the given data. :param column | <int> data | <variant>
[ "Sets", "the", "sorting", "information", "for", "the", "inputed", "column", "to", "the", "given", "data", ".", ":", "param", "column", "|", "<int", ">", "data", "|", "<variant", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L513-L520
train
Sets the sorting information for the inputed column to the given data.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.sizeHint
def sizeHint(self, column): """ Returns the size hint for this column. This will return the width for the given column, with the maximum height assigned with this item. :return <QtCore.QSize> """ hint = super(XTreeWidgetItem, self).sizeHint(column) ...
python
def sizeHint(self, column): """ Returns the size hint for this column. This will return the width for the given column, with the maximum height assigned with this item. :return <QtCore.QSize> """ hint = super(XTreeWidgetItem, self).sizeHint(column) ...
[ "def", "sizeHint", "(", "self", ",", "column", ")", ":", "hint", "=", "super", "(", "XTreeWidgetItem", ",", "self", ")", ".", "sizeHint", "(", "column", ")", "hint", ".", "setHeight", "(", "max", "(", "hint", ".", "height", "(", ")", ",", "self", "...
Returns the size hint for this column. This will return the width for the given column, with the maximum height assigned with this item. :return <QtCore.QSize>
[ "Returns", "the", "size", "hint", "for", "this", "column", ".", "This", "will", "return", "the", "width", "for", "the", "given", "column", "with", "the", "maximum", "height", "assigned", "with", "this", "item", ".", ":", "return", "<QtCore", ".", "QSize", ...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L522-L531
train
Returns the size hint for this column.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.sortData
def sortData( self, column ): """ Returns the data to be used when sorting. If no sort data has been explicitly defined, then the value in the EditRole for this item's column will be used. :param column | <int> :return <variant> ...
python
def sortData( self, column ): """ Returns the data to be used when sorting. If no sort data has been explicitly defined, then the value in the EditRole for this item's column will be used. :param column | <int> :return <variant> ...
[ "def", "sortData", "(", "self", ",", "column", ")", ":", "value", "=", "unwrapVariant", "(", "self", ".", "data", "(", "column", ",", "self", ".", "SortRole", ")", ")", "if", "value", "is", "None", ":", "return", "None", "return", "unwrapVariant", "(",...
Returns the data to be used when sorting. If no sort data has been explicitly defined, then the value in the EditRole for this item's column will be used. :param column | <int> :return <variant>
[ "Returns", "the", "data", "to", "be", "used", "when", "sorting", ".", "If", "no", "sort", "data", "has", "been", "explicitly", "defined", "then", "the", "value", "in", "the", "EditRole", "for", "this", "item", "s", "column", "will", "be", "used", ".", ...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L533-L546
train
Returns the data to be used when sorting the items in the given column.
bitesofcode/projexui
projexui/widgets/xtreewidget/xtreewidgetitem.py
XTreeWidgetItem.takeFromTree
def takeFromTree(self): """ Takes this item from the tree. """ tree = self.treeWidget() parent = self.parent() if parent: parent.takeChild(parent.indexOfChild(self)) else: tree.takeTopLevelItem(tree.indexOfTopLevelItem(se...
python
def takeFromTree(self): """ Takes this item from the tree. """ tree = self.treeWidget() parent = self.parent() if parent: parent.takeChild(parent.indexOfChild(self)) else: tree.takeTopLevelItem(tree.indexOfTopLevelItem(se...
[ "def", "takeFromTree", "(", "self", ")", ":", "tree", "=", "self", ".", "treeWidget", "(", ")", "parent", "=", "self", ".", "parent", "(", ")", "if", "parent", ":", "parent", ".", "takeChild", "(", "parent", ".", "indexOfChild", "(", "self", ")", ")"...
Takes this item from the tree.
[ "Takes", "this", "item", "from", "the", "tree", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetitem.py#L548-L558
train
Takes this item from the tree.
jdrumgoole/mongodbshell
mongodbshell/__init__.py
MongoDB.database
def database(self, database_name): """ Set the default database for this Proxy object. :param database_name: A string naming the database """ if database_name and MongoDB.valid_mongodb_name(database_name): self._database = self.client[database_name] else: ...
python
def database(self, database_name): """ Set the default database for this Proxy object. :param database_name: A string naming the database """ if database_name and MongoDB.valid_mongodb_name(database_name): self._database = self.client[database_name] else: ...
[ "def", "database", "(", "self", ",", "database_name", ")", ":", "if", "database_name", "and", "MongoDB", ".", "valid_mongodb_name", "(", "database_name", ")", ":", "self", ".", "_database", "=", "self", ".", "client", "[", "database_name", "]", "else", ":", ...
Set the default database for this Proxy object. :param database_name: A string naming the database
[ "Set", "the", "default", "database", "for", "this", "Proxy", "object", ".", ":", "param", "database_name", ":", "A", "string", "naming", "the", "database" ]
7e194247ea2adc1f124532935507cdffafa2c1f6
https://github.com/jdrumgoole/mongodbshell/blob/7e194247ea2adc1f124532935507cdffafa2c1f6/mongodbshell/__init__.py#L157-L165
train
Sets the default database for this Proxy object.
jdrumgoole/mongodbshell
mongodbshell/__init__.py
MongoDB.find
def find(self, *args, **kwargs): """ Run the pymongo find command against the default database and collection and paginate the output to the screen. """ # print(f"database.collection: '{self.database.name}.{self.collection.name}'") self.print_cursor(self.collection.find(*...
python
def find(self, *args, **kwargs): """ Run the pymongo find command against the default database and collection and paginate the output to the screen. """ # print(f"database.collection: '{self.database.name}.{self.collection.name}'") self.print_cursor(self.collection.find(*...
[ "def", "find", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "# print(f\"database.collection: '{self.database.name}.{self.collection.name}'\")", "self", ".", "print_cursor", "(", "self", ".", "collection", ".", "find", "(", "*", "args", ",", ...
Run the pymongo find command against the default database and collection and paginate the output to the screen.
[ "Run", "the", "pymongo", "find", "command", "against", "the", "default", "database", "and", "collection", "and", "paginate", "the", "output", "to", "the", "screen", "." ]
7e194247ea2adc1f124532935507cdffafa2c1f6
https://github.com/jdrumgoole/mongodbshell/blob/7e194247ea2adc1f124532935507cdffafa2c1f6/mongodbshell/__init__.py#L247-L253
train
Run the pymongo find command against the default database and collection and paginate the output to the screen.
jdrumgoole/mongodbshell
mongodbshell/__init__.py
MongoDB.find_one
def find_one(self, *args, **kwargs): """ Run the pymongo find_one command against the default database and collection and paginate the output to the screen. """ # print(f"database.collection: '{self.database.name}.{self.collection.name}'") self.print_doc(self.collection.f...
python
def find_one(self, *args, **kwargs): """ Run the pymongo find_one command against the default database and collection and paginate the output to the screen. """ # print(f"database.collection: '{self.database.name}.{self.collection.name}'") self.print_doc(self.collection.f...
[ "def", "find_one", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "# print(f\"database.collection: '{self.database.name}.{self.collection.name}'\")", "self", ".", "print_doc", "(", "self", ".", "collection", ".", "find_one", "(", "*", "args", ",...
Run the pymongo find_one command against the default database and collection and paginate the output to the screen.
[ "Run", "the", "pymongo", "find_one", "command", "against", "the", "default", "database", "and", "collection", "and", "paginate", "the", "output", "to", "the", "screen", "." ]
7e194247ea2adc1f124532935507cdffafa2c1f6
https://github.com/jdrumgoole/mongodbshell/blob/7e194247ea2adc1f124532935507cdffafa2c1f6/mongodbshell/__init__.py#L255-L261
train
Run the pymongo find_one command against the default database and collection and print the result.
jdrumgoole/mongodbshell
mongodbshell/__init__.py
MongoDB.insert_one
def insert_one(self, *args, **kwargs): """ Run the pymongo insert_one command against the default database and collection and returne the inserted ID. """ # print(f"database.collection: '{self.database.name}.{self.collection.name}'") result = self.collection.insert_one(*a...
python
def insert_one(self, *args, **kwargs): """ Run the pymongo insert_one command against the default database and collection and returne the inserted ID. """ # print(f"database.collection: '{self.database.name}.{self.collection.name}'") result = self.collection.insert_one(*a...
[ "def", "insert_one", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "# print(f\"database.collection: '{self.database.name}.{self.collection.name}'\")", "result", "=", "self", ".", "collection", ".", "insert_one", "(", "*", "args", ",", "*", "*",...
Run the pymongo insert_one command against the default database and collection and returne the inserted ID.
[ "Run", "the", "pymongo", "insert_one", "command", "against", "the", "default", "database", "and", "collection", "and", "returne", "the", "inserted", "ID", "." ]
7e194247ea2adc1f124532935507cdffafa2c1f6
https://github.com/jdrumgoole/mongodbshell/blob/7e194247ea2adc1f124532935507cdffafa2c1f6/mongodbshell/__init__.py#L263-L270
train
Run the pymongo insert_one command against the default database and collection and return the inserted ID.
jdrumgoole/mongodbshell
mongodbshell/__init__.py
MongoDB.insert_many
def insert_many(self, *args, **kwargs): """ Run the pymongo insert_many command against the default database and collection and return the list of inserted IDs. """ # print(f"database.collection: '{self.database.name}.{self.collection.name}'") result = self.collection.ins...
python
def insert_many(self, *args, **kwargs): """ Run the pymongo insert_many command against the default database and collection and return the list of inserted IDs. """ # print(f"database.collection: '{self.database.name}.{self.collection.name}'") result = self.collection.ins...
[ "def", "insert_many", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "# print(f\"database.collection: '{self.database.name}.{self.collection.name}'\")", "result", "=", "self", ".", "collection", ".", "insert_many", "(", "*", "args", ",", "*", "*...
Run the pymongo insert_many command against the default database and collection and return the list of inserted IDs.
[ "Run", "the", "pymongo", "insert_many", "command", "against", "the", "default", "database", "and", "collection", "and", "return", "the", "list", "of", "inserted", "IDs", "." ]
7e194247ea2adc1f124532935507cdffafa2c1f6
https://github.com/jdrumgoole/mongodbshell/blob/7e194247ea2adc1f124532935507cdffafa2c1f6/mongodbshell/__init__.py#L272-L279
train
Run the pymongo insert_many command against the default database and collection and return the list of inserted IDs.
jdrumgoole/mongodbshell
mongodbshell/__init__.py
MongoDB.delete_one
def delete_one(self, *args, **kwargs): """ Run the pymongo delete_one command against the default database and collection and return the deleted IDs. """ result = self.collection.delete_one(*args, **kwargs) return result.raw_result
python
def delete_one(self, *args, **kwargs): """ Run the pymongo delete_one command against the default database and collection and return the deleted IDs. """ result = self.collection.delete_one(*args, **kwargs) return result.raw_result
[ "def", "delete_one", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "result", "=", "self", ".", "collection", ".", "delete_one", "(", "*", "args", ",", "*", "*", "kwargs", ")", "return", "result", ".", "raw_result" ]
Run the pymongo delete_one command against the default database and collection and return the deleted IDs.
[ "Run", "the", "pymongo", "delete_one", "command", "against", "the", "default", "database", "and", "collection", "and", "return", "the", "deleted", "IDs", "." ]
7e194247ea2adc1f124532935507cdffafa2c1f6
https://github.com/jdrumgoole/mongodbshell/blob/7e194247ea2adc1f124532935507cdffafa2c1f6/mongodbshell/__init__.py#L281-L287
train
Run the pymongo delete_one command against the default database and collection and return the deleted IDs.
jdrumgoole/mongodbshell
mongodbshell/__init__.py
MongoDB.delete_many
def delete_many(self, *args, **kwargs): """ Run the pymongo delete_many command against the default database and collection and return the deleted IDs. """ result = self.collection.delete_many(*args, **kwargs) return result.raw_result
python
def delete_many(self, *args, **kwargs): """ Run the pymongo delete_many command against the default database and collection and return the deleted IDs. """ result = self.collection.delete_many(*args, **kwargs) return result.raw_result
[ "def", "delete_many", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "result", "=", "self", ".", "collection", ".", "delete_many", "(", "*", "args", ",", "*", "*", "kwargs", ")", "return", "result", ".", "raw_result" ]
Run the pymongo delete_many command against the default database and collection and return the deleted IDs.
[ "Run", "the", "pymongo", "delete_many", "command", "against", "the", "default", "database", "and", "collection", "and", "return", "the", "deleted", "IDs", "." ]
7e194247ea2adc1f124532935507cdffafa2c1f6
https://github.com/jdrumgoole/mongodbshell/blob/7e194247ea2adc1f124532935507cdffafa2c1f6/mongodbshell/__init__.py#L289-L295
train
Run the pymongo delete_many command against the default database and collection and return the deleted IDs.
jdrumgoole/mongodbshell
mongodbshell/__init__.py
MongoDB.count_documents
def count_documents(self, filter={}, *args, **kwargs): """ Count all the documents in a collection accurately """ result = self.collection.count_documents(filter, *args, **kwargs) return result
python
def count_documents(self, filter={}, *args, **kwargs): """ Count all the documents in a collection accurately """ result = self.collection.count_documents(filter, *args, **kwargs) return result
[ "def", "count_documents", "(", "self", ",", "filter", "=", "{", "}", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "result", "=", "self", ".", "collection", ".", "count_documents", "(", "filter", ",", "*", "args", ",", "*", "*", "kwargs", ")...
Count all the documents in a collection accurately
[ "Count", "all", "the", "documents", "in", "a", "collection", "accurately" ]
7e194247ea2adc1f124532935507cdffafa2c1f6
https://github.com/jdrumgoole/mongodbshell/blob/7e194247ea2adc1f124532935507cdffafa2c1f6/mongodbshell/__init__.py#L297-L302
train
Count the number of documents in a collection accurately
jdrumgoole/mongodbshell
mongodbshell/__init__.py
MongoDB.collstats
def collstats(self, scale=1024, verbose=False): """ Run collection stats for collection. see https://docs.mongodb.com/manual/reference/command/collStats/ :param scale: Scale at which to report sizes :param verbose: used for extended report on legacy MMAPV1 storage engine ...
python
def collstats(self, scale=1024, verbose=False): """ Run collection stats for collection. see https://docs.mongodb.com/manual/reference/command/collStats/ :param scale: Scale at which to report sizes :param verbose: used for extended report on legacy MMAPV1 storage engine ...
[ "def", "collstats", "(", "self", ",", "scale", "=", "1024", ",", "verbose", "=", "False", ")", ":", "self", ".", "print_doc", "(", "self", ".", "database", ".", "command", "(", "{", "\"collStats\"", ":", "self", ".", "_collection_name", ",", "\"scale\"",...
Run collection stats for collection. see https://docs.mongodb.com/manual/reference/command/collStats/ :param scale: Scale at which to report sizes :param verbose: used for extended report on legacy MMAPV1 storage engine :return: JSON doc with stats
[ "Run", "collection", "stats", "for", "collection", ".", "see", "https", ":", "//", "docs", ".", "mongodb", ".", "com", "/", "manual", "/", "reference", "/", "command", "/", "collStats", "/" ]
7e194247ea2adc1f124532935507cdffafa2c1f6
https://github.com/jdrumgoole/mongodbshell/blob/7e194247ea2adc1f124532935507cdffafa2c1f6/mongodbshell/__init__.py#L317-L329
train
Run collection stats for collection.
jdrumgoole/mongodbshell
mongodbshell/__init__.py
MongoDB._get_collections
def _get_collections(self, db_names=None): """ Internal function to return all the collections for every database. include a list of db_names to filter the list of collections. """ if db_names: db_list = db_names else: db_list = self.client.list_da...
python
def _get_collections(self, db_names=None): """ Internal function to return all the collections for every database. include a list of db_names to filter the list of collections. """ if db_names: db_list = db_names else: db_list = self.client.list_da...
[ "def", "_get_collections", "(", "self", ",", "db_names", "=", "None", ")", ":", "if", "db_names", ":", "db_list", "=", "db_names", "else", ":", "db_list", "=", "self", ".", "client", ".", "list_database_names", "(", ")", "for", "db_name", "in", "db_list", ...
Internal function to return all the collections for every database. include a list of db_names to filter the list of collections.
[ "Internal", "function", "to", "return", "all", "the", "collections", "for", "every", "database", ".", "include", "a", "list", "of", "db_names", "to", "filter", "the", "list", "of", "collections", "." ]
7e194247ea2adc1f124532935507cdffafa2c1f6
https://github.com/jdrumgoole/mongodbshell/blob/7e194247ea2adc1f124532935507cdffafa2c1f6/mongodbshell/__init__.py#L337-L351
train
Internal function to return all the collections for every database.
jdrumgoole/mongodbshell
mongodbshell/__init__.py
MongoDB.pager
def pager(self, lines): """ Outputs lines to a terminal. It uses `shutil.get_terminal_size` to determine the height of the terminal. It expects an iterator that returns a line at a time and those lines should be terminated by a valid newline sequence. Behaviour is contro...
python
def pager(self, lines): """ Outputs lines to a terminal. It uses `shutil.get_terminal_size` to determine the height of the terminal. It expects an iterator that returns a line at a time and those lines should be terminated by a valid newline sequence. Behaviour is contro...
[ "def", "pager", "(", "self", ",", "lines", ")", ":", "try", ":", "line_count", "=", "0", "if", "self", ".", "_output_filename", ":", "print", "(", "f\"Output is also going to '{self.output_file}'\"", ")", "self", ".", "_output_file", "=", "open", "(", "self", ...
Outputs lines to a terminal. It uses `shutil.get_terminal_size` to determine the height of the terminal. It expects an iterator that returns a line at a time and those lines should be terminated by a valid newline sequence. Behaviour is controlled by a number of external class propertie...
[ "Outputs", "lines", "to", "a", "terminal", ".", "It", "uses", "shutil", ".", "get_terminal_size", "to", "determine", "the", "height", "of", "the", "terminal", ".", "It", "expects", "an", "iterator", "that", "returns", "a", "line", "at", "a", "time", "and",...
7e194247ea2adc1f124532935507cdffafa2c1f6
https://github.com/jdrumgoole/mongodbshell/blob/7e194247ea2adc1f124532935507cdffafa2c1f6/mongodbshell/__init__.py#L454-L536
train
This method will output a list of lines to a terminal.
jdrumgoole/mongodbshell
mongodbshell/__init__.py
MongoDB.doc_to_lines
def doc_to_lines(self, doc, format_func=None): """ Generator that converts a doc to a sequence of lines. :param doc: A dictionary :param format_func: customisable formatter defaults to pformat :return: a generator yielding a line at a time """ if format_func: ...
python
def doc_to_lines(self, doc, format_func=None): """ Generator that converts a doc to a sequence of lines. :param doc: A dictionary :param format_func: customisable formatter defaults to pformat :return: a generator yielding a line at a time """ if format_func: ...
[ "def", "doc_to_lines", "(", "self", ",", "doc", ",", "format_func", "=", "None", ")", ":", "if", "format_func", ":", "for", "l", "in", "format_func", "(", "doc", ")", ".", "splitlines", "(", ")", ":", "yield", "l", "elif", "self", ".", "pretty_print", ...
Generator that converts a doc to a sequence of lines. :param doc: A dictionary :param format_func: customisable formatter defaults to pformat :return: a generator yielding a line at a time
[ "Generator", "that", "converts", "a", "doc", "to", "a", "sequence", "of", "lines", ".", ":", "param", "doc", ":", "A", "dictionary", ":", "param", "format_func", ":", "customisable", "formatter", "defaults", "to", "pformat", ":", "return", ":", "a", "gener...
7e194247ea2adc1f124532935507cdffafa2c1f6
https://github.com/jdrumgoole/mongodbshell/blob/7e194247ea2adc1f124532935507cdffafa2c1f6/mongodbshell/__init__.py#L538-L553
train
Generator that converts a doc to a sequence of lines.
jdrumgoole/mongodbshell
mongodbshell/__init__.py
MongoDB.cursor_to_lines
def cursor_to_lines(self, cursor, format_func=None): """ Take a cursor that returns a list of docs and returns a generator yield each line of each doc a line at a time. :param cursor: A mongod cursor yielding docs (dictonaries) :param format_func: A customisable format function ...
python
def cursor_to_lines(self, cursor, format_func=None): """ Take a cursor that returns a list of docs and returns a generator yield each line of each doc a line at a time. :param cursor: A mongod cursor yielding docs (dictonaries) :param format_func: A customisable format function ...
[ "def", "cursor_to_lines", "(", "self", ",", "cursor", ",", "format_func", "=", "None", ")", ":", "for", "doc", "in", "cursor", ":", "yield", "from", "self", ".", "doc_to_lines", "(", "doc", ",", "format_func", ")" ]
Take a cursor that returns a list of docs and returns a generator yield each line of each doc a line at a time. :param cursor: A mongod cursor yielding docs (dictonaries) :param format_func: A customisable format function :return: a generator yielding a line at a time
[ "Take", "a", "cursor", "that", "returns", "a", "list", "of", "docs", "and", "returns", "a", "generator", "yield", "each", "line", "of", "each", "doc", "a", "line", "at", "a", "time", ".", ":", "param", "cursor", ":", "A", "mongod", "cursor", "yielding"...
7e194247ea2adc1f124532935507cdffafa2c1f6
https://github.com/jdrumgoole/mongodbshell/blob/7e194247ea2adc1f124532935507cdffafa2c1f6/mongodbshell/__init__.py#L555-L564
train
Take a cursor that returns a list of docs and returns a list of lines that are returned by the format_func function.
bitesofcode/projexui
projexui/widgets/xorbbrowserwidget/xorbquerywidget.py
ValueDelegate.setEditorData
def setEditorData( self, editor, index ): """ Set the data for the editor of this delegate to the inputed information. :param editor | <QWidget> index | <QModelIndex> """ item = self.parent().itemFromIndex(index) value ...
python
def setEditorData( self, editor, index ): """ Set the data for the editor of this delegate to the inputed information. :param editor | <QWidget> index | <QModelIndex> """ item = self.parent().itemFromIndex(index) value ...
[ "def", "setEditorData", "(", "self", ",", "editor", ",", "index", ")", ":", "item", "=", "self", ".", "parent", "(", ")", ".", "itemFromIndex", "(", "index", ")", "value", "=", "item", ".", "value", "(", ")", "tree", "=", "self", ".", "parent", "("...
Set the data for the editor of this delegate to the inputed information. :param editor | <QWidget> index | <QModelIndex>
[ "Set", "the", "data", "for", "the", "editor", "of", "this", "delegate", "to", "the", "inputed", "information", ".", ":", "param", "editor", "|", "<QWidget", ">", "index", "|", "<QModelIndex", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbbrowserwidget/xorbquerywidget.py#L157-L170
train
Set the data for the editor of this delegate to the inputed information.
bitesofcode/projexui
projexui/widgets/xorbbrowserwidget/xorbquerywidget.py
ValueDelegate.setModelData
def setModelData( self, editor, model, index ): """ Sets the data for the given index from the editor's value. :param editor | <QWidget> model | <QAbstractItemModel> index | <QModelIndex> """ tree = self.paren...
python
def setModelData( self, editor, model, index ): """ Sets the data for the given index from the editor's value. :param editor | <QWidget> model | <QAbstractItemModel> index | <QModelIndex> """ tree = self.paren...
[ "def", "setModelData", "(", "self", ",", "editor", ",", "model", ",", "index", ")", ":", "tree", "=", "self", ".", "parent", "(", ")", "querywidget", "=", "tree", ".", "parent", "(", ")", "factory", "=", "querywidget", ".", "factory", "(", ")", "item...
Sets the data for the given index from the editor's value. :param editor | <QWidget> model | <QAbstractItemModel> index | <QModelIndex>
[ "Sets", "the", "data", "for", "the", "given", "index", "from", "the", "editor", "s", "value", ".", ":", "param", "editor", "|", "<QWidget", ">", "model", "|", "<QAbstractItemModel", ">", "index", "|", "<QModelIndex", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbbrowserwidget/xorbquerywidget.py#L172-L186
train
Sets the data for the given index from the given editor s value.
bitesofcode/projexui
projexui/widgets/xorbbrowserwidget/xorbquerywidget.py
XQueryItem.columnType
def columnType( self ): """ Returns the column type for this item based on the current column. :return <orb.ColumnType> """ schema = self.treeWidget().parent().schema() if ( not schema ): return 0 column = schema.column(self.text(...
python
def columnType( self ): """ Returns the column type for this item based on the current column. :return <orb.ColumnType> """ schema = self.treeWidget().parent().schema() if ( not schema ): return 0 column = schema.column(self.text(...
[ "def", "columnType", "(", "self", ")", ":", "schema", "=", "self", ".", "treeWidget", "(", ")", ".", "parent", "(", ")", ".", "schema", "(", ")", "if", "(", "not", "schema", ")", ":", "return", "0", "column", "=", "schema", ".", "column", "(", "s...
Returns the column type for this item based on the current column. :return <orb.ColumnType>
[ "Returns", "the", "column", "type", "for", "this", "item", "based", "on", "the", "current", "column", ".", ":", "return", "<orb", ".", "ColumnType", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbbrowserwidget/xorbquerywidget.py#L267-L279
train
Returns the column type for this item based on the current column.
bitesofcode/projexui
projexui/widgets/xorbbrowserwidget/xorbquerywidget.py
XQueryItem.operatorType
def operatorType( self ): """ Returns the operator type for this item based on the current column. :return <Q.Op> """ return Q.Op[projex.text.joinWords(projex.text.capitalizeWords(self.text(1)))]
python
def operatorType( self ): """ Returns the operator type for this item based on the current column. :return <Q.Op> """ return Q.Op[projex.text.joinWords(projex.text.capitalizeWords(self.text(1)))]
[ "def", "operatorType", "(", "self", ")", ":", "return", "Q", ".", "Op", "[", "projex", ".", "text", ".", "joinWords", "(", "projex", ".", "text", ".", "capitalizeWords", "(", "self", ".", "text", "(", "1", ")", ")", ")", "]" ]
Returns the operator type for this item based on the current column. :return <Q.Op>
[ "Returns", "the", "operator", "type", "for", "this", "item", "based", "on", "the", "current", "column", ".", ":", "return", "<Q", ".", "Op", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbbrowserwidget/xorbquerywidget.py#L281-L287
train
Returns the operator type for this item based on the current column name.
bitesofcode/projexui
projexui/widgets/xorbbrowserwidget/xorbquerywidget.py
XQueryItem.query
def query( self ): """ Returns the query for this item by joining together its children, or building its data. :return <Query> || <QueryCompound> """ # create the query compound if ( self.childCount() ): q = Q() oper...
python
def query( self ): """ Returns the query for this item by joining together its children, or building its data. :return <Query> || <QueryCompound> """ # create the query compound if ( self.childCount() ): q = Q() oper...
[ "def", "query", "(", "self", ")", ":", "# create the query compound\r", "if", "(", "self", ".", "childCount", "(", ")", ")", ":", "q", "=", "Q", "(", ")", "operator", "=", "'and'", "for", "i", "in", "range", "(", "self", ".", "childCount", "(", ")", ...
Returns the query for this item by joining together its children, or building its data. :return <Query> || <QueryCompound>
[ "Returns", "the", "query", "for", "this", "item", "by", "joining", "together", "its", "children", "or", "building", "its", "data", ".", ":", "return", "<Query", ">", "||", "<QueryCompound", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbbrowserwidget/xorbquerywidget.py#L289-L316
train
Returns the query for this item by joining together its children and building its data.
bitesofcode/projexui
projexui/widgets/xorbbrowserwidget/xorbquerywidget.py
XQueryItem.setOperatorType
def setOperatorType( self, operatorType ): """ Sets the operator type value to the inputed type. :param opeartorType | <Q.Op> """ op_name = Q.Op[operatorType] op_name = projex.text.joinWords(op_name, ' ').lower() self.setText(1, op_name)
python
def setOperatorType( self, operatorType ): """ Sets the operator type value to the inputed type. :param opeartorType | <Q.Op> """ op_name = Q.Op[operatorType] op_name = projex.text.joinWords(op_name, ' ').lower() self.setText(1, op_name)
[ "def", "setOperatorType", "(", "self", ",", "operatorType", ")", ":", "op_name", "=", "Q", ".", "Op", "[", "operatorType", "]", "op_name", "=", "projex", ".", "text", ".", "joinWords", "(", "op_name", ",", "' '", ")", ".", "lower", "(", ")", "self", ...
Sets the operator type value to the inputed type. :param opeartorType | <Q.Op>
[ "Sets", "the", "operator", "type", "value", "to", "the", "inputed", "type", ".", ":", "param", "opeartorType", "|", "<Q", ".", "Op", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbbrowserwidget/xorbquerywidget.py#L326-L334
train
Sets the operator type value to the inputed type.
bitesofcode/projexui
projexui/widgets/xorbbrowserwidget/xorbquerywidget.py
XQueryItem.setValue
def setValue( self, value ): """ Sets the value for this item to the inputed value. :param value | <variant> """ self._value = value # map a list of choices to the system if ( isinstance(value, list) ): self.setText(2, ...
python
def setValue( self, value ): """ Sets the value for this item to the inputed value. :param value | <variant> """ self._value = value # map a list of choices to the system if ( isinstance(value, list) ): self.setText(2, ...
[ "def", "setValue", "(", "self", ",", "value", ")", ":", "self", ".", "_value", "=", "value", "# map a list of choices to the system\r", "if", "(", "isinstance", "(", "value", ",", "list", ")", ")", ":", "self", ".", "setText", "(", "2", ",", "'[%s]'", "%...
Sets the value for this item to the inputed value. :param value | <variant>
[ "Sets", "the", "value", "for", "this", "item", "to", "the", "inputed", "value", ".", ":", "param", "value", "|", "<variant", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbbrowserwidget/xorbquerywidget.py#L336-L348
train
Sets the value for this item to the inputed value.
bitesofcode/projexui
projexui/widgets/xorbbrowserwidget/xorbquerywidget.py
XQueryItem.summary
def summary( self ): """ Creates a text string representing the current query and its children for this item. :return <str> """ child_text = [] for c in range(self.childCount()): child = self.child(c) text =...
python
def summary( self ): """ Creates a text string representing the current query and its children for this item. :return <str> """ child_text = [] for c in range(self.childCount()): child = self.child(c) text =...
[ "def", "summary", "(", "self", ")", ":", "child_text", "=", "[", "]", "for", "c", "in", "range", "(", "self", ".", "childCount", "(", ")", ")", ":", "child", "=", "self", ".", "child", "(", "c", ")", "text", "=", "[", "child", ".", "text", "(",...
Creates a text string representing the current query and its children for this item. :return <str>
[ "Creates", "a", "text", "string", "representing", "the", "current", "query", "and", "its", "children", "for", "this", "item", ".", ":", "return", "<str", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbbrowserwidget/xorbquerywidget.py#L350-L369
train
Returns a text string representing the current query and its children.
bitesofcode/projexui
projexui/widgets/xorbbrowserwidget/xorbquerywidget.py
XOrbQueryWidget.addQuery
def addQuery( self ): """ Sets the query for this widget from the quick query text builder. """ insert_item = self.uiQueryTREE.currentItem() if ( insert_item and not insert_item.isSelected() ): insert_item = None # create the query if...
python
def addQuery( self ): """ Sets the query for this widget from the quick query text builder. """ insert_item = self.uiQueryTREE.currentItem() if ( insert_item and not insert_item.isSelected() ): insert_item = None # create the query if...
[ "def", "addQuery", "(", "self", ")", ":", "insert_item", "=", "self", ".", "uiQueryTREE", ".", "currentItem", "(", ")", "if", "(", "insert_item", "and", "not", "insert_item", ".", "isSelected", "(", ")", ")", ":", "insert_item", "=", "None", "# create the ...
Sets the query for this widget from the quick query text builder.
[ "Sets", "the", "query", "for", "this", "widget", "from", "the", "quick", "query", "text", "builder", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbbrowserwidget/xorbquerywidget.py#L455-L543
train
Sets the query for this widget from the quick query text builder.