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
viatoriche/microservices
microservices/queues/client.py
_queue.publish
def publish(self, message): """Publish message to queue :param message: message for publishing :type message: any serializable object :return: None """ return self.client.publish_to_queue(self.name, message=message)
python
def publish(self, message): """Publish message to queue :param message: message for publishing :type message: any serializable object :return: None """ return self.client.publish_to_queue(self.name, message=message)
[ "def", "publish", "(", "self", ",", "message", ")", ":", "return", "self", ".", "client", ".", "publish_to_queue", "(", "self", ".", "name", ",", "message", "=", "message", ")" ]
Publish message to queue :param message: message for publishing :type message: any serializable object :return: None
[ "Publish", "message", "to", "queue" ]
3510563edd15dc6131b8a948d6062856cd904ac7
https://github.com/viatoriche/microservices/blob/3510563edd15dc6131b8a948d6062856cd904ac7/microservices/queues/client.py#L63-L70
train
Publish a message to the queue
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.addButton
def addButton(self, button, role=QDialogButtonBox.ActionRole): """ Adds a custom button to the button box for this popup widget. :param button | <QAbstractButton> || <str> :return <button> || None (based on if a button or string was given) """ ...
python
def addButton(self, button, role=QDialogButtonBox.ActionRole): """ Adds a custom button to the button box for this popup widget. :param button | <QAbstractButton> || <str> :return <button> || None (based on if a button or string was given) """ ...
[ "def", "addButton", "(", "self", ",", "button", ",", "role", "=", "QDialogButtonBox", ".", "ActionRole", ")", ":", "return", "self", ".", "_buttonBox", ".", "addButton", "(", "button", ",", "role", ")" ]
Adds a custom button to the button box for this popup widget. :param button | <QAbstractButton> || <str> :return <button> || None (based on if a button or string was given)
[ "Adds", "a", "custom", "button", "to", "the", "button", "box", "for", "this", "popup", "widget", ".", ":", "param", "button", "|", "<QAbstractButton", ">", "||", "<str", ">", ":", "return", "<button", ">", "||", "None", "(", "based", "on", "if", "a", ...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L178-L186
train
Adds a custom button to the button box.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.adjustContentsMargins
def adjustContentsMargins( self ): """ Adjusts the contents for this widget based on the anchor and \ mode. """ anchor = self.anchor() mode = self.currentMode() # margins for a dialog if ( mode == XPopupWidget.Mode.Dialog ): ...
python
def adjustContentsMargins( self ): """ Adjusts the contents for this widget based on the anchor and \ mode. """ anchor = self.anchor() mode = self.currentMode() # margins for a dialog if ( mode == XPopupWidget.Mode.Dialog ): ...
[ "def", "adjustContentsMargins", "(", "self", ")", ":", "anchor", "=", "self", ".", "anchor", "(", ")", "mode", "=", "self", ".", "currentMode", "(", ")", "# margins for a dialog\r", "if", "(", "mode", "==", "XPopupWidget", ".", "Mode", ".", "Dialog", ")", ...
Adjusts the contents for this widget based on the anchor and \ mode.
[ "Adjusts", "the", "contents", "for", "this", "widget", "based", "on", "the", "anchor", "and", "\\", "mode", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L188-L222
train
Adjusts the contents of this popup widget based on the current anchor and mode.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.adjustMask
def adjustMask(self): """ Updates the alpha mask for this popup widget. """ if self.currentMode() == XPopupWidget.Mode.Dialog: self.clearMask() return path = self.borderPath() bitmap = QBitmap(self.width(), self.height()) ...
python
def adjustMask(self): """ Updates the alpha mask for this popup widget. """ if self.currentMode() == XPopupWidget.Mode.Dialog: self.clearMask() return path = self.borderPath() bitmap = QBitmap(self.width(), self.height()) ...
[ "def", "adjustMask", "(", "self", ")", ":", "if", "self", ".", "currentMode", "(", ")", "==", "XPopupWidget", ".", "Mode", ".", "Dialog", ":", "self", ".", "clearMask", "(", ")", "return", "path", "=", "self", ".", "borderPath", "(", ")", "bitmap", "...
Updates the alpha mask for this popup widget.
[ "Updates", "the", "alpha", "mask", "for", "this", "popup", "widget", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L224-L244
train
Updates the alpha mask for this popup widget.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.adjustSize
def adjustSize(self): """ Adjusts the size of this popup to best fit the new widget size. """ widget = self.centralWidget() if widget is None: super(XPopupWidget, self).adjustSize() return widget.adjustSize() hint = widge...
python
def adjustSize(self): """ Adjusts the size of this popup to best fit the new widget size. """ widget = self.centralWidget() if widget is None: super(XPopupWidget, self).adjustSize() return widget.adjustSize() hint = widge...
[ "def", "adjustSize", "(", "self", ")", ":", "widget", "=", "self", ".", "centralWidget", "(", ")", "if", "widget", "is", "None", ":", "super", "(", "XPopupWidget", ",", "self", ")", ".", "adjustSize", "(", ")", "return", "widget", ".", "adjustSize", "(...
Adjusts the size of this popup to best fit the new widget size.
[ "Adjusts", "the", "size", "of", "this", "popup", "to", "best", "fit", "the", "new", "widget", "size", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L246-L305
train
Adjusts the size of this popup to best fit the new widget size.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.accept
def accept(self): """ Emits the accepted signal and closes the popup. """ self._result = 1 if not self.signalsBlocked(): self.accepted.emit() if self.autoCloseOnAccept(): self.close()
python
def accept(self): """ Emits the accepted signal and closes the popup. """ self._result = 1 if not self.signalsBlocked(): self.accepted.emit() if self.autoCloseOnAccept(): self.close()
[ "def", "accept", "(", "self", ")", ":", "self", ".", "_result", "=", "1", "if", "not", "self", ".", "signalsBlocked", "(", ")", ":", "self", ".", "accepted", ".", "emit", "(", ")", "if", "self", ".", "autoCloseOnAccept", "(", ")", ":", "self", ".",...
Emits the accepted signal and closes the popup.
[ "Emits", "the", "accepted", "signal", "and", "closes", "the", "popup", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L308-L318
train
Emits the accepted signal and closes the popup.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.borderPath
def borderPath(self): """ Returns the border path that will be drawn for this widget. :return <QPainterPath> """ path = QPainterPath() x = 1 y = 1 w = self.width() - 2 h = self.height() - 2 pad = ...
python
def borderPath(self): """ Returns the border path that will be drawn for this widget. :return <QPainterPath> """ path = QPainterPath() x = 1 y = 1 w = self.width() - 2 h = self.height() - 2 pad = ...
[ "def", "borderPath", "(", "self", ")", ":", "path", "=", "QPainterPath", "(", ")", "x", "=", "1", "y", "=", "1", "w", "=", "self", ".", "width", "(", ")", "-", "2", "h", "=", "self", ".", "height", "(", ")", "-", "2", "pad", "=", "self", "....
Returns the border path that will be drawn for this widget. :return <QPainterPath>
[ "Returns", "the", "border", "path", "that", "will", "be", "drawn", "for", "this", "widget", ".", ":", "return", "<QPainterPath", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L372-L512
train
Returns the path that will be drawn for this widget.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.close
def close(self): """ Closes the popup widget and central widget. """ widget = self.centralWidget() if widget and not widget.close(): return super(XPopupWidget, self).close()
python
def close(self): """ Closes the popup widget and central widget. """ widget = self.centralWidget() if widget and not widget.close(): return super(XPopupWidget, self).close()
[ "def", "close", "(", "self", ")", ":", "widget", "=", "self", ".", "centralWidget", "(", ")", "if", "widget", "and", "not", "widget", ".", "close", "(", ")", ":", "return", "super", "(", "XPopupWidget", ",", "self", ")", ".", "close", "(", ")" ]
Closes the popup widget and central widget.
[ "Closes", "the", "popup", "widget", "and", "central", "widget", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L530-L538
train
Closes the popup widget and central widget.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.direction
def direction( self ): """ Returns the current direction parameter for this widget. :return <XPopupWidget.Direction> """ anchor = self.anchor() if ( anchor & (XPopupWidget.Anchor.TopLeft | XPopupWidget.Anchor.TopCenter | ...
python
def direction( self ): """ Returns the current direction parameter for this widget. :return <XPopupWidget.Direction> """ anchor = self.anchor() if ( anchor & (XPopupWidget.Anchor.TopLeft | XPopupWidget.Anchor.TopCenter | ...
[ "def", "direction", "(", "self", ")", ":", "anchor", "=", "self", ".", "anchor", "(", ")", "if", "(", "anchor", "&", "(", "XPopupWidget", ".", "Anchor", ".", "TopLeft", "|", "XPopupWidget", ".", "Anchor", ".", "TopCenter", "|", "XPopupWidget", ".", "An...
Returns the current direction parameter for this widget. :return <XPopupWidget.Direction>
[ "Returns", "the", "current", "direction", "parameter", "for", "this", "widget", ".", ":", "return", "<XPopupWidget", ".", "Direction", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L560-L583
train
Returns the current direction parameter for this widget.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.eventFilter
def eventFilter(self, object, event): """ Processes when the window is moving to update the position for the popup if in popup mode. :param object | <QObject> event | <QEvent> """ if not self.isVisible(): return Fals...
python
def eventFilter(self, object, event): """ Processes when the window is moving to update the position for the popup if in popup mode. :param object | <QObject> event | <QEvent> """ if not self.isVisible(): return Fals...
[ "def", "eventFilter", "(", "self", ",", "object", ",", "event", ")", ":", "if", "not", "self", ".", "isVisible", "(", ")", ":", "return", "False", "links", "=", "self", ".", "positionLinkedTo", "(", ")", "is_dialog", "=", "self", ".", "currentMode", "(...
Processes when the window is moving to update the position for the popup if in popup mode. :param object | <QObject> event | <QEvent>
[ "Processes", "when", "the", "window", "is", "moving", "to", "update", "the", "position", "for", "the", "popup", "if", "in", "popup", "mode", ".", ":", "param", "object", "|", "<QObject", ">", "event", "|", "<QEvent", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L594-L638
train
Returns True if the object is in the position of the object in the window False otherwise.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.handleButtonClick
def handleButtonClick(self, button): """ Handles the button click for this widget. If the Reset button was clicked, then the resetRequested signal will be emitted. All buttons will emit the buttonClicked signal. :param button | <QAbstractButton> """...
python
def handleButtonClick(self, button): """ Handles the button click for this widget. If the Reset button was clicked, then the resetRequested signal will be emitted. All buttons will emit the buttonClicked signal. :param button | <QAbstractButton> """...
[ "def", "handleButtonClick", "(", "self", ",", "button", ")", ":", "if", "(", "self", ".", "signalsBlocked", "(", ")", ")", ":", "return", "if", "(", "button", "==", "self", ".", "_buttonBox", ".", "button", "(", "QDialogButtonBox", ".", "Reset", ")", "...
Handles the button click for this widget. If the Reset button was clicked, then the resetRequested signal will be emitted. All buttons will emit the buttonClicked signal. :param button | <QAbstractButton>
[ "Handles", "the", "button", "click", "for", "this", "widget", ".", "If", "the", "Reset", "button", "was", "clicked", "then", "the", "resetRequested", "signal", "will", "be", "emitted", ".", "All", "buttons", "will", "emit", "the", "buttonClicked", "signal", ...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L641-L655
train
Handles the button click for this widget.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.keyPressEvent
def keyPressEvent( self, event ): """ Looks for the Esc key to close the popup. :param event | <QKeyEvent> """ if ( event.key() == Qt.Key_Escape ): self.reject() event.accept() return elif ( event.key()...
python
def keyPressEvent( self, event ): """ Looks for the Esc key to close the popup. :param event | <QKeyEvent> """ if ( event.key() == Qt.Key_Escape ): self.reject() event.accept() return elif ( event.key()...
[ "def", "keyPressEvent", "(", "self", ",", "event", ")", ":", "if", "(", "event", ".", "key", "(", ")", "==", "Qt", ".", "Key_Escape", ")", ":", "self", ".", "reject", "(", ")", "event", ".", "accept", "(", ")", "return", "elif", "(", "event", "."...
Looks for the Esc key to close the popup. :param event | <QKeyEvent>
[ "Looks", "for", "the", "Esc", "key", "to", "close", "the", "popup", ".", ":", "param", "event", "|", "<QKeyEvent", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L677-L694
train
Handles the key press event.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.mapAnchorFrom
def mapAnchorFrom(self, widget, point): """ Returns the anchor point that best fits within the given widget from the inputed global position. :param widget | <QWidget> point | <QPoint> :return <XPopupWidget.Anchor>...
python
def mapAnchorFrom(self, widget, point): """ Returns the anchor point that best fits within the given widget from the inputed global position. :param widget | <QWidget> point | <QPoint> :return <XPopupWidget.Anchor>...
[ "def", "mapAnchorFrom", "(", "self", ",", "widget", ",", "point", ")", ":", "screen_geom", "=", "QtGui", ".", "QDesktopWidget", "(", "self", ")", ".", "screenGeometry", "(", ")", "# calculate the end rect for each position\r", "Anchor", "=", "self", ".", "Anchor...
Returns the anchor point that best fits within the given widget from the inputed global position. :param widget | <QWidget> point | <QPoint> :return <XPopupWidget.Anchor>
[ "Returns", "the", "anchor", "point", "that", "best", "fits", "within", "the", "given", "widget", "from", "the", "inputed", "global", "position", ".", ":", "param", "widget", "|", "<QWidget", ">", "point", "|", "<QPoint", ">", ":", "return", "<XPopupWidget", ...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L696-L755
train
Returns the anchor point that best fits within the given widget from the inputed global position.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.popup
def popup(self, pos=None): """ Pops up this widget at the inputed position. The inputed point should \ be in global space. :param pos | <QPoint> :return <bool> success """ if self._first and self.centralWidget() is not None: ...
python
def popup(self, pos=None): """ Pops up this widget at the inputed position. The inputed point should \ be in global space. :param pos | <QPoint> :return <bool> success """ if self._first and self.centralWidget() is not None: ...
[ "def", "popup", "(", "self", ",", "pos", "=", "None", ")", ":", "if", "self", ".", "_first", "and", "self", ".", "centralWidget", "(", ")", "is", "not", "None", ":", "self", ".", "adjustSize", "(", ")", "self", ".", "_first", "=", "False", "if", ...
Pops up this widget at the inputed position. The inputed point should \ be in global space. :param pos | <QPoint> :return <bool> success
[ "Pops", "up", "this", "widget", "at", "the", "inputed", "position", ".", "The", "inputed", "point", "should", "\\", "be", "in", "global", "space", ".", ":", "param", "pos", "|", "<QPoint", ">", ":", "return", "<bool", ">", "success" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L757-L869
train
Returns true if the user has clicked the popup at the inputed position.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.paintEvent
def paintEvent(self, event): """ Overloads the paint event to handle painting pointers for the popup \ mode. :param event | <QPaintEvent> """ # use the base technique for the dialog mode if self.currentMode() == XPopupWidget.Mode.Dialog: ...
python
def paintEvent(self, event): """ Overloads the paint event to handle painting pointers for the popup \ mode. :param event | <QPaintEvent> """ # use the base technique for the dialog mode if self.currentMode() == XPopupWidget.Mode.Dialog: ...
[ "def", "paintEvent", "(", "self", ",", "event", ")", ":", "# use the base technique for the dialog mode\r", "if", "self", ".", "currentMode", "(", ")", "==", "XPopupWidget", ".", "Mode", ".", "Dialog", ":", "super", "(", "XPopupWidget", ",", "self", ")", ".", ...
Overloads the paint event to handle painting pointers for the popup \ mode. :param event | <QPaintEvent>
[ "Overloads", "the", "paint", "event", "to", "handle", "painting", "pointers", "for", "the", "popup", "\\", "mode", ".", ":", "param", "event", "|", "<QPaintEvent", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L871-L892
train
Override this method to handle the painting pointers for the popup mode and the popup widget.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.reject
def reject(self): """ Emits the accepted signal and closes the popup. """ self._result = 0 if not self.signalsBlocked(): self.rejected.emit() if self.autoCloseOnReject(): self.close()
python
def reject(self): """ Emits the accepted signal and closes the popup. """ self._result = 0 if not self.signalsBlocked(): self.rejected.emit() if self.autoCloseOnReject(): self.close()
[ "def", "reject", "(", "self", ")", ":", "self", ".", "_result", "=", "0", "if", "not", "self", ".", "signalsBlocked", "(", ")", ":", "self", ".", "rejected", ".", "emit", "(", ")", "if", "self", ".", "autoCloseOnReject", "(", ")", ":", "self", ".",...
Emits the accepted signal and closes the popup.
[ "Emits", "the", "accepted", "signal", "and", "closes", "the", "popup", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L914-L923
train
Emits the rejected signal and closes the popup.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.resizeEvent
def resizeEvent(self, event): """ Resizes this widget and updates the mask. :param event | <QResizeEvent> """ self.setUpdatesEnabled(False) super(XPopupWidget, self).resizeEvent(event) self.adjustMask() self.setUpdatesEnabl...
python
def resizeEvent(self, event): """ Resizes this widget and updates the mask. :param event | <QResizeEvent> """ self.setUpdatesEnabled(False) super(XPopupWidget, self).resizeEvent(event) self.adjustMask() self.setUpdatesEnabl...
[ "def", "resizeEvent", "(", "self", ",", "event", ")", ":", "self", ".", "setUpdatesEnabled", "(", "False", ")", "super", "(", "XPopupWidget", ",", "self", ")", ".", "resizeEvent", "(", "event", ")", "self", ".", "adjustMask", "(", ")", "self", ".", "se...
Resizes this widget and updates the mask. :param event | <QResizeEvent>
[ "Resizes", "this", "widget", "and", "updates", "the", "mask", ".", ":", "param", "event", "|", "<QResizeEvent", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L928-L944
train
Resizes this widget and updates the mask.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.setAnimated
def setAnimated(self, state): """ Sets whether or not the popup widget should animate its opacity when it is shown. :param state | <bool> """ self._animated = state self.setAttribute(Qt.WA_TranslucentBackground, state)
python
def setAnimated(self, state): """ Sets whether or not the popup widget should animate its opacity when it is shown. :param state | <bool> """ self._animated = state self.setAttribute(Qt.WA_TranslucentBackground, state)
[ "def", "setAnimated", "(", "self", ",", "state", ")", ":", "self", ".", "_animated", "=", "state", "self", ".", "setAttribute", "(", "Qt", ".", "WA_TranslucentBackground", ",", "state", ")" ]
Sets whether or not the popup widget should animate its opacity when it is shown. :param state | <bool>
[ "Sets", "whether", "or", "not", "the", "popup", "widget", "should", "animate", "its", "opacity", "when", "it", "is", "shown", ".", ":", "param", "state", "|", "<bool", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L954-L962
train
Sets whether or not the popup widget should animate its opacity when it is shown.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.setAutoDefault
def setAutoDefault(self, state): """ Sets whether or not the buttons should respond to defaulting options when the user is interacting with it. :param state | <bool> """ self._autoDefault = state for button in self.buttonBox().buttons(): ...
python
def setAutoDefault(self, state): """ Sets whether or not the buttons should respond to defaulting options when the user is interacting with it. :param state | <bool> """ self._autoDefault = state for button in self.buttonBox().buttons(): ...
[ "def", "setAutoDefault", "(", "self", ",", "state", ")", ":", "self", ".", "_autoDefault", "=", "state", "for", "button", "in", "self", ".", "buttonBox", "(", ")", ".", "buttons", "(", ")", ":", "button", ".", "setAutoDefault", "(", "state", ")", "butt...
Sets whether or not the buttons should respond to defaulting options when the user is interacting with it. :param state | <bool>
[ "Sets", "whether", "or", "not", "the", "buttons", "should", "respond", "to", "defaulting", "options", "when", "the", "user", "is", "interacting", "with", "it", ".", ":", "param", "state", "|", "<bool", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L980-L990
train
Sets whether or not the buttons should respond to defaulting options when the user is interacting with it.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.setCentralWidget
def setCentralWidget( self, widget ): """ Sets the central widget that will be used by this popup. :param widget | <QWidget> || None """ self._scrollArea.takeWidget() self._scrollArea.setWidget(widget) self.adjustSize()
python
def setCentralWidget( self, widget ): """ Sets the central widget that will be used by this popup. :param widget | <QWidget> || None """ self._scrollArea.takeWidget() self._scrollArea.setWidget(widget) self.adjustSize()
[ "def", "setCentralWidget", "(", "self", ",", "widget", ")", ":", "self", ".", "_scrollArea", ".", "takeWidget", "(", ")", "self", ".", "_scrollArea", ".", "setWidget", "(", "widget", ")", "self", ".", "adjustSize", "(", ")" ]
Sets the central widget that will be used by this popup. :param widget | <QWidget> || None
[ "Sets", "the", "central", "widget", "that", "will", "be", "used", "by", "this", "popup", ".", ":", "param", "widget", "|", "<QWidget", ">", "||", "None" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L1020-L1029
train
Sets the central widget that will be used by this popup.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.setCurrentMode
def setCurrentMode( self, mode ): """ Sets the current mode for this dialog to the inputed mode. :param mode | <XPopupWidget.Mode> """ if ( self._currentMode == mode ): return self._currentMode = mode self.updateModeSet...
python
def setCurrentMode( self, mode ): """ Sets the current mode for this dialog to the inputed mode. :param mode | <XPopupWidget.Mode> """ if ( self._currentMode == mode ): return self._currentMode = mode self.updateModeSet...
[ "def", "setCurrentMode", "(", "self", ",", "mode", ")", ":", "if", "(", "self", ".", "_currentMode", "==", "mode", ")", ":", "return", "self", ".", "_currentMode", "=", "mode", "self", ".", "updateModeSettings", "(", ")" ]
Sets the current mode for this dialog to the inputed mode. :param mode | <XPopupWidget.Mode>
[ "Sets", "the", "current", "mode", "for", "this", "dialog", "to", "the", "inputed", "mode", ".", ":", "param", "mode", "|", "<XPopupWidget", ".", "Mode", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L1031-L1041
train
Sets the current mode for this dialog.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.setDirection
def setDirection( self, direction ): """ Sets the direction for this widget to the inputed direction. :param direction | <XPopupWidget.Direction> """ if ( direction == XPopupWidget.Direction.North ): self.setAnchor(XPopupWidget.Anchor.TopCenter) ...
python
def setDirection( self, direction ): """ Sets the direction for this widget to the inputed direction. :param direction | <XPopupWidget.Direction> """ if ( direction == XPopupWidget.Direction.North ): self.setAnchor(XPopupWidget.Anchor.TopCenter) ...
[ "def", "setDirection", "(", "self", ",", "direction", ")", ":", "if", "(", "direction", "==", "XPopupWidget", ".", "Direction", ".", "North", ")", ":", "self", ".", "setAnchor", "(", "XPopupWidget", ".", "Anchor", ".", "TopCenter", ")", "elif", "(", "dir...
Sets the direction for this widget to the inputed direction. :param direction | <XPopupWidget.Direction>
[ "Sets", "the", "direction", "for", "this", "widget", "to", "the", "inputed", "direction", ".", ":", "param", "direction", "|", "<XPopupWidget", ".", "Direction", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L1052-L1068
train
Sets the direction for this popup widget.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.setPalette
def setPalette(self, palette): """ Sets the palette for this widget and the scroll area. :param palette | <QPalette> """ super(XPopupWidget, self).setPalette(palette) self._scrollArea.setPalette(palette)
python
def setPalette(self, palette): """ Sets the palette for this widget and the scroll area. :param palette | <QPalette> """ super(XPopupWidget, self).setPalette(palette) self._scrollArea.setPalette(palette)
[ "def", "setPalette", "(", "self", ",", "palette", ")", ":", "super", "(", "XPopupWidget", ",", "self", ")", ".", "setPalette", "(", "palette", ")", "self", ".", "_scrollArea", ".", "setPalette", "(", "palette", ")" ]
Sets the palette for this widget and the scroll area. :param palette | <QPalette>
[ "Sets", "the", "palette", "for", "this", "widget", "and", "the", "scroll", "area", ".", ":", "param", "palette", "|", "<QPalette", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L1070-L1077
train
Sets the palette for this popup widget and the scroll area.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.setPositionLinkedTo
def setPositionLinkedTo(self, widgets): """ Sets the widget that this popup will be linked to for positional changes. :param widgets | <QWidget> || [<QWidget>, ..] """ if type(widgets) in (list, set, tuple): new_widgets = list(widgets) ...
python
def setPositionLinkedTo(self, widgets): """ Sets the widget that this popup will be linked to for positional changes. :param widgets | <QWidget> || [<QWidget>, ..] """ if type(widgets) in (list, set, tuple): new_widgets = list(widgets) ...
[ "def", "setPositionLinkedTo", "(", "self", ",", "widgets", ")", ":", "if", "type", "(", "widgets", ")", "in", "(", "list", ",", "set", ",", "tuple", ")", ":", "new_widgets", "=", "list", "(", "widgets", ")", "else", ":", "new_widgets", "=", "[", "]",...
Sets the widget that this popup will be linked to for positional changes. :param widgets | <QWidget> || [<QWidget>, ..]
[ "Sets", "the", "widget", "that", "this", "popup", "will", "be", "linked", "to", "for", "positional", "changes", ".", ":", "param", "widgets", "|", "<QWidget", ">", "||", "[", "<QWidget", ">", "..", "]" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L1097-L1114
train
Sets the widgets that this popup will be linked to for positional changes.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.timerEvent
def timerEvent( self, event ): """ When the timer finishes, hide the tooltip popup widget. :param event | <QEvent> """ if self.currentMode() == XPopupWidget.Mode.ToolTip: self.killTimer(event.timerId()) event.accept() sel...
python
def timerEvent( self, event ): """ When the timer finishes, hide the tooltip popup widget. :param event | <QEvent> """ if self.currentMode() == XPopupWidget.Mode.ToolTip: self.killTimer(event.timerId()) event.accept() sel...
[ "def", "timerEvent", "(", "self", ",", "event", ")", ":", "if", "self", ".", "currentMode", "(", ")", "==", "XPopupWidget", ".", "Mode", ".", "ToolTip", ":", "self", ".", "killTimer", "(", "event", ".", "timerId", "(", ")", ")", "event", ".", "accept...
When the timer finishes, hide the tooltip popup widget. :param event | <QEvent>
[ "When", "the", "timer", "finishes", "hide", "the", "tooltip", "popup", "widget", ".", ":", "param", "event", "|", "<QEvent", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L1142-L1153
train
Called when the timer finishes.
bitesofcode/projexui
projexui/widgets/xpopupwidget.py
XPopupWidget.showToolTip
def showToolTip( text, point = None, anchor = None, parent = None, background = None, foreground = None, key = None, seconds = 5 ): ""...
python
def showToolTip( text, point = None, anchor = None, parent = None, background = None, foreground = None, key = None, seconds = 5 ): ""...
[ "def", "showToolTip", "(", "text", ",", "point", "=", "None", ",", "anchor", "=", "None", ",", "parent", "=", "None", ",", "background", "=", "None", ",", "foreground", "=", "None", ",", "key", "=", "None", ",", "seconds", "=", "5", ")", ":", "if",...
Displays a popup widget as a tooltip bubble. :param text | <str> point | <QPoint> || None anchor | <XPopupWidget.Mode.Anchor> || None parent | <QWidget> || None background | <QColor> || No...
[ "Displays", "a", "popup", "widget", "as", "a", "tooltip", "bubble", ".", ":", "param", "text", "|", "<str", ">", "point", "|", "<QPoint", ">", "||", "None", "anchor", "|", "<XPopupWidget", ".", "Mode", ".", "Anchor", ">", "||", "None", "parent", "|", ...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupwidget.py#L1212-L1281
train
Displays a popup widget as a tooltip bubble.
bitesofcode/projexui
projexui/completers/xquerycompleter.py
XQueryCompleter.pathFromIndex
def pathFromIndex( self, index ): """ Returns the joined path from the given model index. This will join together the full path with periods. :param index | <QModelIndex> :return <str> """ item = self._model.itemFromIndex(index...
python
def pathFromIndex( self, index ): """ Returns the joined path from the given model index. This will join together the full path with periods. :param index | <QModelIndex> :return <str> """ item = self._model.itemFromIndex(index...
[ "def", "pathFromIndex", "(", "self", ",", "index", ")", ":", "item", "=", "self", ".", "_model", ".", "itemFromIndex", "(", "index", ")", "out", "=", "[", "]", "while", "(", "item", ")", ":", "out", ".", "append", "(", "nativestring", "(", "item", ...
Returns the joined path from the given model index. This will join together the full path with periods. :param index | <QModelIndex> :return <str>
[ "Returns", "the", "joined", "path", "from", "the", "given", "model", "index", ".", "This", "will", "join", "together", "the", "full", "path", "with", "periods", ".", ":", "param", "index", "|", "<QModelIndex", ">", ":", "return", "<str", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/completers/xquerycompleter.py#L49-L65
train
Returns the full path from the given index.
bitesofcode/projexui
projexui/widgets/xloggersplashscreen.py
XSplashHandler.emit
def emit( self, record ): """ Throws an error based on the information that the logger reported, given the logging level. :param record | <logging.LogRecord> """ msg = self._formatter.format(record) align = self._splash.textAlignment() fg ...
python
def emit( self, record ): """ Throws an error based on the information that the logger reported, given the logging level. :param record | <logging.LogRecord> """ msg = self._formatter.format(record) align = self._splash.textAlignment() fg ...
[ "def", "emit", "(", "self", ",", "record", ")", ":", "msg", "=", "self", ".", "_formatter", ".", "format", "(", "record", ")", "align", "=", "self", ".", "_splash", ".", "textAlignment", "(", ")", "fg", "=", "self", ".", "_splash", ".", "textColor", ...
Throws an error based on the information that the logger reported, given the logging level. :param record | <logging.LogRecord>
[ "Throws", "an", "error", "based", "on", "the", "information", "that", "the", "logger", "reported", "given", "the", "logging", "level", ".", ":", "param", "record", "|", "<logging", ".", "LogRecord", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xloggersplashscreen.py#L36-L47
train
Emits a message based on the information that the logger reported.
bitesofcode/projexui
projexui/widgets/xpageswidget.py
XPagesWidget.gotoNext
def gotoNext( self ): """ Goes to the next page. :sa setCurrentPage """ next_page = self.currentPage() + 1 if ( next_page > self.pageCount() ): return self.setCurrentPage(next_page)
python
def gotoNext( self ): """ Goes to the next page. :sa setCurrentPage """ next_page = self.currentPage() + 1 if ( next_page > self.pageCount() ): return self.setCurrentPage(next_page)
[ "def", "gotoNext", "(", "self", ")", ":", "next_page", "=", "self", ".", "currentPage", "(", ")", "+", "1", "if", "(", "next_page", ">", "self", ".", "pageCount", "(", ")", ")", ":", "return", "self", ".", "setCurrentPage", "(", "next_page", ")" ]
Goes to the next page. :sa setCurrentPage
[ "Goes", "to", "the", "next", "page", ".", ":", "sa", "setCurrentPage" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpageswidget.py#L125-L135
train
Goes to the next page.
bitesofcode/projexui
projexui/widgets/xpageswidget.py
XPagesWidget.pageSizePicked
def pageSizePicked( self, pageSize ): """ Updates when the user picks a page size. :param pageSize | <str> """ try: pageSize = int(self._pageSizeCombo.currentText()) except ValueError: pageSize = 0 self.set...
python
def pageSizePicked( self, pageSize ): """ Updates when the user picks a page size. :param pageSize | <str> """ try: pageSize = int(self._pageSizeCombo.currentText()) except ValueError: pageSize = 0 self.set...
[ "def", "pageSizePicked", "(", "self", ",", "pageSize", ")", ":", "try", ":", "pageSize", "=", "int", "(", "self", ".", "_pageSizeCombo", ".", "currentText", "(", ")", ")", "except", "ValueError", ":", "pageSize", "=", "0", "self", ".", "setPageSize", "("...
Updates when the user picks a page size. :param pageSize | <str>
[ "Updates", "when", "the", "user", "picks", "a", "page", "size", ".", ":", "param", "pageSize", "|", "<str", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpageswidget.py#L193-L205
train
Updates when the user picks a page size.
bitesofcode/projexui
projexui/widgets/xpageswidget.py
XPagesWidget.refreshLabels
def refreshLabels( self ): """ Refreshes the labels to display the proper title and count information. """ itemCount = self.itemCount() title = self.itemsTitle() if ( not itemCount ): self._itemsLabel.setText(' %s per page' % title) e...
python
def refreshLabels( self ): """ Refreshes the labels to display the proper title and count information. """ itemCount = self.itemCount() title = self.itemsTitle() if ( not itemCount ): self._itemsLabel.setText(' %s per page' % title) e...
[ "def", "refreshLabels", "(", "self", ")", ":", "itemCount", "=", "self", ".", "itemCount", "(", ")", "title", "=", "self", ".", "itemsTitle", "(", ")", "if", "(", "not", "itemCount", ")", ":", "self", ".", "_itemsLabel", ".", "setText", "(", "' %s per ...
Refreshes the labels to display the proper title and count information.
[ "Refreshes", "the", "labels", "to", "display", "the", "proper", "title", "and", "count", "information", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpageswidget.py#L207-L218
train
Refreshes the labels to display the proper title and count information.
bitesofcode/projexui
projexui/widgets/xpageswidget.py
XPagesWidget.setCurrentPage
def setCurrentPage( self, pageno ): """ Sets the current page for this widget to the inputed page. :param pageno | <int> """ if ( pageno == self._currentPage ): return if ( pageno <= 0 ): pageno = 1 ...
python
def setCurrentPage( self, pageno ): """ Sets the current page for this widget to the inputed page. :param pageno | <int> """ if ( pageno == self._currentPage ): return if ( pageno <= 0 ): pageno = 1 ...
[ "def", "setCurrentPage", "(", "self", ",", "pageno", ")", ":", "if", "(", "pageno", "==", "self", ".", "_currentPage", ")", ":", "return", "if", "(", "pageno", "<=", "0", ")", ":", "pageno", "=", "1", "self", ".", "_currentPage", "=", "pageno", "self...
Sets the current page for this widget to the inputed page. :param pageno | <int>
[ "Sets", "the", "current", "page", "for", "this", "widget", "to", "the", "inputed", "page", ".", ":", "param", "pageno", "|", "<int", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpageswidget.py#L221-L243
train
Sets the current page for this widget.
bitesofcode/projexui
projexui/widgets/xpageswidget.py
XPagesWidget.setPageCount
def setPageCount( self, pageCount ): """ Sets the number of pages that this widget holds. :param pageCount | <int> """ if ( pageCount == self._pageCount ): return pageCount = max(1, pageCount) self._pageCount ...
python
def setPageCount( self, pageCount ): """ Sets the number of pages that this widget holds. :param pageCount | <int> """ if ( pageCount == self._pageCount ): return pageCount = max(1, pageCount) self._pageCount ...
[ "def", "setPageCount", "(", "self", ",", "pageCount", ")", ":", "if", "(", "pageCount", "==", "self", ".", "_pageCount", ")", ":", "return", "pageCount", "=", "max", "(", "1", ",", "pageCount", ")", "self", ".", "_pageCount", "=", "pageCount", "self", ...
Sets the number of pages that this widget holds. :param pageCount | <int>
[ "Sets", "the", "number", "of", "pages", "that", "this", "widget", "holds", ".", ":", "param", "pageCount", "|", "<int", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpageswidget.py#L266-L291
train
Sets the number of pages that this widget holds.
bitesofcode/projexui
projexui/widgets/xpageswidget.py
XPagesWidget.setPageSize
def setPageSize( self, pageSize ): """ Sets the number of items that should be visible in a page. Setting the value to 0 will use all sizes :return <int> """ if self._pageSize == pageSize: return self._pageSize = pageSi...
python
def setPageSize( self, pageSize ): """ Sets the number of items that should be visible in a page. Setting the value to 0 will use all sizes :return <int> """ if self._pageSize == pageSize: return self._pageSize = pageSi...
[ "def", "setPageSize", "(", "self", ",", "pageSize", ")", ":", "if", "self", ".", "_pageSize", "==", "pageSize", ":", "return", "self", ".", "_pageSize", "=", "pageSize", "# update the display size\r", "ssize", "=", "nativestring", "(", "pageSize", ")", "if", ...
Sets the number of items that should be visible in a page. Setting the value to 0 will use all sizes :return <int>
[ "Sets", "the", "number", "of", "items", "that", "should", "be", "visible", "in", "a", "page", ".", "Setting", "the", "value", "to", "0", "will", "use", "all", "sizes", ":", "return", "<int", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpageswidget.py#L294-L314
train
Updates the page size of the items that should be displayed in a page.
bitesofcode/projexui
projexui/widgets/xpageswidget.py
XPagesWidget.setPageSizeOptions
def setPageSizeOptions( self, options ): """ Sets the options that will be displayed for this default size. :param options | [<str>,. ..] """ self._pageSizeCombo.blockSignals(True) self._pageSizeCombo.addItems(options) ssize = nativ...
python
def setPageSizeOptions( self, options ): """ Sets the options that will be displayed for this default size. :param options | [<str>,. ..] """ self._pageSizeCombo.blockSignals(True) self._pageSizeCombo.addItems(options) ssize = nativ...
[ "def", "setPageSizeOptions", "(", "self", ",", "options", ")", ":", "self", ".", "_pageSizeCombo", ".", "blockSignals", "(", "True", ")", "self", ".", "_pageSizeCombo", ".", "addItems", "(", "options", ")", "ssize", "=", "nativestring", "(", "self", ".", "...
Sets the options that will be displayed for this default size. :param options | [<str>,. ..]
[ "Sets", "the", "options", "that", "will", "be", "displayed", "for", "this", "default", "size", ".", ":", "param", "options", "|", "[", "<str", ">", ".", "..", "]" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpageswidget.py#L316-L331
train
Sets the options that will be displayed for this default size.
mikhaildubov/AST-text-analysis
east/utils.py
text_to_strings_collection
def text_to_strings_collection(text, words=3): """ Splits the text to a collection of strings; a GAST for such a split collection usually produces better results in keyword matching that a GAST for the whole text. The word parameters determines how many words each string in the collection shall ...
python
def text_to_strings_collection(text, words=3): """ Splits the text to a collection of strings; a GAST for such a split collection usually produces better results in keyword matching that a GAST for the whole text. The word parameters determines how many words each string in the collection shall ...
[ "def", "text_to_strings_collection", "(", "text", ",", "words", "=", "3", ")", ":", "text", "=", "prepare_text", "(", "text", ")", "strings_collection", "=", "tokenize", "(", "text", ")", "strings_collection", "=", "filter", "(", "lambda", "s", ":", "len", ...
Splits the text to a collection of strings; a GAST for such a split collection usually produces better results in keyword matching that a GAST for the whole text. The word parameters determines how many words each string in the collection shall consist of (3 by default) return: Unicode
[ "Splits", "the", "text", "to", "a", "collection", "of", "strings", ";", "a", "GAST", "for", "such", "a", "split", "collection", "usually", "produces", "better", "results", "in", "keyword", "matching", "that", "a", "GAST", "for", "the", "whole", "text", "."...
055ad8d2492c100bbbaa25309ec1074bdf1dfaa5
https://github.com/mikhaildubov/AST-text-analysis/blob/055ad8d2492c100bbbaa25309ec1074bdf1dfaa5/east/utils.py#L49-L79
train
Splits the text into a collection of strings ; returns a list of lists of lists each containing the strings in the collection.
mikhaildubov/AST-text-analysis
east/utils.py
import_modules_from_package
def import_modules_from_package(package): """Import modules from package and append into sys.modules :param package: full package name, e.g. east.asts """ path = [os.path.dirname(__file__), '..'] + package.split('.') path = os.path.join(*path) for root, dirs, files in os.walk(path): for...
python
def import_modules_from_package(package): """Import modules from package and append into sys.modules :param package: full package name, e.g. east.asts """ path = [os.path.dirname(__file__), '..'] + package.split('.') path = os.path.join(*path) for root, dirs, files in os.walk(path): for...
[ "def", "import_modules_from_package", "(", "package", ")", ":", "path", "=", "[", "os", ".", "path", ".", "dirname", "(", "__file__", ")", ",", "'..'", "]", "+", "package", ".", "split", "(", "'.'", ")", "path", "=", "os", ".", "path", ".", "join", ...
Import modules from package and append into sys.modules :param package: full package name, e.g. east.asts
[ "Import", "modules", "from", "package", "and", "append", "into", "sys", ".", "modules" ]
055ad8d2492c100bbbaa25309ec1074bdf1dfaa5
https://github.com/mikhaildubov/AST-text-analysis/blob/055ad8d2492c100bbbaa25309ec1074bdf1dfaa5/east/utils.py#L119-L133
train
Import modules from package and append into sys. modules ArcGIS
bearyinnovative/bearychat.py
bearychat/openapi/client.py
Requester.request
def request(self, request_method, api_method, *args, **kwargs): """Perform a request. Args: request_method: HTTP method for this request. api_method: API method name for this request. *args: Extra arguments to pass to the request. **kwargs: Extra keyword ...
python
def request(self, request_method, api_method, *args, **kwargs): """Perform a request. Args: request_method: HTTP method for this request. api_method: API method name for this request. *args: Extra arguments to pass to the request. **kwargs: Extra keyword ...
[ "def", "request", "(", "self", ",", "request_method", ",", "api_method", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "url", "=", "self", ".", "_build_url", "(", "api_method", ")", "resp", "=", "requests", ".", "request", "(", "request_method", ...
Perform a request. Args: request_method: HTTP method for this request. api_method: API method name for this request. *args: Extra arguments to pass to the request. **kwargs: Extra keyword arguments to pass to the request. Returns: A dict cont...
[ "Perform", "a", "request", "." ]
6c7af2d215c2ff7135bb5af66ca333d0ea1089fd
https://github.com/bearyinnovative/bearychat.py/blob/6c7af2d215c2ff7135bb5af66ca333d0ea1089fd/bearychat/openapi/client.py#L82-L109
train
Perform a request to BearyChat s OpenAPI endpoint.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNodeAnimation.updateCurrentValue
def updateCurrentValue(self, value): """ Disables snapping during the current value update to ensure a smooth transition for node animations. Since this can only be called via code, we don't need to worry about snapping to the grid for a user. """ xsnap = None ys...
python
def updateCurrentValue(self, value): """ Disables snapping during the current value update to ensure a smooth transition for node animations. Since this can only be called via code, we don't need to worry about snapping to the grid for a user. """ xsnap = None ys...
[ "def", "updateCurrentValue", "(", "self", ",", "value", ")", ":", "xsnap", "=", "None", "ysnap", "=", "None", "if", "value", "!=", "self", ".", "endValue", "(", ")", ":", "xsnap", "=", "self", ".", "targetObject", "(", ")", ".", "isXSnappedToGrid", "("...
Disables snapping during the current value update to ensure a smooth transition for node animations. Since this can only be called via code, we don't need to worry about snapping to the grid for a user.
[ "Disables", "snapping", "during", "the", "current", "value", "update", "to", "ensure", "a", "smooth", "transition", "for", "node", "animations", ".", "Since", "this", "can", "only", "be", "called", "via", "code", "we", "don", "t", "need", "to", "worry", "a...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L69-L89
train
Disables snapping during the current value update to ensure a smooth transition for node animations.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.adjustTitleFont
def adjustTitleFont(self): """ Adjusts the font used for the title based on the current with and \ display name. """ left, top, right, bottom = self.contentsMargins() r = self.roundingRadius() # include text padding left += 5 + r / 2 top +...
python
def adjustTitleFont(self): """ Adjusts the font used for the title based on the current with and \ display name. """ left, top, right, bottom = self.contentsMargins() r = self.roundingRadius() # include text padding left += 5 + r / 2 top +...
[ "def", "adjustTitleFont", "(", "self", ")", ":", "left", ",", "top", ",", "right", ",", "bottom", "=", "self", ".", "contentsMargins", "(", ")", "r", "=", "self", ".", "roundingRadius", "(", ")", "# include text padding", "left", "+=", "5", "+", "r", "...
Adjusts the font used for the title based on the current with and \ display name.
[ "Adjusts", "the", "font", "used", "for", "the", "title", "based", "on", "the", "current", "with", "and", "\\", "display", "name", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L196-L224
train
Adjusts the font used for the title based on the current with and \ display name.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.adjustSize
def adjustSize( self ): """ Adjusts the size of this node to support the length of its contents. """ cell = self.scene().cellWidth() * 2 minheight = cell minwidth = 2 * cell # fit to the grid size metrics = QFontMetrics(QApplication.font()) ...
python
def adjustSize( self ): """ Adjusts the size of this node to support the length of its contents. """ cell = self.scene().cellWidth() * 2 minheight = cell minwidth = 2 * cell # fit to the grid size metrics = QFontMetrics(QApplication.font()) ...
[ "def", "adjustSize", "(", "self", ")", ":", "cell", "=", "self", ".", "scene", "(", ")", ".", "cellWidth", "(", ")", "*", "2", "minheight", "=", "cell", "minwidth", "=", "2", "*", "cell", "# fit to the grid size", "metrics", "=", "QFontMetrics", "(", "...
Adjusts the size of this node to support the length of its contents.
[ "Adjusts", "the", "size", "of", "this", "node", "to", "support", "the", "length", "of", "its", "contents", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L226-L261
train
Adjusts the size of this node to support the length of its contents.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.boundingRect
def boundingRect( self ): """ Determines the bounding rectangle for this node. :return <QRectF> """ rect = super(XNode, self).boundingRect() pad = self.highlightPadding() x = rect.x() - pad / 2.0 y = rect.y() - pad / 2.0 w = r...
python
def boundingRect( self ): """ Determines the bounding rectangle for this node. :return <QRectF> """ rect = super(XNode, self).boundingRect() pad = self.highlightPadding() x = rect.x() - pad / 2.0 y = rect.y() - pad / 2.0 w = r...
[ "def", "boundingRect", "(", "self", ")", ":", "rect", "=", "super", "(", "XNode", ",", "self", ")", ".", "boundingRect", "(", ")", "pad", "=", "self", ".", "highlightPadding", "(", ")", "x", "=", "rect", ".", "x", "(", ")", "-", "pad", "/", "2.0"...
Determines the bounding rectangle for this node. :return <QRectF>
[ "Determines", "the", "bounding", "rectangle", "for", "this", "node", ".", ":", "return", "<QRectF", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L299-L313
train
Determines the bounding rectangle for this node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.brush
def brush( self ): """ Return the main brush for this node. :return <QBrush> """ # create the background brush grad = QLinearGradient() rect = self.rect() grad.setStart(QPointF(0, rect.y())) grad.setFinalStop(QPointF(0, rect.b...
python
def brush( self ): """ Return the main brush for this node. :return <QBrush> """ # create the background brush grad = QLinearGradient() rect = self.rect() grad.setStart(QPointF(0, rect.y())) grad.setFinalStop(QPointF(0, rect.b...
[ "def", "brush", "(", "self", ")", ":", "# create the background brush", "grad", "=", "QLinearGradient", "(", ")", "rect", "=", "self", ".", "rect", "(", ")", "grad", ".", "setStart", "(", "QPointF", "(", "0", ",", "rect", ".", "y", "(", ")", ")", ")"...
Return the main brush for this node. :return <QBrush>
[ "Return", "the", "main", "brush", "for", "this", "node", ".", ":", "return", "<QBrush", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L315-L331
train
Return the main brush for this node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.centerOn
def centerOn(self, point): """ Centers this node on the inputed point. :param point | <QPointF> """ rect = self.rect() x = point.x() - rect.width() / 2.0 y = point.y() - rect.height() / 2.0 self.setPos(x, y)
python
def centerOn(self, point): """ Centers this node on the inputed point. :param point | <QPointF> """ rect = self.rect() x = point.x() - rect.width() / 2.0 y = point.y() - rect.height() / 2.0 self.setPos(x, y)
[ "def", "centerOn", "(", "self", ",", "point", ")", ":", "rect", "=", "self", ".", "rect", "(", ")", "x", "=", "point", ".", "x", "(", ")", "-", "rect", ".", "width", "(", ")", "/", "2.0", "y", "=", "point", ".", "y", "(", ")", "-", "rect", ...
Centers this node on the inputed point. :param point | <QPointF>
[ "Centers", "this", "node", "on", "the", "inputed", "point", ".", ":", "param", "point", "|", "<QPointF", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L333-L343
train
Centers this node on the inputed point.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.clearConnections
def clearConnections( self, cls ): """ Clears all the connections for this node. :param cls | <subclass of XNodeConnection> || None :return <int> | number of connections removed """ count = 0 for connection in self.connections(cls): ...
python
def clearConnections( self, cls ): """ Clears all the connections for this node. :param cls | <subclass of XNodeConnection> || None :return <int> | number of connections removed """ count = 0 for connection in self.connections(cls): ...
[ "def", "clearConnections", "(", "self", ",", "cls", ")", ":", "count", "=", "0", "for", "connection", "in", "self", ".", "connections", "(", "cls", ")", ":", "connection", ".", "remove", "(", ")", "count", "+=", "1", "return", "count" ]
Clears all the connections for this node. :param cls | <subclass of XNodeConnection> || None :return <int> | number of connections removed
[ "Clears", "all", "the", "connections", "for", "this", "node", ".", ":", "param", "cls", "|", "<subclass", "of", "XNodeConnection", ">", "||", "None", ":", "return", "<int", ">", "|", "number", "of", "connections", "removed" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L345-L357
train
Clears all the connections for this node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.connections
def connections( self, cls = None ): """ Returns a list of connections from the scene that match the inputed class for this node. :param cls | <subclass of XNodeConnection> || None :return [<XNodeConnection>, ..] """ scene = self.scene()...
python
def connections( self, cls = None ): """ Returns a list of connections from the scene that match the inputed class for this node. :param cls | <subclass of XNodeConnection> || None :return [<XNodeConnection>, ..] """ scene = self.scene()...
[ "def", "connections", "(", "self", ",", "cls", "=", "None", ")", ":", "scene", "=", "self", ".", "scene", "(", ")", "if", "(", "not", "scene", ")", ":", "return", "[", "]", "if", "(", "not", "cls", ")", ":", "cls", "=", "XNodeConnection", "output...
Returns a list of connections from the scene that match the inputed class for this node. :param cls | <subclass of XNodeConnection> || None :return [<XNodeConnection>, ..]
[ "Returns", "a", "list", "of", "connections", "from", "the", "scene", "that", "match", "the", "inputed", "class", "for", "this", "node", ".", ":", "param", "cls", "|", "<subclass", "of", "XNodeConnection", ">", "||", "None", ":", "return", "[", "<XNodeConne...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L379-L403
train
Returns a list of all connections that match the inputed alid class for this node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.connectDropzone
def connectDropzone( self, rect, slot, color = None, style = None, name = '', toolTip = '' ): """ Connects the inputed dropzone to the given slot at t...
python
def connectDropzone( self, rect, slot, color = None, style = None, name = '', toolTip = '' ): """ Connects the inputed dropzone to the given slot at t...
[ "def", "connectDropzone", "(", "self", ",", "rect", ",", "slot", ",", "color", "=", "None", ",", "style", "=", "None", ",", "name", "=", "''", ",", "toolTip", "=", "''", ")", ":", "if", "not", "color", ":", "color", "=", "self", ".", "hotspotColor"...
Connects the inputed dropzone to the given slot at the defined rect. :param rect | <QRectF> slot | <method> || <function> :return <XNodeHotspot>
[ "Connects", "the", "inputed", "dropzone", "to", "the", "given", "slot", "at", "the", "defined", "rect", ".", ":", "param", "rect", "|", "<QRectF", ">", "slot", "|", "<method", ">", "||", "<function", ">", ":", "return", "<XNodeHotspot", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L405-L433
train
Connects the inputed dropzone to the given slot at the given rect.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.connectHotspot
def connectHotspot( self, rect, slot, color = None, style = None, name = '', toolTip = '' ): """ Defines a new hotspot rect for the given hotspot type. ...
python
def connectHotspot( self, rect, slot, color = None, style = None, name = '', toolTip = '' ): """ Defines a new hotspot rect for the given hotspot type. ...
[ "def", "connectHotspot", "(", "self", ",", "rect", ",", "slot", ",", "color", "=", "None", ",", "style", "=", "None", ",", "name", "=", "''", ",", "toolTip", "=", "''", ")", ":", "if", "not", "color", ":", "color", "=", "self", ".", "hotspotColor",...
Defines a new hotspot rect for the given hotspot type. :param rect | <QRectF> slot | <method> || <function> color | <QColor> || None style | <XNode.HotspotStyle> || None toolTip | <str> ...
[ "Defines", "a", "new", "hotspot", "rect", "for", "the", "given", "hotspot", "type", ".", ":", "param", "rect", "|", "<QRectF", ">", "slot", "|", "<method", ">", "||", "<function", ">", "color", "|", "<QColor", ">", "||", "None", "style", "|", "<XNode",...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L435-L467
train
Connect a new hotspot to a given slot.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.connectTo
def connectTo( self, node, cls = None ): """ Creates a connection between this node and the inputed node. :param node | <XNode> cls | <subclass of XNodeConnection> || None :return <XNodeConnection> """ if ( not node ): ...
python
def connectTo( self, node, cls = None ): """ Creates a connection between this node and the inputed node. :param node | <XNode> cls | <subclass of XNodeConnection> || None :return <XNodeConnection> """ if ( not node ): ...
[ "def", "connectTo", "(", "self", ",", "node", ",", "cls", "=", "None", ")", ":", "if", "(", "not", "node", ")", ":", "return", "con", "=", "self", ".", "scene", "(", ")", ".", "addConnection", "(", "cls", ")", "con", ".", "setOutputNode", "(", "s...
Creates a connection between this node and the inputed node. :param node | <XNode> cls | <subclass of XNodeConnection> || None :return <XNodeConnection>
[ "Creates", "a", "connection", "between", "this", "node", "and", "the", "inputed", "node", ".", ":", "param", "node", "|", "<XNode", ">", "cls", "|", "<subclass", "of", "XNodeConnection", ">", "||", "None", ":", "return", "<XNodeConnection", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L469-L485
train
Creates a connection between this node and the inputed node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.customData
def customData( self, key, default = None ): """ Return the custom data that is stored on this node for the \ given key, returning the default parameter if none was found. :param key <str> :param default <variant> :return <varia...
python
def customData( self, key, default = None ): """ Return the custom data that is stored on this node for the \ given key, returning the default parameter if none was found. :param key <str> :param default <variant> :return <varia...
[ "def", "customData", "(", "self", ",", "key", ",", "default", "=", "None", ")", ":", "return", "self", ".", "_customData", ".", "get", "(", "nativestring", "(", "key", ")", ",", "default", ")" ]
Return the custom data that is stored on this node for the \ given key, returning the default parameter if none was found. :param key <str> :param default <variant> :return <variant>
[ "Return", "the", "custom", "data", "that", "is", "stored", "on", "this", "node", "for", "the", "\\", "given", "key", "returning", "the", "default", "parameter", "if", "none", "was", "found", ".", ":", "param", "key", "<str", ">", ":", "param", "default",...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L487-L497
train
Returns the custom data for the given key.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.disconnectFrom
def disconnectFrom( self, node, cls = None ): """ Disconnects from the inputed node. If there is a class provided, then only a particular type of connection will be removed :param node | <XNode> cls | <subclass of XNodeConnection> || None ...
python
def disconnectFrom( self, node, cls = None ): """ Disconnects from the inputed node. If there is a class provided, then only a particular type of connection will be removed :param node | <XNode> cls | <subclass of XNodeConnection> || None ...
[ "def", "disconnectFrom", "(", "self", ",", "node", ",", "cls", "=", "None", ")", ":", "count", "=", "0", "for", "connection", "in", "self", ".", "connections", "(", "cls", ")", ":", "if", "(", "connection", ".", "inputNode", "(", ")", "==", "node", ...
Disconnects from the inputed node. If there is a class provided, then only a particular type of connection will be removed :param node | <XNode> cls | <subclass of XNodeConnection> || None :return <int> | number of connections removed
[ "Disconnects", "from", "the", "inputed", "node", ".", "If", "there", "is", "a", "class", "provided", "then", "only", "a", "particular", "type", "of", "connection", "will", "be", "removed", ":", "param", "node", "|", "<XNode", ">", "cls", "|", "<subclass", ...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L499-L514
train
Removes all connections from the inputed node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.disabledAlternateColor
def disabledAlternateColor(self): """ Returns the alternate color for this node when it is disabled. :return <QColor> """ palette = self.palette() return palette.color(palette.Disabled, palette.NodeAlternateBackground)
python
def disabledAlternateColor(self): """ Returns the alternate color for this node when it is disabled. :return <QColor> """ palette = self.palette() return palette.color(palette.Disabled, palette.NodeAlternateBackground)
[ "def", "disabledAlternateColor", "(", "self", ")", ":", "palette", "=", "self", ".", "palette", "(", ")", "return", "palette", ".", "color", "(", "palette", ".", "Disabled", ",", "palette", ".", "NodeAlternateBackground", ")" ]
Returns the alternate color for this node when it is disabled. :return <QColor>
[ "Returns", "the", "alternate", "color", "for", "this", "node", "when", "it", "is", "disabled", ".", ":", "return", "<QColor", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L516-L523
train
Returns the alternate color for this node when it is disabled.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.disabledBorderColor
def disabledBorderColor( self ): """ Returns the base color for this node. :return <QColor> """ palette = self.palette() return palette.color(palette.Disabled, palette.NodeBorder)
python
def disabledBorderColor( self ): """ Returns the base color for this node. :return <QColor> """ palette = self.palette() return palette.color(palette.Disabled, palette.NodeBorder)
[ "def", "disabledBorderColor", "(", "self", ")", ":", "palette", "=", "self", ".", "palette", "(", ")", "return", "palette", ".", "color", "(", "palette", ".", "Disabled", ",", "palette", ".", "NodeBorder", ")" ]
Returns the base color for this node. :return <QColor>
[ "Returns", "the", "base", "color", "for", "this", "node", ".", ":", "return", "<QColor", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L525-L532
train
Returns the disabled border color for this node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.disabledBrush
def disabledBrush( self ): """ Return the main brush for this node. :return <QBrush> """ # create the background brush grad = QLinearGradient() rect = self.rect() grad.setStart(QPointF(0, rect.y())) grad.setFinalStop(QPointF(0...
python
def disabledBrush( self ): """ Return the main brush for this node. :return <QBrush> """ # create the background brush grad = QLinearGradient() rect = self.rect() grad.setStart(QPointF(0, rect.y())) grad.setFinalStop(QPointF(0...
[ "def", "disabledBrush", "(", "self", ")", ":", "# create the background brush", "grad", "=", "QLinearGradient", "(", ")", "rect", "=", "self", ".", "rect", "(", ")", "grad", ".", "setStart", "(", "QPointF", "(", "0", ",", "rect", ".", "y", "(", ")", ")...
Return the main brush for this node. :return <QBrush>
[ "Return", "the", "main", "brush", "for", "this", "node", ".", ":", "return", "<QBrush", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L534-L550
train
Return the main brush for this node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.disabledColor
def disabledColor(self): """ Returns the color this node should render when its disabled. :return <QColor> """ palette = self.palette() return palette.color(palette.Disabled, palette.NodeBackground)
python
def disabledColor(self): """ Returns the color this node should render when its disabled. :return <QColor> """ palette = self.palette() return palette.color(palette.Disabled, palette.NodeBackground)
[ "def", "disabledColor", "(", "self", ")", ":", "palette", "=", "self", ".", "palette", "(", ")", "return", "palette", ".", "color", "(", "palette", ".", "Disabled", ",", "palette", ".", "NodeBackground", ")" ]
Returns the color this node should render when its disabled. :return <QColor>
[ "Returns", "the", "color", "this", "node", "should", "render", "when", "its", "disabled", ".", ":", "return", "<QColor", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L552-L559
train
Returns the color this node should render when its disabled.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.disabledPenColor
def disabledPenColor(self): """ Returns the disabled pen color for this node. :return <QColor> """ palette = self.palette() return palette.color(palette.Disabled, palette.NodeForeground)
python
def disabledPenColor(self): """ Returns the disabled pen color for this node. :return <QColor> """ palette = self.palette() return palette.color(palette.Disabled, palette.NodeForeground)
[ "def", "disabledPenColor", "(", "self", ")", ":", "palette", "=", "self", ".", "palette", "(", ")", "return", "palette", ".", "color", "(", "palette", ".", "Disabled", ",", "palette", ".", "NodeForeground", ")" ]
Returns the disabled pen color for this node. :return <QColor>
[ "Returns", "the", "disabled", "pen", "color", "for", "this", "node", ".", ":", "return", "<QColor", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L561-L568
train
Returns the disabled pen color for this node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.displayName
def displayName( self ): """ Return the user friendly name for this node. if the display name \ is not implicitly set, then the words for the object name \ will be used. :return <str> """ if ( not self._displayName ): return projex.text.p...
python
def displayName( self ): """ Return the user friendly name for this node. if the display name \ is not implicitly set, then the words for the object name \ will be used. :return <str> """ if ( not self._displayName ): return projex.text.p...
[ "def", "displayName", "(", "self", ")", ":", "if", "(", "not", "self", ".", "_displayName", ")", ":", "return", "projex", ".", "text", ".", "pretty", "(", "self", ".", "objectName", "(", ")", ")", "return", "self", ".", "_displayName" ]
Return the user friendly name for this node. if the display name \ is not implicitly set, then the words for the object name \ will be used. :return <str>
[ "Return", "the", "user", "friendly", "name", "for", "this", "node", ".", "if", "the", "display", "name", "\\", "is", "not", "implicitly", "set", "then", "the", "words", "for", "the", "object", "name", "\\", "will", "be", "used", ".", ":", "return", "<s...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L579-L589
train
Returns the user friendly name for this node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.draw
def draw(self, painter, option, rect): """ Draws the node for the graphics scene. this method can and should \ be overloaded to create custom nodes. :param painter <QPainter> :param option <QGraphicsItemSytleOption> :param rect <QR...
python
def draw(self, painter, option, rect): """ Draws the node for the graphics scene. this method can and should \ be overloaded to create custom nodes. :param painter <QPainter> :param option <QGraphicsItemSytleOption> :param rect <QR...
[ "def", "draw", "(", "self", ",", "painter", ",", "option", ",", "rect", ")", ":", "painter", ".", "save", "(", ")", "# draw the node", "rect", "=", "self", ".", "rect", "(", ")", "left", ",", "top", ",", "right", ",", "bottom", "=", "self", ".", ...
Draws the node for the graphics scene. this method can and should \ be overloaded to create custom nodes. :param painter <QPainter> :param option <QGraphicsItemSytleOption> :param rect <QRectF>
[ "Draws", "the", "node", "for", "the", "graphics", "scene", ".", "this", "method", "can", "and", "should", "\\", "be", "overloaded", "to", "create", "custom", "nodes", ".", ":", "param", "painter", "<QPainter", ">", ":", "param", "option", "<QGraphicsItemSytl...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L591-L665
train
Draws the node for the graphics scene.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.drawHotspots
def drawHotspots(self, painter): """ Draws all the hotspots for the renderer. :param painter | <QPaint> """ # draw hotspots for hotspot in (self._hotspots + self._dropzones): hstyle = hotspot.style() if hstyle == XNode.HotspotStyle.In...
python
def drawHotspots(self, painter): """ Draws all the hotspots for the renderer. :param painter | <QPaint> """ # draw hotspots for hotspot in (self._hotspots + self._dropzones): hstyle = hotspot.style() if hstyle == XNode.HotspotStyle.In...
[ "def", "drawHotspots", "(", "self", ",", "painter", ")", ":", "# draw hotspots", "for", "hotspot", "in", "(", "self", ".", "_hotspots", "+", "self", ".", "_dropzones", ")", ":", "hstyle", "=", "hotspot", ".", "style", "(", ")", "if", "hstyle", "==", "X...
Draws all the hotspots for the renderer. :param painter | <QPaint>
[ "Draws", "all", "the", "hotspots", "for", "the", "renderer", ".", ":", "param", "painter", "|", "<QPaint", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L667-L679
train
Draws all the hotspots for the current node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.drawStyle
def drawStyle(self, painter, x, y, width, height, radius): """ Draws the style for the given coordinates for this node. :param x | <int> y | <int> width | <int> height | <int> radius | <int> ...
python
def drawStyle(self, painter, x, y, width, height, radius): """ Draws the style for the given coordinates for this node. :param x | <int> y | <int> width | <int> height | <int> radius | <int> ...
[ "def", "drawStyle", "(", "self", ",", "painter", ",", "x", ",", "y", ",", "width", ",", "height", ",", "radius", ")", ":", "if", "self", ".", "style", "(", ")", "==", "XNode", ".", "NodeStyle", ".", "Rectangle", ":", "# no pinch, draw regular", "if", ...
Draws the style for the given coordinates for this node. :param x | <int> y | <int> width | <int> height | <int> radius | <int>
[ "Draws", "the", "style", "for", "the", "given", "coordinates", "for", "this", "node", ".", ":", "param", "x", "|", "<int", ">", "y", "|", "<int", ">", "width", "|", "<int", ">", "height", "|", "<int", ">", "radius", "|", "<int", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L690-L730
train
Draws the style for the given coordinates for this node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.dropzoneAt
def dropzoneAt(self, point): """ Returns the dropzone at the inputed point. :param point | <QPoint> """ for dropzone in self._dropzones: rect = dropzone.rect() if ( rect.contains(point) ): return dropzone return None
python
def dropzoneAt(self, point): """ Returns the dropzone at the inputed point. :param point | <QPoint> """ for dropzone in self._dropzones: rect = dropzone.rect() if ( rect.contains(point) ): return dropzone return None
[ "def", "dropzoneAt", "(", "self", ",", "point", ")", ":", "for", "dropzone", "in", "self", ".", "_dropzones", ":", "rect", "=", "dropzone", ".", "rect", "(", ")", "if", "(", "rect", ".", "contains", "(", "point", ")", ")", ":", "return", "dropzone", ...
Returns the dropzone at the inputed point. :param point | <QPoint>
[ "Returns", "the", "dropzone", "at", "the", "inputed", "point", ".", ":", "param", "point", "|", "<QPoint", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L732-L742
train
Returns the dropzone at the inputed point.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.emitGeometryChanged
def emitGeometryChanged( self, point = None ): """ Emits the geometryChanged signal, provided the dispatcher's \ signals are not currently blocked. If the point value is not \ provided, the object's current position will be used. :param point | <QPointF> || No...
python
def emitGeometryChanged( self, point = None ): """ Emits the geometryChanged signal, provided the dispatcher's \ signals are not currently blocked. If the point value is not \ provided, the object's current position will be used. :param point | <QPointF> || No...
[ "def", "emitGeometryChanged", "(", "self", ",", "point", "=", "None", ")", ":", "# check the signals blocked", "if", "(", "self", ".", "signalsBlocked", "(", ")", ")", ":", "return", "False", "# grab the point", "if", "(", "point", "==", "None", ")", ":", ...
Emits the geometryChanged signal, provided the dispatcher's \ signals are not currently blocked. If the point value is not \ provided, the object's current position will be used. :param point | <QPointF> || None :return <bool> emitted
[ "Emits", "the", "geometryChanged", "signal", "provided", "the", "dispatcher", "s", "\\", "signals", "are", "not", "currently", "blocked", ".", "If", "the", "point", "value", "is", "not", "\\", "provided", "the", "object", "s", "current", "position", "will", ...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L744-L764
train
Emits the geometryChanged signal provided the dispatcher s signals are not currently blocked.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.emitRemoved
def emitRemoved( self ): """ Emits the removed signal, provided the dispatcher's signals \ are not currently blocked. :return <bool> emitted """ # check the signals blocked if ( self.signalsBlocked() ): return False # emit...
python
def emitRemoved( self ): """ Emits the removed signal, provided the dispatcher's signals \ are not currently blocked. :return <bool> emitted """ # check the signals blocked if ( self.signalsBlocked() ): return False # emit...
[ "def", "emitRemoved", "(", "self", ")", ":", "# check the signals blocked", "if", "(", "self", ".", "signalsBlocked", "(", ")", ")", ":", "return", "False", "# emit the signal", "self", ".", "dispatch", ".", "removed", ".", "emit", "(", ")", "return", "True"...
Emits the removed signal, provided the dispatcher's signals \ are not currently blocked. :return <bool> emitted
[ "Emits", "the", "removed", "signal", "provided", "the", "dispatcher", "s", "signals", "\\", "are", "not", "currently", "blocked", ".", ":", "return", "<bool", ">", "emitted" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L766-L779
train
Emits the removed signal
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.findDropzone
def findDropzone( self, name ): """ Finds the dropzone based on the inputed name. :param name | <str> :return <XNodeHotspot> || None """ for dropzone in self._dropzones: if ( dropzone.name() == name ): return dropzone...
python
def findDropzone( self, name ): """ Finds the dropzone based on the inputed name. :param name | <str> :return <XNodeHotspot> || None """ for dropzone in self._dropzones: if ( dropzone.name() == name ): return dropzone...
[ "def", "findDropzone", "(", "self", ",", "name", ")", ":", "for", "dropzone", "in", "self", ".", "_dropzones", ":", "if", "(", "dropzone", ".", "name", "(", ")", "==", "name", ")", ":", "return", "dropzone", "return", "None" ]
Finds the dropzone based on the inputed name. :param name | <str> :return <XNodeHotspot> || None
[ "Finds", "the", "dropzone", "based", "on", "the", "inputed", "name", ".", ":", "param", "name", "|", "<str", ">", ":", "return", "<XNodeHotspot", ">", "||", "None" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L781-L792
train
Returns the dropzone with the given name or None if no dropzone exists.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.findHotspot
def findHotspot( self, name ): """ Finds the hotspot based on the inputed name. :param name | <str> :return <XNodeHotspot> || None """ for hotspot in self._hotspots: if ( hotspot.name() == name ): return hotspot ...
python
def findHotspot( self, name ): """ Finds the hotspot based on the inputed name. :param name | <str> :return <XNodeHotspot> || None """ for hotspot in self._hotspots: if ( hotspot.name() == name ): return hotspot ...
[ "def", "findHotspot", "(", "self", ",", "name", ")", ":", "for", "hotspot", "in", "self", ".", "_hotspots", ":", "if", "(", "hotspot", ".", "name", "(", ")", "==", "name", ")", ":", "return", "hotspot", "return", "None" ]
Finds the hotspot based on the inputed name. :param name | <str> :return <XNodeHotspot> || None
[ "Finds", "the", "hotspot", "based", "on", "the", "inputed", "name", ".", ":", "param", "name", "|", "<str", ">", ":", "return", "<XNodeHotspot", ">", "||", "None" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L794-L805
train
Returns the XNodeHotspot object for the given name.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.hotspotAt
def hotspotAt(self, point): """ Returns the hotspot at the inputed point. :param point | <QPoint> :return <XNodeHotspot> || None """ for hotspot in self._hotspots: rect = hotspot.rect() if rect.contains(point): ...
python
def hotspotAt(self, point): """ Returns the hotspot at the inputed point. :param point | <QPoint> :return <XNodeHotspot> || None """ for hotspot in self._hotspots: rect = hotspot.rect() if rect.contains(point): ...
[ "def", "hotspotAt", "(", "self", ",", "point", ")", ":", "for", "hotspot", "in", "self", ".", "_hotspots", ":", "rect", "=", "hotspot", ".", "rect", "(", ")", "if", "rect", ".", "contains", "(", "point", ")", ":", "return", "hotspot", "return", "None...
Returns the hotspot at the inputed point. :param point | <QPoint> :return <XNodeHotspot> || None
[ "Returns", "the", "hotspot", "at", "the", "inputed", "point", ".", ":", "param", "point", "|", "<QPoint", ">", ":", "return", "<XNodeHotspot", ">", "||", "None" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L875-L887
train
Returns the XNodeHotspot at the inputed point.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.hoverEnterEvent
def hoverEnterEvent( self, event ): """ Prompts the tool tip for this node based on the inputed event. :param event | <QHoverEvent> """ # process the parent event super(XNode, self).hoverEnterEvent(event) # hover over a hotspot hotsp...
python
def hoverEnterEvent( self, event ): """ Prompts the tool tip for this node based on the inputed event. :param event | <QHoverEvent> """ # process the parent event super(XNode, self).hoverEnterEvent(event) # hover over a hotspot hotsp...
[ "def", "hoverEnterEvent", "(", "self", ",", "event", ")", ":", "# process the parent event", "super", "(", "XNode", ",", "self", ")", ".", "hoverEnterEvent", "(", "event", ")", "# hover over a hotspot", "hotspot", "=", "self", ".", "hotspotAt", "(", "event", "...
Prompts the tool tip for this node based on the inputed event. :param event | <QHoverEvent>
[ "Prompts", "the", "tool", "tip", "for", "this", "node", "based", "on", "the", "inputed", "event", ".", ":", "param", "event", "|", "<QHoverEvent", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L907-L937
train
Prompts the tool tip for this node based on the inputed event.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.hoverMoveEvent
def hoverMoveEvent(self, event): """ Prompts the tool tip for this node based on the inputed event. :param event | <QHoverEvent> """ # process the parent event super(XNode, self).hoverMoveEvent(event) self._hovered = True # ...
python
def hoverMoveEvent(self, event): """ Prompts the tool tip for this node based on the inputed event. :param event | <QHoverEvent> """ # process the parent event super(XNode, self).hoverMoveEvent(event) self._hovered = True # ...
[ "def", "hoverMoveEvent", "(", "self", ",", "event", ")", ":", "# process the parent event", "super", "(", "XNode", ",", "self", ")", ".", "hoverMoveEvent", "(", "event", ")", "self", ".", "_hovered", "=", "True", "# hover over a hotspot", "hotspot", "=", "self...
Prompts the tool tip for this node based on the inputed event. :param event | <QHoverEvent>
[ "Prompts", "the", "tool", "tip", "for", "this", "node", "based", "on", "the", "inputed", "event", ".", ":", "param", "event", "|", "<QHoverEvent", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L939-L976
train
Prompts the tool tip for this node based on the inputed event.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.hoverLeaveEvent
def hoverLeaveEvent(self, event): """ Processes the hovering information for this node. :param event | <QHoverEvent> """ if self._hoverSpot: if self._hoverSpot.hoverLeaveEvent(event): self.update() self._hoverSpot = None ...
python
def hoverLeaveEvent(self, event): """ Processes the hovering information for this node. :param event | <QHoverEvent> """ if self._hoverSpot: if self._hoverSpot.hoverLeaveEvent(event): self.update() self._hoverSpot = None ...
[ "def", "hoverLeaveEvent", "(", "self", ",", "event", ")", ":", "if", "self", ".", "_hoverSpot", ":", "if", "self", ".", "_hoverSpot", ".", "hoverLeaveEvent", "(", "event", ")", ":", "self", ".", "update", "(", ")", "self", ".", "_hoverSpot", "=", "None...
Processes the hovering information for this node. :param event | <QHoverEvent>
[ "Processes", "the", "hovering", "information", "for", "this", "node", ".", ":", "param", "event", "|", "<QHoverEvent", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L978-L992
train
Handles the hoverLeave event. Updates the node s tooltip and the hovered state.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.inputConnections
def inputConnections(self, cls=None): """ Returns a list of input connections from the scene that match the inputed class for this node. :param cls | <subclass of XNodeConnection> || None :return [<XNodeConnection>, ..] """ scene = self...
python
def inputConnections(self, cls=None): """ Returns a list of input connections from the scene that match the inputed class for this node. :param cls | <subclass of XNodeConnection> || None :return [<XNodeConnection>, ..] """ scene = self...
[ "def", "inputConnections", "(", "self", ",", "cls", "=", "None", ")", ":", "scene", "=", "self", ".", "scene", "(", ")", "if", "not", "scene", ":", "return", "[", "]", "if", "not", "cls", ":", "cls", "=", "XNodeConnection", "output", "=", "[", "]",...
Returns a list of input connections from the scene that match the inputed class for this node. :param cls | <subclass of XNodeConnection> || None :return [<XNodeConnection>, ..]
[ "Returns", "a", "list", "of", "input", "connections", "from", "the", "scene", "that", "match", "the", "inputed", "class", "for", "this", "node", ".", ":", "param", "cls", "|", "<subclass", "of", "XNodeConnection", ">", "||", "None", ":", "return", "[", "...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1010-L1034
train
Returns a list of input connections from the scene that match the inputed class for this node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.isEnabled
def isEnabled( self ): """ Returns whether or not this node is enabled. """ if ( self._disableWithLayer and self._layer ): lenabled = self._layer.isEnabled() else: lenabled = True return self._enabled and lenabled
python
def isEnabled( self ): """ Returns whether or not this node is enabled. """ if ( self._disableWithLayer and self._layer ): lenabled = self._layer.isEnabled() else: lenabled = True return self._enabled and lenabled
[ "def", "isEnabled", "(", "self", ")", ":", "if", "(", "self", ".", "_disableWithLayer", "and", "self", ".", "_layer", ")", ":", "lenabled", "=", "self", ".", "_layer", ".", "isEnabled", "(", ")", "else", ":", "lenabled", "=", "True", "return", "self", ...
Returns whether or not this node is enabled.
[ "Returns", "whether", "or", "not", "this", "node", "is", "enabled", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1052-L1061
train
Returns whether or not this node is enabled.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.isLocked
def isLocked( self ): """ Returns if both the x and y directions are locked, or if the scene \ is in view mode. :return <bool> """ # return if the layer is not the current layer if self._layer and not self._layer.isCurrent(): return True ...
python
def isLocked( self ): """ Returns if both the x and y directions are locked, or if the scene \ is in view mode. :return <bool> """ # return if the layer is not the current layer if self._layer and not self._layer.isCurrent(): return True ...
[ "def", "isLocked", "(", "self", ")", ":", "# return if the layer is not the current layer", "if", "self", ".", "_layer", "and", "not", "self", ".", "_layer", ".", "isCurrent", "(", ")", ":", "return", "True", "# return whether or not the node is enabld or locked", "re...
Returns if both the x and y directions are locked, or if the scene \ is in view mode. :return <bool>
[ "Returns", "if", "both", "the", "x", "and", "y", "directions", "are", "locked", "or", "if", "the", "scene", "\\", "is", "in", "view", "mode", ".", ":", "return", "<bool", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1079-L1091
train
Returns if both the x and y directions are locked or if the node is enabled and the layer is not the current layer.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.isSnappedToGrid
def isSnappedToGrid( self ): """ Returns if both the x and y directions are snapping to the grid. :return <bool> """ shift = QtCore.QCoreApplication.keyboardModifiers() == QtCore.Qt.ShiftModifier return (self._xSnapToGrid and self._ySnapToGrid) or shift
python
def isSnappedToGrid( self ): """ Returns if both the x and y directions are snapping to the grid. :return <bool> """ shift = QtCore.QCoreApplication.keyboardModifiers() == QtCore.Qt.ShiftModifier return (self._xSnapToGrid and self._ySnapToGrid) or shift
[ "def", "isSnappedToGrid", "(", "self", ")", ":", "shift", "=", "QtCore", ".", "QCoreApplication", ".", "keyboardModifiers", "(", ")", "==", "QtCore", ".", "Qt", ".", "ShiftModifier", "return", "(", "self", ".", "_xSnapToGrid", "and", "self", ".", "_ySnapToGr...
Returns if both the x and y directions are snapping to the grid. :return <bool>
[ "Returns", "if", "both", "the", "x", "and", "y", "directions", "are", "snapping", "to", "the", "grid", ".", ":", "return", "<bool", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1093-L1100
train
Returns if both the x and y directions are snapping to the grid.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.isVisible
def isVisible( self ): """ Returns whether or not this item is visible. :return <bool> """ layer = self.layer() if layer and not layer.isVisible(): return False return self._visible
python
def isVisible( self ): """ Returns whether or not this item is visible. :return <bool> """ layer = self.layer() if layer and not layer.isVisible(): return False return self._visible
[ "def", "isVisible", "(", "self", ")", ":", "layer", "=", "self", ".", "layer", "(", ")", "if", "layer", "and", "not", "layer", ".", "isVisible", "(", ")", ":", "return", "False", "return", "self", ".", "_visible" ]
Returns whether or not this item is visible. :return <bool>
[ "Returns", "whether", "or", "not", "this", "item", "is", "visible", ".", ":", "return", "<bool", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1134-L1144
train
Returns whether or not this item is visible.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.itemChange
def itemChange(self, change, value): """ Overloads the base QGraphicsItem itemChange method to \ handle snapping and locking of an object as the user \ moves it around in the scene. :param change <int> :param value <variant> ...
python
def itemChange(self, change, value): """ Overloads the base QGraphicsItem itemChange method to \ handle snapping and locking of an object as the user \ moves it around in the scene. :param change <int> :param value <variant> ...
[ "def", "itemChange", "(", "self", ",", "change", ",", "value", ")", ":", "value", "=", "unwrapVariant", "(", "value", ")", "if", "change", "==", "self", ".", "ItemSelectedChange", ":", "eff", "=", "self", ".", "graphicsEffect", "(", ")", "eff", ".", "s...
Overloads the base QGraphicsItem itemChange method to \ handle snapping and locking of an object as the user \ moves it around in the scene. :param change <int> :param value <variant> :return <variant>
[ "Overloads", "the", "base", "QGraphicsItem", "itemChange", "method", "to", "\\", "handle", "snapping", "and", "locking", "of", "an", "object", "as", "the", "user", "\\", "moves", "it", "around", "in", "the", "scene", ".", ":", "param", "change", "<int", ">...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1146-L1204
train
Overloads the base QGraphicsItem itemChange method to handle snapping and locking of an object.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.mousePressEvent
def mousePressEvent( self, event ): """ Overloads the mouse press event to handle special cases and \ bypass when the scene is in view mode. :param event <QMousePressEvent> """ event.setAccepted(False) self._hotspotPressed = False # ignore ...
python
def mousePressEvent( self, event ): """ Overloads the mouse press event to handle special cases and \ bypass when the scene is in view mode. :param event <QMousePressEvent> """ event.setAccepted(False) self._hotspotPressed = False # ignore ...
[ "def", "mousePressEvent", "(", "self", ",", "event", ")", ":", "event", ".", "setAccepted", "(", "False", ")", "self", ".", "_hotspotPressed", "=", "False", "# ignore events when the scene is in view mode", "scene", "=", "self", ".", "scene", "(", ")", "if", "...
Overloads the mouse press event to handle special cases and \ bypass when the scene is in view mode. :param event <QMousePressEvent>
[ "Overloads", "the", "mouse", "press", "event", "to", "handle", "special", "cases", "and", "\\", "bypass", "when", "the", "scene", "is", "in", "view", "mode", ".", ":", "param", "event", "<QMousePressEvent", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1255-L1297
train
Handles the mouse press event.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.mouseMoveEvent
def mouseMoveEvent( self, event ): """ Overloads the mouse move event to ignore the event when \ the scene is in view mode. :param event <QMouseMoveEvent> """ event.setAccepted(False) if self._hotspotPressed: event.accept() ...
python
def mouseMoveEvent( self, event ): """ Overloads the mouse move event to ignore the event when \ the scene is in view mode. :param event <QMouseMoveEvent> """ event.setAccepted(False) if self._hotspotPressed: event.accept() ...
[ "def", "mouseMoveEvent", "(", "self", ",", "event", ")", ":", "event", ".", "setAccepted", "(", "False", ")", "if", "self", ".", "_hotspotPressed", ":", "event", ".", "accept", "(", ")", "return", "# ignore events when the scene is in view mode", "scene", "=", ...
Overloads the mouse move event to ignore the event when \ the scene is in view mode. :param event <QMouseMoveEvent>
[ "Overloads", "the", "mouse", "move", "event", "to", "ignore", "the", "event", "when", "\\", "the", "scene", "is", "in", "view", "mode", ".", ":", "param", "event", "<QMouseMoveEvent", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1299-L1321
train
Overloads the mouse move event to ignore the event when the scene is in view mode.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.mouseReleaseEvent
def mouseReleaseEvent( self, event ): """ Overloads the mouse release event to ignore the event when the \ scene is in view mode, and release the selection block signal. :param event <QMouseReleaseEvent> """ event.setAccepted(False) if self._hotsp...
python
def mouseReleaseEvent( self, event ): """ Overloads the mouse release event to ignore the event when the \ scene is in view mode, and release the selection block signal. :param event <QMouseReleaseEvent> """ event.setAccepted(False) if self._hotsp...
[ "def", "mouseReleaseEvent", "(", "self", ",", "event", ")", ":", "event", ".", "setAccepted", "(", "False", ")", "if", "self", ".", "_hotspotPressed", ":", "event", ".", "accept", "(", ")", "self", ".", "_hotspotPressed", "=", "False", "return", "# ignore ...
Overloads the mouse release event to ignore the event when the \ scene is in view mode, and release the selection block signal. :param event <QMouseReleaseEvent>
[ "Overloads", "the", "mouse", "release", "event", "to", "ignore", "the", "event", "when", "the", "\\", "scene", "is", "in", "view", "mode", "and", "release", "the", "selection", "block", "signal", ".", ":", "param", "event", "<QMouseReleaseEvent", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1323-L1355
train
Override mouseReleaseEvent to ignore the event when the scene is in view mode and release the selection block signal.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.opacity
def opacity( self ): """ Returns the 0-1 percentage opacity value for this node. :return <float> """ if self.isIsolateHidden(): return 0.1 opacity = super(XNode, self).opacity() layer = self.layer() if layer: r...
python
def opacity( self ): """ Returns the 0-1 percentage opacity value for this node. :return <float> """ if self.isIsolateHidden(): return 0.1 opacity = super(XNode, self).opacity() layer = self.layer() if layer: r...
[ "def", "opacity", "(", "self", ")", ":", "if", "self", ".", "isIsolateHidden", "(", ")", ":", "return", "0.1", "opacity", "=", "super", "(", "XNode", ",", "self", ")", ".", "opacity", "(", ")", "layer", "=", "self", ".", "layer", "(", ")", "if", ...
Returns the 0-1 percentage opacity value for this node. :return <float>
[ "Returns", "the", "0", "-", "1", "percentage", "opacity", "value", "for", "this", "node", ".", ":", "return", "<float", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1373-L1387
train
Returns the opacity value for this node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.outputConnections
def outputConnections(self, cls=None): """ Returns a list of output connections from the scene that match the inputed class for this node. :param cls | <subclass of XNodeConnection> || None :return [<XNodeConnection>, ..] """ scene = se...
python
def outputConnections(self, cls=None): """ Returns a list of output connections from the scene that match the inputed class for this node. :param cls | <subclass of XNodeConnection> || None :return [<XNodeConnection>, ..] """ scene = se...
[ "def", "outputConnections", "(", "self", ",", "cls", "=", "None", ")", ":", "scene", "=", "self", ".", "scene", "(", ")", "if", "not", "scene", ":", "return", "[", "]", "if", "not", "cls", ":", "cls", "=", "XNodeConnection", "output", "=", "[", "]"...
Returns a list of output connections from the scene that match the inputed class for this node. :param cls | <subclass of XNodeConnection> || None :return [<XNodeConnection>, ..]
[ "Returns", "a", "list", "of", "output", "connections", "from", "the", "scene", "that", "match", "the", "inputed", "class", "for", "this", "node", ".", ":", "param", "cls", "|", "<subclass", "of", "XNodeConnection", ">", "||", "None", ":", "return", "[", ...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1389-L1413
train
Returns a list of output connections from the scene that match the inputed class for this node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.paint
def paint(self, painter, option, widget): """ Overloads the default QGraphicsItem paint event to update the \ node when necessary and call the draw method for the node. :param painter <QPainter> :param option <QStyleOptionGraphicsItem> :param ...
python
def paint(self, painter, option, widget): """ Overloads the default QGraphicsItem paint event to update the \ node when necessary and call the draw method for the node. :param painter <QPainter> :param option <QStyleOptionGraphicsItem> :param ...
[ "def", "paint", "(", "self", ",", "painter", ",", "option", ",", "widget", ")", ":", "# rebuild when dirty", "if", "self", ".", "isDirty", "(", ")", ":", "self", ".", "rebuild", "(", ")", "painter", ".", "save", "(", ")", "painter", ".", "setOpacity", ...
Overloads the default QGraphicsItem paint event to update the \ node when necessary and call the draw method for the node. :param painter <QPainter> :param option <QStyleOptionGraphicsItem> :param widget <QWidget>
[ "Overloads", "the", "default", "QGraphicsItem", "paint", "event", "to", "update", "the", "\\", "node", "when", "necessary", "and", "call", "the", "draw", "method", "for", "the", "node", ".", ":", "param", "painter", "<QPainter", ">", ":", "param", "option", ...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1423-L1455
train
Overloads the default paint event to update the node when necessary and call the draw method for the node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.positionAt
def positionAt( self, location, fixedX = None, fixedY = None ): """ Calculates the position at the inputed location. :param location <XConnectionLocation> :param fixedX <float> || None :param fixedY <float> || None ...
python
def positionAt( self, location, fixedX = None, fixedY = None ): """ Calculates the position at the inputed location. :param location <XConnectionLocation> :param fixedX <float> || None :param fixedY <float> || None ...
[ "def", "positionAt", "(", "self", ",", "location", ",", "fixedX", "=", "None", ",", "fixedY", "=", "None", ")", ":", "# figure the position information", "rect", "=", "self", ".", "sceneRect", "(", ")", "if", "rect", ".", "height", "(", ")", "<", "self",...
Calculates the position at the inputed location. :param location <XConnectionLocation> :param fixedX <float> || None :param fixedY <float> || None :return <QPointF>
[ "Calculates", "the", "position", "at", "the", "inputed", "location", ".", ":", "param", "location", "<XConnectionLocation", ">", ":", "param", "fixedX", "<float", ">", "||", "None", ":", "param", "fixedY", "<float", ">", "||", "None", ":", "return", "<QPoint...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1495-L1540
train
Calculates the position at the inputed location.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.rebuild
def rebuild(self, scene=None): """ This method is where you will rebuild the geometry and \ data for a node. :param scene <QGraphicsScene> || None :return <bool> success """ rect = QRectF(0, 0, self.minimumWidth(), self.minimumHeig...
python
def rebuild(self, scene=None): """ This method is where you will rebuild the geometry and \ data for a node. :param scene <QGraphicsScene> || None :return <bool> success """ rect = QRectF(0, 0, self.minimumWidth(), self.minimumHeig...
[ "def", "rebuild", "(", "self", ",", "scene", "=", "None", ")", ":", "rect", "=", "QRectF", "(", "0", ",", "0", ",", "self", ".", "minimumWidth", "(", ")", ",", "self", ".", "minimumHeight", "(", ")", ")", "self", ".", "setRect", "(", "rect", ")",...
This method is where you will rebuild the geometry and \ data for a node. :param scene <QGraphicsScene> || None :return <bool> success
[ "This", "method", "is", "where", "you", "will", "rebuild", "the", "geometry", "and", "\\", "data", "for", "a", "node", ".", ":", "param", "scene", "<QGraphicsScene", ">", "||", "None", ":", "return", "<bool", ">", "success" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1552-L1565
train
Rebuilds the geometry and data for a node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.scenePos
def scenePos( self ): """ Returns the scene position for this node by resolving any \ inhertiance position data since QGraphicsItem's return \ relative-space positions. :return <QPointF> """ pos = self.pos() pitem = self.parentItem() ...
python
def scenePos( self ): """ Returns the scene position for this node by resolving any \ inhertiance position data since QGraphicsItem's return \ relative-space positions. :return <QPointF> """ pos = self.pos() pitem = self.parentItem() ...
[ "def", "scenePos", "(", "self", ")", ":", "pos", "=", "self", ".", "pos", "(", ")", "pitem", "=", "self", ".", "parentItem", "(", ")", "while", "(", "pitem", ")", ":", "pos", "=", "pitem", ".", "pos", "(", ")", "+", "pos", "pitem", "=", "pitem"...
Returns the scene position for this node by resolving any \ inhertiance position data since QGraphicsItem's return \ relative-space positions. :return <QPointF>
[ "Returns", "the", "scene", "position", "for", "this", "node", "by", "resolving", "any", "\\", "inhertiance", "position", "data", "since", "QGraphicsItem", "s", "return", "\\", "relative", "-", "space", "positions", ".", ":", "return", "<QPointF", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1575-L1590
train
Returns the scene position for this node by resolving any inhertiance position data.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.sceneRect
def sceneRect( self ): """ Returns the scene geometry for this node by resolving any \ inheritance position data since QGraphicsItem's return \ relative-space positions. :return <QRectF> """ pos = self.scenePos() rect = self.rect() ...
python
def sceneRect( self ): """ Returns the scene geometry for this node by resolving any \ inheritance position data since QGraphicsItem's return \ relative-space positions. :return <QRectF> """ pos = self.scenePos() rect = self.rect() ...
[ "def", "sceneRect", "(", "self", ")", ":", "pos", "=", "self", ".", "scenePos", "(", ")", "rect", "=", "self", ".", "rect", "(", ")", "return", "QRectF", "(", "pos", ".", "x", "(", ")", ",", "pos", ".", "y", "(", ")", ",", "rect", ".", "width...
Returns the scene geometry for this node by resolving any \ inheritance position data since QGraphicsItem's return \ relative-space positions. :return <QRectF>
[ "Returns", "the", "scene", "geometry", "for", "this", "node", "by", "resolving", "any", "\\", "inheritance", "position", "data", "since", "QGraphicsItem", "s", "return", "\\", "relative", "-", "space", "positions", ".", ":", "return", "<QRectF", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1592-L1602
train
Returns the scene geometry for this node by resolving any inheritance position data since QGraphicsItem s return - value is not a QRectF
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setAlternateColor
def setAlternateColor(self, color): """ Sets the alternate color for this node. :param color <QColor> """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) self._palette.setCol...
python
def setAlternateColor(self, color): """ Sets the alternate color for this node. :param color <QColor> """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) self._palette.setCol...
[ "def", "setAlternateColor", "(", "self", ",", "color", ")", ":", "color", "=", "QColor", "(", "color", ")", "if", "self", ".", "_palette", "is", "None", ":", "self", ".", "_palette", "=", "XNodePalette", "(", "self", ".", "_scenePalette", ")", "self", ...
Sets the alternate color for this node. :param color <QColor>
[ "Sets", "the", "alternate", "color", "for", "this", "node", ".", ":", "param", "color", "<QColor", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1604-L1615
train
Sets the alternate color for this node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setBaseColor
def setBaseColor(self, color): """ Sets the primary color for this node. :param color <QColor> """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) self._palette.setColor(self...
python
def setBaseColor(self, color): """ Sets the primary color for this node. :param color <QColor> """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) self._palette.setColor(self...
[ "def", "setBaseColor", "(", "self", ",", "color", ")", ":", "color", "=", "QColor", "(", "color", ")", "if", "self", ".", "_palette", "is", "None", ":", "self", ".", "_palette", "=", "XNodePalette", "(", "self", ".", "_scenePalette", ")", "self", ".", ...
Sets the primary color for this node. :param color <QColor>
[ "Sets", "the", "primary", "color", "for", "this", "node", ".", ":", "param", "color", "<QColor", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1617-L1633
train
Sets the primary color for this node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setBorderColor
def setBorderColor(self, color): """ Sets the border color for this node to the inputed color. :param color | <QColor> """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) self._pal...
python
def setBorderColor(self, color): """ Sets the border color for this node to the inputed color. :param color | <QColor> """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) self._pal...
[ "def", "setBorderColor", "(", "self", ",", "color", ")", ":", "color", "=", "QColor", "(", "color", ")", "if", "self", ".", "_palette", "is", "None", ":", "self", ".", "_palette", "=", "XNodePalette", "(", "self", ".", "_scenePalette", ")", "self", "."...
Sets the border color for this node to the inputed color. :param color | <QColor>
[ "Sets", "the", "border", "color", "for", "this", "node", "to", "the", "inputed", "color", ".", ":", "param", "color", "|", "<QColor", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1635-L1646
train
Sets the border color for this node to the inputed color.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setContentsMargins
def setContentsMargins(self, left, top, right, bottom): """ Sets the contents margins for this node to the inputed values. :param left | <int> top | <int> right | <int> bottom | <int> """ self._ma...
python
def setContentsMargins(self, left, top, right, bottom): """ Sets the contents margins for this node to the inputed values. :param left | <int> top | <int> right | <int> bottom | <int> """ self._ma...
[ "def", "setContentsMargins", "(", "self", ",", "left", ",", "top", ",", "right", ",", "bottom", ")", ":", "self", ".", "_margins", "=", "(", "left", ",", "top", ",", "right", ",", "bottom", ")", "self", ".", "adjustTitleFont", "(", ")" ]
Sets the contents margins for this node to the inputed values. :param left | <int> top | <int> right | <int> bottom | <int>
[ "Sets", "the", "contents", "margins", "for", "this", "node", "to", "the", "inputed", "values", ".", ":", "param", "left", "|", "<int", ">", "top", "|", "<int", ">", "right", "|", "<int", ">", "bottom", "|", "<int", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1648-L1658
train
Sets the margins for this node to the inputed values.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setDisabledAlternateColor
def setDisabledAlternateColor(self, color): """ Sets the alternate color used when drawing this node as disabled. :param color | <QColor> """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) ...
python
def setDisabledAlternateColor(self, color): """ Sets the alternate color used when drawing this node as disabled. :param color | <QColor> """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) ...
[ "def", "setDisabledAlternateColor", "(", "self", ",", "color", ")", ":", "color", "=", "QColor", "(", "color", ")", "if", "self", ".", "_palette", "is", "None", ":", "self", ".", "_palette", "=", "XNodePalette", "(", "self", ".", "_scenePalette", ")", "s...
Sets the alternate color used when drawing this node as disabled. :param color | <QColor>
[ "Sets", "the", "alternate", "color", "used", "when", "drawing", "this", "node", "as", "disabled", ".", ":", "param", "color", "|", "<QColor", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1670-L1683
train
Sets the alternate color used when drawing this node as disabled.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setDisabledBorderColor
def setDisabledBorderColor( self ): """ Returns the base color for this node. :return <QColor> """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) self._palette.setColor(self._palet...
python
def setDisabledBorderColor( self ): """ Returns the base color for this node. :return <QColor> """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) self._palette.setColor(self._palet...
[ "def", "setDisabledBorderColor", "(", "self", ")", ":", "color", "=", "QColor", "(", "color", ")", "if", "self", ".", "_palette", "is", "None", ":", "self", ".", "_palette", "=", "XNodePalette", "(", "self", ".", "_scenePalette", ")", "self", ".", "_pale...
Returns the base color for this node. :return <QColor>
[ "Returns", "the", "base", "color", "for", "this", "node", ".", ":", "return", "<QColor", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1685-L1698
train
Sets the disabled border color for this node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setDisabledColor
def setDisabledColor(self, color): """ Sets the disabled color used when drawing this node as disabled. :param color | <QColor> """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) ...
python
def setDisabledColor(self, color): """ Sets the disabled color used when drawing this node as disabled. :param color | <QColor> """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) ...
[ "def", "setDisabledColor", "(", "self", ",", "color", ")", ":", "color", "=", "QColor", "(", "color", ")", "if", "self", ".", "_palette", "is", "None", ":", "self", ".", "_palette", "=", "XNodePalette", "(", "self", ".", "_scenePalette", ")", "self", "...
Sets the disabled color used when drawing this node as disabled. :param color | <QColor>
[ "Sets", "the", "disabled", "color", "used", "when", "drawing", "this", "node", "as", "disabled", ".", ":", "param", "color", "|", "<QColor", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1700-L1716
train
Sets the disabled color used when drawing this node as disabled.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setDisabledPenColor
def setDisabledPenColor(self, color): """ Sets the pen color to be used when drawing this node as disabled. :param color | <QColor> """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) ...
python
def setDisabledPenColor(self, color): """ Sets the pen color to be used when drawing this node as disabled. :param color | <QColor> """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) ...
[ "def", "setDisabledPenColor", "(", "self", ",", "color", ")", ":", "color", "=", "QColor", "(", "color", ")", "if", "self", ".", "_palette", "is", "None", ":", "self", ".", "_palette", "=", "XNodePalette", "(", "self", ".", "_scenePalette", ")", "self", ...
Sets the pen color to be used when drawing this node as disabled. :param color | <QColor>
[ "Sets", "the", "pen", "color", "to", "be", "used", "when", "drawing", "this", "node", "as", "disabled", ".", ":", "param", "color", "|", "<QColor", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1718-L1731
train
Sets the pen color to be used when drawing this node as disabled.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setHighlightColor
def setHighlightColor(self, color): """ Sets the color to be used when highlighting a node. :param color <QColor> || None """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) ...
python
def setHighlightColor(self, color): """ Sets the color to be used when highlighting a node. :param color <QColor> || None """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) ...
[ "def", "setHighlightColor", "(", "self", ",", "color", ")", ":", "color", "=", "QColor", "(", "color", ")", "if", "self", ".", "_palette", "is", "None", ":", "self", ".", "_palette", "=", "XNodePalette", "(", "self", ".", "_scenePalette", ")", "self", ...
Sets the color to be used when highlighting a node. :param color <QColor> || None
[ "Sets", "the", "color", "to", "be", "used", "when", "highlighting", "a", "node", ".", ":", "param", "color", "<QColor", ">", "||", "None" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1768-L1779
train
Sets the color to be used when highlighting a node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setHotspotColor
def setHotspotColor(self, color): """ Sets the hotspot color for this node to the inputed color. :param color | <QColor> """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) self._p...
python
def setHotspotColor(self, color): """ Sets the hotspot color for this node to the inputed color. :param color | <QColor> """ color = QColor(color) if self._palette is None: self._palette = XNodePalette(self._scenePalette) self._p...
[ "def", "setHotspotColor", "(", "self", ",", "color", ")", ":", "color", "=", "QColor", "(", "color", ")", "if", "self", ".", "_palette", "is", "None", ":", "self", ".", "_palette", "=", "XNodePalette", "(", "self", ".", "_scenePalette", ")", "self", "....
Sets the hotspot color for this node to the inputed color. :param color | <QColor>
[ "Sets", "the", "hotspot", "color", "for", "this", "node", "to", "the", "inputed", "color", ".", ":", "param", "color", "|", "<QColor", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1790-L1801
train
Sets the hotspot color for this node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setIcon
def setIcon(self, icon): """ Sets the icon for this item to the inputed icon. :param icon | <str> || <QIcon> || None """ if icon: self._icon = QIcon(icon) else: self._icon = None
python
def setIcon(self, icon): """ Sets the icon for this item to the inputed icon. :param icon | <str> || <QIcon> || None """ if icon: self._icon = QIcon(icon) else: self._icon = None
[ "def", "setIcon", "(", "self", ",", "icon", ")", ":", "if", "icon", ":", "self", ".", "_icon", "=", "QIcon", "(", "icon", ")", "else", ":", "self", ".", "_icon", "=", "None" ]
Sets the icon for this item to the inputed icon. :param icon | <str> || <QIcon> || None
[ "Sets", "the", "icon", "for", "this", "item", "to", "the", "inputed", "icon", ".", ":", "param", "icon", "|", "<str", ">", "||", "<QIcon", ">", "||", "None" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1812-L1821
train
Sets the icon for this item to the inputed icon.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setIsolateHidden
def setIsolateHidden(self, state): """ Sets whether or not this item is hidden due to isolation. :param state | <bool> """ self._isolatedHidden = state super(XNode, self).setVisible(self.isVisible())
python
def setIsolateHidden(self, state): """ Sets whether or not this item is hidden due to isolation. :param state | <bool> """ self._isolatedHidden = state super(XNode, self).setVisible(self.isVisible())
[ "def", "setIsolateHidden", "(", "self", ",", "state", ")", ":", "self", ".", "_isolatedHidden", "=", "state", "super", "(", "XNode", ",", "self", ")", ".", "setVisible", "(", "self", ".", "isVisible", "(", ")", ")" ]
Sets whether or not this item is hidden due to isolation. :param state | <bool>
[ "Sets", "whether", "or", "not", "this", "item", "is", "hidden", "due", "to", "isolation", ".", ":", "param", "state", "|", "<bool", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1831-L1839
train
Sets whether or not this item is hidden due to isolation.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setLocked
def setLocked( self, state = True ): """ Locks the node in both the x and y directions. :param state <bool> """ self._xLocked = state self._yLocked = state
python
def setLocked( self, state = True ): """ Locks the node in both the x and y directions. :param state <bool> """ self._xLocked = state self._yLocked = state
[ "def", "setLocked", "(", "self", ",", "state", "=", "True", ")", ":", "self", ".", "_xLocked", "=", "state", "self", ".", "_yLocked", "=", "state" ]
Locks the node in both the x and y directions. :param state <bool>
[ "Locks", "the", "node", "in", "both", "the", "x", "and", "y", "directions", ".", ":", "param", "state", "<bool", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1857-L1864
train
Sets the locked state of the node.
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setObjectName
def setObjectName( self, name ): """ Sets the unique object name for this node by grabbing the next \ available unique name from the scene based on the inputed string. \ The resulting name will be returned. :warning this method will create a unique name based ...
python
def setObjectName( self, name ): """ Sets the unique object name for this node by grabbing the next \ available unique name from the scene based on the inputed string. \ The resulting name will be returned. :warning this method will create a unique name based ...
[ "def", "setObjectName", "(", "self", ",", "name", ")", ":", "scene", "=", "self", ".", "scene", "(", ")", "if", "scene", ":", "name", "=", "scene", ".", "uniqueNodeName", "(", "name", ")", "self", ".", "_objectName", "=", "name", "self", ".", "adjust...
Sets the unique object name for this node by grabbing the next \ available unique name from the scene based on the inputed string. \ The resulting name will be returned. :warning this method will create a unique name based on the inputed name - there is no guaran...
[ "Sets", "the", "unique", "object", "name", "for", "this", "node", "by", "grabbing", "the", "next", "\\", "available", "unique", "name", "from", "the", "scene", "based", "on", "the", "inputed", "string", ".", "\\", "The", "resulting", "name", "will", "be", ...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1898-L1920
train
Sets the unique object name for this node
bitesofcode/projexui
projexui/widgets/xnodewidget/xnode.py
XNode.setPalette
def setPalette(self, palette): """ Sets the palette for this node to the inputed palette. If None is provided, then the scene's palette will be used for this node. :param palette | <XNodePalette> || None """ self._palette = XNodePalette(palette) if palette ...
python
def setPalette(self, palette): """ Sets the palette for this node to the inputed palette. If None is provided, then the scene's palette will be used for this node. :param palette | <XNodePalette> || None """ self._palette = XNodePalette(palette) if palette ...
[ "def", "setPalette", "(", "self", ",", "palette", ")", ":", "self", ".", "_palette", "=", "XNodePalette", "(", "palette", ")", "if", "palette", "is", "not", "None", "else", "None", "self", ".", "setDirty", "(", ")" ]
Sets the palette for this node to the inputed palette. If None is provided, then the scene's palette will be used for this node. :param palette | <XNodePalette> || None
[ "Sets", "the", "palette", "for", "this", "node", "to", "the", "inputed", "palette", ".", "If", "None", "is", "provided", "then", "the", "scene", "s", "palette", "will", "be", "used", "for", "this", "node", ".", ":", "param", "palette", "|", "<XNodePalett...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnode.py#L1922-L1930
train
Sets the palette for this node to the inputed palette.