repo stringlengths 7 55 | path stringlengths 4 223 | func_name stringlengths 1 134 | original_string stringlengths 75 104k | language stringclasses 1
value | code stringlengths 75 104k | code_tokens listlengths 19 28.4k | docstring stringlengths 1 46.9k | docstring_tokens listlengths 1 1.97k | sha stringlengths 40 40 | url stringlengths 87 315 | partition stringclasses 3
values | summary stringlengths 4 350 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
bitesofcode/projexui | projexui/widgets/xdocktoolbar.py | XDockToolbar.clear | def clear(self):
"""
Clears out all the actions and items from this toolbar.
"""
# clear the actions from this widget
for act in self.actions():
act.setParent(None)
act.deleteLater()
# clear the labels from this widget
fo... | python | def clear(self):
"""
Clears out all the actions and items from this toolbar.
"""
# clear the actions from this widget
for act in self.actions():
act.setParent(None)
act.deleteLater()
# clear the labels from this widget
fo... | [
"def",
"clear",
"(",
"self",
")",
":",
"# clear the actions from this widget\r",
"for",
"act",
"in",
"self",
".",
"actions",
"(",
")",
":",
"act",
".",
"setParent",
"(",
"None",
")",
"act",
".",
"deleteLater",
"(",
")",
"# clear the labels from this widget\r",
... | Clears out all the actions and items from this toolbar. | [
"Clears",
"out",
"all",
"the",
"actions",
"and",
"items",
"from",
"this",
"toolbar",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xdocktoolbar.py#L242-L254 | train | Clears out all the actions and items from this toolbar. |
bitesofcode/projexui | projexui/widgets/xdocktoolbar.py | XDockToolbar.eventFilter | def eventFilter(self, object, event):
"""
Filters the parent objects events to rebuild this toolbar when
the widget resizes.
:param object | <QObject>
event | <QEvent>
"""
if event.type() in (event.Move, event.Resize):
... | python | def eventFilter(self, object, event):
"""
Filters the parent objects events to rebuild this toolbar when
the widget resizes.
:param object | <QObject>
event | <QEvent>
"""
if event.type() in (event.Move, event.Resize):
... | [
"def",
"eventFilter",
"(",
"self",
",",
"object",
",",
"event",
")",
":",
"if",
"event",
".",
"type",
"(",
")",
"in",
"(",
"event",
".",
"Move",
",",
"event",
".",
"Resize",
")",
":",
"if",
"self",
".",
"isVisible",
"(",
")",
":",
"self",
".",
... | Filters the parent objects events to rebuild this toolbar when
the widget resizes.
:param object | <QObject>
event | <QEvent> | [
"Filters",
"the",
"parent",
"objects",
"events",
"to",
"rebuild",
"this",
"toolbar",
"when",
"the",
"widget",
"resizes",
".",
":",
"param",
"object",
"|",
"<QObject",
">",
"event",
"|",
"<QEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xdocktoolbar.py#L288-L302 | train | Filters the parent objects events to rebuild this toolbar when the widget resizes. |
bitesofcode/projexui | projexui/widgets/xdocktoolbar.py | XDockToolbar.labelForAction | def labelForAction(self, action):
"""
Returns the label that contains the inputed action.
:return <XDockActionLabel> || None
"""
for label in self.actionLabels():
if label.action() == action:
return label
return None | python | def labelForAction(self, action):
"""
Returns the label that contains the inputed action.
:return <XDockActionLabel> || None
"""
for label in self.actionLabels():
if label.action() == action:
return label
return None | [
"def",
"labelForAction",
"(",
"self",
",",
"action",
")",
":",
"for",
"label",
"in",
"self",
".",
"actionLabels",
"(",
")",
":",
"if",
"label",
".",
"action",
"(",
")",
"==",
"action",
":",
"return",
"label",
"return",
"None"
] | Returns the label that contains the inputed action.
:return <XDockActionLabel> || None | [
"Returns",
"the",
"label",
"that",
"contains",
"the",
"inputed",
"action",
".",
":",
"return",
"<XDockActionLabel",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xdocktoolbar.py#L313-L322 | train | Returns the label that contains the inputed action. |
bitesofcode/projexui | projexui/widgets/xdocktoolbar.py | XDockToolbar.leaveEvent | def leaveEvent(self, event):
"""
Clears the current action for this widget.
:param event | <QEvent>
"""
super(XDockToolbar, self).leaveEvent(event)
if not self.actionHeld():
self.setCurrentAction(None) | python | def leaveEvent(self, event):
"""
Clears the current action for this widget.
:param event | <QEvent>
"""
super(XDockToolbar, self).leaveEvent(event)
if not self.actionHeld():
self.setCurrentAction(None) | [
"def",
"leaveEvent",
"(",
"self",
",",
"event",
")",
":",
"super",
"(",
"XDockToolbar",
",",
"self",
")",
".",
"leaveEvent",
"(",
"event",
")",
"if",
"not",
"self",
".",
"actionHeld",
"(",
")",
":",
"self",
".",
"setCurrentAction",
"(",
"None",
")"
] | Clears the current action for this widget.
:param event | <QEvent> | [
"Clears",
"the",
"current",
"action",
"for",
"this",
"widget",
".",
":",
"param",
"event",
"|",
"<QEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xdocktoolbar.py#L324-L333 | train | Removes the current action for this widget if it is currently being hidden. |
bitesofcode/projexui | projexui/widgets/xdocktoolbar.py | XDockToolbar.paintEvent | def paintEvent(self, event):
"""
Paints the background for the dock toolbar.
:param event | <QPaintEvent>
"""
x = 1
y = 1
w = self.width()
h = self.height()
clr_a = QColor(220, 220, 220)
clr_b = QColor(190... | python | def paintEvent(self, event):
"""
Paints the background for the dock toolbar.
:param event | <QPaintEvent>
"""
x = 1
y = 1
w = self.width()
h = self.height()
clr_a = QColor(220, 220, 220)
clr_b = QColor(190... | [
"def",
"paintEvent",
"(",
"self",
",",
"event",
")",
":",
"x",
"=",
"1",
"y",
"=",
"1",
"w",
"=",
"self",
".",
"width",
"(",
")",
"h",
"=",
"self",
".",
"height",
"(",
")",
"clr_a",
"=",
"QColor",
"(",
"220",
",",
"220",
",",
"220",
")",
"c... | Paints the background for the dock toolbar.
:param event | <QPaintEvent> | [
"Paints",
"the",
"background",
"for",
"the",
"dock",
"toolbar",
".",
":",
"param",
"event",
"|",
"<QPaintEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xdocktoolbar.py#L369-L442 | train | Paints the background for the dock toolbar. |
bitesofcode/projexui | projexui/widgets/xdocktoolbar.py | XDockToolbar.rebuild | def rebuild(self):
"""
Rebuilds the widget based on the position and current size/location
of its parent.
"""
if not self.isVisible():
return
self.raise_()
max_size = self.maximumPixmapSize()
min_size = self.minimum... | python | def rebuild(self):
"""
Rebuilds the widget based on the position and current size/location
of its parent.
"""
if not self.isVisible():
return
self.raise_()
max_size = self.maximumPixmapSize()
min_size = self.minimum... | [
"def",
"rebuild",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"isVisible",
"(",
")",
":",
"return",
"self",
".",
"raise_",
"(",
")",
"max_size",
"=",
"self",
".",
"maximumPixmapSize",
"(",
")",
"min_size",
"=",
"self",
".",
"minimumPixmapSize",
"(... | Rebuilds the widget based on the position and current size/location
of its parent. | [
"Rebuilds",
"the",
"widget",
"based",
"on",
"the",
"position",
"and",
"current",
"size",
"/",
"location",
"of",
"its",
"parent",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xdocktoolbar.py#L452-L488 | train | Rebuilds the widget based on the position and current size and location of the parent. |
bitesofcode/projexui | projexui/widgets/xdocktoolbar.py | XDockToolbar.resizeToMinimum | def resizeToMinimum(self):
"""
Resizes the dock toolbar to the minimum sizes.
"""
offset = self.padding()
min_size = self.minimumPixmapSize()
if self.position() in (XDockToolbar.Position.East,
XDockToolbar.Position.West):
... | python | def resizeToMinimum(self):
"""
Resizes the dock toolbar to the minimum sizes.
"""
offset = self.padding()
min_size = self.minimumPixmapSize()
if self.position() in (XDockToolbar.Position.East,
XDockToolbar.Position.West):
... | [
"def",
"resizeToMinimum",
"(",
"self",
")",
":",
"offset",
"=",
"self",
".",
"padding",
"(",
")",
"min_size",
"=",
"self",
".",
"minimumPixmapSize",
"(",
")",
"if",
"self",
".",
"position",
"(",
")",
"in",
"(",
"XDockToolbar",
".",
"Position",
".",
"Ea... | Resizes the dock toolbar to the minimum sizes. | [
"Resizes",
"the",
"dock",
"toolbar",
"to",
"the",
"minimum",
"sizes",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xdocktoolbar.py#L490-L503 | train | Resizes the dock toolbar to the minimum sizes. |
bitesofcode/projexui | projexui/widgets/xdocktoolbar.py | XDockToolbar.setCurrentAction | def setCurrentAction(self, action):
"""
Sets the current action for this widget that highlights the size
for this toolbar.
:param action | <QAction>
"""
if action == self._currentAction:
return
self._currentAction = act... | python | def setCurrentAction(self, action):
"""
Sets the current action for this widget that highlights the size
for this toolbar.
:param action | <QAction>
"""
if action == self._currentAction:
return
self._currentAction = act... | [
"def",
"setCurrentAction",
"(",
"self",
",",
"action",
")",
":",
"if",
"action",
"==",
"self",
".",
"_currentAction",
":",
"return",
"self",
".",
"_currentAction",
"=",
"action",
"self",
".",
"currentActionChanged",
".",
"emit",
"(",
"action",
")",
"labels",... | Sets the current action for this widget that highlights the size
for this toolbar.
:param action | <QAction> | [
"Sets",
"the",
"current",
"action",
"for",
"this",
"widget",
"that",
"highlights",
"the",
"size",
"for",
"this",
"toolbar",
".",
":",
"param",
"action",
"|",
"<QAction",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xdocktoolbar.py#L522-L625 | train | Sets the current action for this toolbar that highlights the size of the size of the current toolbar. |
bitesofcode/projexui | projexui/widgets/xdocktoolbar.py | XDockToolbar.setMaximumPixmapSize | def setMaximumPixmapSize(self, size):
"""
Sets the maximum pixmap size for this toolbar.
:param size | <int>
"""
self._maximumPixmapSize = size
position = self.position()
self._position = None
self.setPosition(position) | python | def setMaximumPixmapSize(self, size):
"""
Sets the maximum pixmap size for this toolbar.
:param size | <int>
"""
self._maximumPixmapSize = size
position = self.position()
self._position = None
self.setPosition(position) | [
"def",
"setMaximumPixmapSize",
"(",
"self",
",",
"size",
")",
":",
"self",
".",
"_maximumPixmapSize",
"=",
"size",
"position",
"=",
"self",
".",
"position",
"(",
")",
"self",
".",
"_position",
"=",
"None",
"self",
".",
"setPosition",
"(",
"position",
")"
] | Sets the maximum pixmap size for this toolbar.
:param size | <int> | [
"Sets",
"the",
"maximum",
"pixmap",
"size",
"for",
"this",
"toolbar",
".",
":",
"param",
"size",
"|",
"<int",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xdocktoolbar.py#L643-L652 | train | Sets the maximum pixmap size for this toolbar. |
bitesofcode/projexui | projexui/widgets/xdocktoolbar.py | XDockToolbar.setMinimumPixmapSize | def setMinimumPixmapSize(self, size):
"""
Sets the minimum pixmap size that will be displayed to the user
for the dock widget.
:param size | <int>
"""
self._minimumPixmapSize = size
position = self.position()
self._position = None
... | python | def setMinimumPixmapSize(self, size):
"""
Sets the minimum pixmap size that will be displayed to the user
for the dock widget.
:param size | <int>
"""
self._minimumPixmapSize = size
position = self.position()
self._position = None
... | [
"def",
"setMinimumPixmapSize",
"(",
"self",
",",
"size",
")",
":",
"self",
".",
"_minimumPixmapSize",
"=",
"size",
"position",
"=",
"self",
".",
"position",
"(",
")",
"self",
".",
"_position",
"=",
"None",
"self",
".",
"setPosition",
"(",
"position",
")"
] | Sets the minimum pixmap size that will be displayed to the user
for the dock widget.
:param size | <int> | [
"Sets",
"the",
"minimum",
"pixmap",
"size",
"that",
"will",
"be",
"displayed",
"to",
"the",
"user",
"for",
"the",
"dock",
"widget",
".",
":",
"param",
"size",
"|",
"<int",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xdocktoolbar.py#L654-L664 | train | Sets the minimum size that will be displayed for the dock widget. |
bitesofcode/projexui | projexui/widgets/xdocktoolbar.py | XDockToolbar.setPosition | def setPosition(self, position):
"""
Sets the position for this widget and its parent.
:param position | <XDockToolbar.Position>
"""
if position == self._position:
return
self._position = position
widget = s... | python | def setPosition(self, position):
"""
Sets the position for this widget and its parent.
:param position | <XDockToolbar.Position>
"""
if position == self._position:
return
self._position = position
widget = s... | [
"def",
"setPosition",
"(",
"self",
",",
"position",
")",
":",
"if",
"position",
"==",
"self",
".",
"_position",
":",
"return",
"self",
".",
"_position",
"=",
"position",
"widget",
"=",
"self",
".",
"window",
"(",
")",
"layout",
"=",
"self",
".",
"layou... | Sets the position for this widget and its parent.
:param position | <XDockToolbar.Position> | [
"Sets",
"the",
"position",
"for",
"this",
"widget",
"and",
"its",
"parent",
".",
":",
"param",
"position",
"|",
"<XDockToolbar",
".",
"Position",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xdocktoolbar.py#L674-L718 | train | Sets the position for this widget and its parent. |
bitesofcode/projexui | projexui/widgets/xdocktoolbar.py | XDockToolbar.setVisible | def setVisible(self, state):
"""
Sets whether or not this toolbar is visible. If shown, it will rebuild.
:param state | <bool>
"""
super(XDockToolbar, self).setVisible(state)
if state:
self.rebuild()
self.setCurren... | python | def setVisible(self, state):
"""
Sets whether or not this toolbar is visible. If shown, it will rebuild.
:param state | <bool>
"""
super(XDockToolbar, self).setVisible(state)
if state:
self.rebuild()
self.setCurren... | [
"def",
"setVisible",
"(",
"self",
",",
"state",
")",
":",
"super",
"(",
"XDockToolbar",
",",
"self",
")",
".",
"setVisible",
"(",
"state",
")",
"if",
"state",
":",
"self",
".",
"rebuild",
"(",
")",
"self",
".",
"setCurrentAction",
"(",
"None",
")"
] | Sets whether or not this toolbar is visible. If shown, it will rebuild.
:param state | <bool> | [
"Sets",
"whether",
"or",
"not",
"this",
"toolbar",
"is",
"visible",
".",
"If",
"shown",
"it",
"will",
"rebuild",
".",
":",
"param",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xdocktoolbar.py#L729-L739 | train | Sets whether or not this toolbar is visible. |
bitesofcode/projexui | projexui/widgets/xdocktoolbar.py | XDockToolbar.unholdAction | def unholdAction(self):
"""
Unholds the action from being blocked on the leave event.
"""
self._actionHeld = False
point = self.mapFromGlobal(QCursor.pos())
self.setCurrentAction(self.actionAt(point)) | python | def unholdAction(self):
"""
Unholds the action from being blocked on the leave event.
"""
self._actionHeld = False
point = self.mapFromGlobal(QCursor.pos())
self.setCurrentAction(self.actionAt(point)) | [
"def",
"unholdAction",
"(",
"self",
")",
":",
"self",
".",
"_actionHeld",
"=",
"False",
"point",
"=",
"self",
".",
"mapFromGlobal",
"(",
"QCursor",
".",
"pos",
"(",
")",
")",
"self",
".",
"setCurrentAction",
"(",
"self",
".",
"actionAt",
"(",
"point",
... | Unholds the action from being blocked on the leave event. | [
"Unholds",
"the",
"action",
"from",
"being",
"blocked",
"on",
"the",
"leave",
"event",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xdocktoolbar.py#L741-L748 | train | Unholds the action from being blocked on the leave event. |
bitesofcode/projexui | projexui/widgets/xdocktoolbar.py | XDockToolbar.visualRect | def visualRect(self, action):
"""
Returns the visual rect for the inputed action, or a blank QRect if
no matching action was found.
:param action | <QAction>
:return <QRect>
"""
for widget in self.actionLabels():
if... | python | def visualRect(self, action):
"""
Returns the visual rect for the inputed action, or a blank QRect if
no matching action was found.
:param action | <QAction>
:return <QRect>
"""
for widget in self.actionLabels():
if... | [
"def",
"visualRect",
"(",
"self",
",",
"action",
")",
":",
"for",
"widget",
"in",
"self",
".",
"actionLabels",
"(",
")",
":",
"if",
"widget",
".",
"action",
"(",
")",
"==",
"action",
":",
"return",
"widget",
".",
"geometry",
"(",
")",
"return",
"QRec... | Returns the visual rect for the inputed action, or a blank QRect if
no matching action was found.
:param action | <QAction>
:return <QRect> | [
"Returns",
"the",
"visual",
"rect",
"for",
"the",
"inputed",
"action",
"or",
"a",
"blank",
"QRect",
"if",
"no",
"matching",
"action",
"was",
"found",
".",
":",
"param",
"action",
"|",
"<QAction",
">",
":",
"return",
"<QRect",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xdocktoolbar.py#L750-L762 | train | Returns the visual rect for the inputed action. |
bitesofcode/projexui | projexui/xscheme.py | XScheme.apply | def apply( self ):
"""
Applies the scheme to the current application.
"""
font = self.value('font')
try:
font.setPointSize(self.value('fontSize'))
# errors in linux for some reason
except TypeError:
pass
... | python | def apply( self ):
"""
Applies the scheme to the current application.
"""
font = self.value('font')
try:
font.setPointSize(self.value('fontSize'))
# errors in linux for some reason
except TypeError:
pass
... | [
"def",
"apply",
"(",
"self",
")",
":",
"font",
"=",
"self",
".",
"value",
"(",
"'font'",
")",
"try",
":",
"font",
".",
"setPointSize",
"(",
"self",
".",
"value",
"(",
"'fontSize'",
")",
")",
"# errors in linux for some reason\r",
"except",
"TypeError",
":"... | Applies the scheme to the current application. | [
"Applies",
"the",
"scheme",
"to",
"the",
"current",
"application",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xscheme.py#L38-L62 | train | Applies the scheme to the current application. |
bitesofcode/projexui | projexui/xscheme.py | XScheme.reset | def reset( self ):
"""
Resets the values to the current application information.
"""
self.setValue('colorSet', XPaletteColorSet())
self.setValue('font', QApplication.font())
self.setValue('fontSize', QApplication.font().pointSize()) | python | def reset( self ):
"""
Resets the values to the current application information.
"""
self.setValue('colorSet', XPaletteColorSet())
self.setValue('font', QApplication.font())
self.setValue('fontSize', QApplication.font().pointSize()) | [
"def",
"reset",
"(",
"self",
")",
":",
"self",
".",
"setValue",
"(",
"'colorSet'",
",",
"XPaletteColorSet",
"(",
")",
")",
"self",
".",
"setValue",
"(",
"'font'",
",",
"QApplication",
".",
"font",
"(",
")",
")",
"self",
".",
"setValue",
"(",
"'fontSize... | Resets the values to the current application information. | [
"Resets",
"the",
"values",
"to",
"the",
"current",
"application",
"information",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xscheme.py#L64-L70 | train | Resets the values to the current application information. |
bitesofcode/projexui | projexui/widgets/xcommentedit.py | XCommentEdit.addAttachment | def addAttachment(self, title, attachment):
"""
Adds an attachment to this comment.
:param title | <str>
attachment | <variant>
"""
self._attachments[title] = attachment
self.resizeToContents() | python | def addAttachment(self, title, attachment):
"""
Adds an attachment to this comment.
:param title | <str>
attachment | <variant>
"""
self._attachments[title] = attachment
self.resizeToContents() | [
"def",
"addAttachment",
"(",
"self",
",",
"title",
",",
"attachment",
")",
":",
"self",
".",
"_attachments",
"[",
"title",
"]",
"=",
"attachment",
"self",
".",
"resizeToContents",
"(",
")"
] | Adds an attachment to this comment.
:param title | <str>
attachment | <variant> | [
"Adds",
"an",
"attachment",
"to",
"this",
"comment",
".",
":",
"param",
"title",
"|",
"<str",
">",
"attachment",
"|",
"<variant",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcommentedit.py#L92-L100 | train | Adds an attachment to this comment. |
bitesofcode/projexui | projexui/widgets/xcommentedit.py | XCommentEdit.pickAttachment | def pickAttachment(self):
"""
Prompts the user to select an attachment to add to this edit.
"""
filename = QFileDialog.getOpenFileName(self.window(),
'Select Attachment',
'',
... | python | def pickAttachment(self):
"""
Prompts the user to select an attachment to add to this edit.
"""
filename = QFileDialog.getOpenFileName(self.window(),
'Select Attachment',
'',
... | [
"def",
"pickAttachment",
"(",
"self",
")",
":",
"filename",
"=",
"QFileDialog",
".",
"getOpenFileName",
"(",
"self",
".",
"window",
"(",
")",
",",
"'Select Attachment'",
",",
"''",
",",
"'All Files (*.*)'",
")",
"if",
"type",
"(",
"filename",
")",
"==",
"t... | Prompts the user to select an attachment to add to this edit. | [
"Prompts",
"the",
"user",
"to",
"select",
"an",
"attachment",
"to",
"add",
"to",
"this",
"edit",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcommentedit.py#L145-L159 | train | Prompts the user to select an attachment to add to this edit. |
bitesofcode/projexui | projexui/widgets/xcommentedit.py | XCommentEdit.removeAttachment | def removeAttachment(self, title):
"""
Removes the attachment from the given title.
:param title | <str>
:return <variant> | attachment
"""
attachment = self._attachments.pop(nativestring(title), None)
if attachment:
... | python | def removeAttachment(self, title):
"""
Removes the attachment from the given title.
:param title | <str>
:return <variant> | attachment
"""
attachment = self._attachments.pop(nativestring(title), None)
if attachment:
... | [
"def",
"removeAttachment",
"(",
"self",
",",
"title",
")",
":",
"attachment",
"=",
"self",
".",
"_attachments",
".",
"pop",
"(",
"nativestring",
"(",
"title",
")",
",",
"None",
")",
"if",
"attachment",
":",
"self",
".",
"resizeToContents",
"(",
")",
"ret... | Removes the attachment from the given title.
:param title | <str>
:return <variant> | attachment | [
"Removes",
"the",
"attachment",
"from",
"the",
"given",
"title",
".",
":",
"param",
"title",
"|",
"<str",
">",
":",
"return",
"<variant",
">",
"|",
"attachment"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcommentedit.py#L161-L174 | train | Removes the first attachment with the given title. |
bitesofcode/projexui | projexui/widgets/xcommentedit.py | XCommentEdit.resizeToContents | def resizeToContents(self):
"""
Resizes this toolbar based on the contents of its text.
"""
if self._toolbar.isVisible():
doc = self.document()
h = doc.documentLayout().documentSize().height()
offset = 34
... | python | def resizeToContents(self):
"""
Resizes this toolbar based on the contents of its text.
"""
if self._toolbar.isVisible():
doc = self.document()
h = doc.documentLayout().documentSize().height()
offset = 34
... | [
"def",
"resizeToContents",
"(",
"self",
")",
":",
"if",
"self",
".",
"_toolbar",
".",
"isVisible",
"(",
")",
":",
"doc",
"=",
"self",
".",
"document",
"(",
")",
"h",
"=",
"doc",
".",
"documentLayout",
"(",
")",
".",
"documentSize",
"(",
")",
".",
"... | Resizes this toolbar based on the contents of its text. | [
"Resizes",
"this",
"toolbar",
"based",
"on",
"the",
"contents",
"of",
"its",
"text",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcommentedit.py#L183-L208 | train | Resizes this toolbar based on the contents of its text. |
bitesofcode/projexui | projexui/widgets/xcommentedit.py | XCommentEdit.setShowAttachments | def setShowAttachments(self, state):
"""
Sets whether or not to show the attachments for this edit.
:param state | <bool>
"""
self._showAttachments = state
self._attachAction.setVisible(state) | python | def setShowAttachments(self, state):
"""
Sets whether or not to show the attachments for this edit.
:param state | <bool>
"""
self._showAttachments = state
self._attachAction.setVisible(state) | [
"def",
"setShowAttachments",
"(",
"self",
",",
"state",
")",
":",
"self",
".",
"_showAttachments",
"=",
"state",
"self",
".",
"_attachAction",
".",
"setVisible",
"(",
"state",
")"
] | Sets whether or not to show the attachments for this edit.
:param state | <bool> | [
"Sets",
"whether",
"or",
"not",
"to",
"show",
"the",
"attachments",
"for",
"this",
"edit",
".",
":",
"param",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcommentedit.py#L227-L234 | train | Sets whether or not the attachments should be shown for this edit. |
bitesofcode/projexui | projexui/widgets/xrichtextedit/xfontpickerwidget.py | XFontPickerWidget.setCurrentFamily | def setCurrentFamily(self, family):
"""
Sets the current font family to the inputed family.
:param family | <str>
"""
for i in range(self.uiFontTREE.topLevelItemCount()):
item = self.uiFontTREE.topLevelItem(i)
if item.text(0) == famil... | python | def setCurrentFamily(self, family):
"""
Sets the current font family to the inputed family.
:param family | <str>
"""
for i in range(self.uiFontTREE.topLevelItemCount()):
item = self.uiFontTREE.topLevelItem(i)
if item.text(0) == famil... | [
"def",
"setCurrentFamily",
"(",
"self",
",",
"family",
")",
":",
"for",
"i",
"in",
"range",
"(",
"self",
".",
"uiFontTREE",
".",
"topLevelItemCount",
"(",
")",
")",
":",
"item",
"=",
"self",
".",
"uiFontTREE",
".",
"topLevelItem",
"(",
"i",
")",
"if",
... | Sets the current font family to the inputed family.
:param family | <str> | [
"Sets",
"the",
"current",
"font",
"family",
"to",
"the",
"inputed",
"family",
".",
":",
"param",
"family",
"|",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xfontpickerwidget.py#L66-L78 | train | Sets the current font family to the inputed family. |
bitesofcode/projexui | projexui/widgets/xrichtextedit/xfontpickerwidget.py | XFontPickerWidget.setPointSize | def setPointSize(self, pointSize):
"""
Sets the point size for this widget to the inputed size.
:param pointSize | <int>
"""
self.uiSizeSPN.blockSignals(True)
self.uiSizeSPN.setValue(pointSize)
self.uiSizeSPN.blockSignals(False)
... | python | def setPointSize(self, pointSize):
"""
Sets the point size for this widget to the inputed size.
:param pointSize | <int>
"""
self.uiSizeSPN.blockSignals(True)
self.uiSizeSPN.setValue(pointSize)
self.uiSizeSPN.blockSignals(False)
... | [
"def",
"setPointSize",
"(",
"self",
",",
"pointSize",
")",
":",
"self",
".",
"uiSizeSPN",
".",
"blockSignals",
"(",
"True",
")",
"self",
".",
"uiSizeSPN",
".",
"setValue",
"(",
"pointSize",
")",
"self",
".",
"uiSizeSPN",
".",
"blockSignals",
"(",
"False",
... | Sets the point size for this widget to the inputed size.
:param pointSize | <int> | [
"Sets",
"the",
"point",
"size",
"for",
"this",
"widget",
"to",
"the",
"inputed",
"size",
".",
":",
"param",
"pointSize",
"|",
"<int",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xfontpickerwidget.py#L80-L94 | train | Sets the point size for this widget to the inputed size. |
johnnoone/aioconsul | aioconsul/client/operator_endpoint.py | OperatorEndpoint.configuration | async def configuration(self, *, dc=None, consistency=None):
"""Inspects the Raft configuration
Parameters:
dc (str): Specify datacenter that will be used.
Defaults to the agent's local datacenter.
consistency (str): Read the Raft configuration from any of ... | python | async def configuration(self, *, dc=None, consistency=None):
"""Inspects the Raft configuration
Parameters:
dc (str): Specify datacenter that will be used.
Defaults to the agent's local datacenter.
consistency (str): Read the Raft configuration from any of ... | [
"async",
"def",
"configuration",
"(",
"self",
",",
"*",
",",
"dc",
"=",
"None",
",",
"consistency",
"=",
"None",
")",
":",
"response",
"=",
"await",
"self",
".",
"_api",
".",
"get",
"(",
"\"/v1/operator/raft/configuration\"",
",",
"params",
"=",
"{",
"\"... | Inspects the Raft configuration
Parameters:
dc (str): Specify datacenter that will be used.
Defaults to the agent's local datacenter.
consistency (str): Read the Raft configuration from any of the
Consul servers, otherwise raise an ex... | [
"Inspects",
"the",
"Raft",
"configuration"
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/operator_endpoint.py#L7-L72 | train | Inspects the Raft configuration of a specific agent. |
johnnoone/aioconsul | aioconsul/client/operator_endpoint.py | OperatorEndpoint.peer_delete | async def peer_delete(self, *, dc=None, address):
"""Remove the server with given address from the Raft configuration
Parameters:
dc (str): Specify datacenter that will be used.
Defaults to the agent's local datacenter.
address (str): "IP:port" of the serve... | python | async def peer_delete(self, *, dc=None, address):
"""Remove the server with given address from the Raft configuration
Parameters:
dc (str): Specify datacenter that will be used.
Defaults to the agent's local datacenter.
address (str): "IP:port" of the serve... | [
"async",
"def",
"peer_delete",
"(",
"self",
",",
"*",
",",
"dc",
"=",
"None",
",",
"address",
")",
":",
"address",
"=",
"extract_attr",
"(",
"address",
",",
"keys",
"=",
"[",
"\"Address\"",
"]",
")",
"params",
"=",
"{",
"\"dc\"",
":",
"dc",
",",
"\... | Remove the server with given address from the Raft configuration
Parameters:
dc (str): Specify datacenter that will be used.
Defaults to the agent's local datacenter.
address (str): "IP:port" of the server to remove.
Returns:
bool: ``True`` on s... | [
"Remove",
"the",
"server",
"with",
"given",
"address",
"from",
"the",
"Raft",
"configuration"
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/operator_endpoint.py#L74-L93 | train | Remove the server with given address from the Raft configuration. |
bitesofcode/projexui | projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py | XWalkthroughWidget.addSlide | def addSlide(self, slide):
"""
Adds a new slide to the widget.
:param slide | <XWalkthroughSlide>
:return <QtGui.QGraphicsView>
"""
# create the scene
scene = XWalkthroughScene(self)
scene.setReferenceWidget(self.parent... | python | def addSlide(self, slide):
"""
Adds a new slide to the widget.
:param slide | <XWalkthroughSlide>
:return <QtGui.QGraphicsView>
"""
# create the scene
scene = XWalkthroughScene(self)
scene.setReferenceWidget(self.parent... | [
"def",
"addSlide",
"(",
"self",
",",
"slide",
")",
":",
"# create the scene\r",
"scene",
"=",
"XWalkthroughScene",
"(",
"self",
")",
"scene",
".",
"setReferenceWidget",
"(",
"self",
".",
"parent",
"(",
")",
")",
"scene",
".",
"load",
"(",
"slide",
")",
"... | Adds a new slide to the widget.
:param slide | <XWalkthroughSlide>
:return <QtGui.QGraphicsView> | [
"Adds",
"a",
"new",
"slide",
"to",
"the",
"widget",
".",
":",
"param",
"slide",
"|",
"<XWalkthroughSlide",
">",
":",
"return",
"<QtGui",
".",
"QGraphicsView",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py#L81-L111 | train | Adds a new slide to the widget. |
bitesofcode/projexui | projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py | XWalkthroughWidget.autoLayout | def autoLayout(self):
"""
Automatically lays out the contents for this widget.
"""
try:
direction = self.currentSlide().scene().direction()
except AttributeError:
direction = QtGui.QBoxLayout.TopToBottom
size = self.size()
... | python | def autoLayout(self):
"""
Automatically lays out the contents for this widget.
"""
try:
direction = self.currentSlide().scene().direction()
except AttributeError:
direction = QtGui.QBoxLayout.TopToBottom
size = self.size()
... | [
"def",
"autoLayout",
"(",
"self",
")",
":",
"try",
":",
"direction",
"=",
"self",
".",
"currentSlide",
"(",
")",
".",
"scene",
"(",
")",
".",
"direction",
"(",
")",
"except",
"AttributeError",
":",
"direction",
"=",
"QtGui",
".",
"QBoxLayout",
".",
"To... | Automatically lays out the contents for this widget. | [
"Automatically",
"lays",
"out",
"the",
"contents",
"for",
"this",
"widget",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py#L113-L139 | train | Auto - layout the contents of the slideshow. |
bitesofcode/projexui | projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py | XWalkthroughWidget.eventFilter | def eventFilter(self, obj, event):
"""
Filters the parent object for its resize event.
:param obj | <QtCore.QObject>
event | <QtCore.QEvent>
:return <bool> | consumed
"""
if event.type() == event.Resize:
... | python | def eventFilter(self, obj, event):
"""
Filters the parent object for its resize event.
:param obj | <QtCore.QObject>
event | <QtCore.QEvent>
:return <bool> | consumed
"""
if event.type() == event.Resize:
... | [
"def",
"eventFilter",
"(",
"self",
",",
"obj",
",",
"event",
")",
":",
"if",
"event",
".",
"type",
"(",
")",
"==",
"event",
".",
"Resize",
":",
"self",
".",
"resize",
"(",
"event",
".",
"size",
"(",
")",
")",
"return",
"False"
] | Filters the parent object for its resize event.
:param obj | <QtCore.QObject>
event | <QtCore.QEvent>
:return <bool> | consumed | [
"Filters",
"the",
"parent",
"object",
"for",
"its",
"resize",
"event",
".",
":",
"param",
"obj",
"|",
"<QtCore",
".",
"QObject",
">",
"event",
"|",
"<QtCore",
".",
"QEvent",
">",
":",
"return",
"<bool",
">",
"|",
"consumed"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py#L167-L179 | train | Filters the parent object for the specified event. |
bitesofcode/projexui | projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py | XWalkthroughWidget.goForward | def goForward(self):
"""
Moves to the next slide or finishes the walkthrough.
"""
if self._slideshow.currentIndex() == self._slideshow.count() - 1:
self.finished.emit()
else:
self._slideshow.slideInNext() | python | def goForward(self):
"""
Moves to the next slide or finishes the walkthrough.
"""
if self._slideshow.currentIndex() == self._slideshow.count() - 1:
self.finished.emit()
else:
self._slideshow.slideInNext() | [
"def",
"goForward",
"(",
"self",
")",
":",
"if",
"self",
".",
"_slideshow",
".",
"currentIndex",
"(",
")",
"==",
"self",
".",
"_slideshow",
".",
"count",
"(",
")",
"-",
"1",
":",
"self",
".",
"finished",
".",
"emit",
"(",
")",
"else",
":",
"self",
... | Moves to the next slide or finishes the walkthrough. | [
"Moves",
"to",
"the",
"next",
"slide",
"or",
"finishes",
"the",
"walkthrough",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py#L187-L194 | train | Moves to the next slide in the walkthrough. |
bitesofcode/projexui | projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py | XWalkthroughWidget.keyPressEvent | def keyPressEvent(self, event):
"""
Listens for the left/right keys and the escape key to control
the slides.
:param event | <QtCore.Qt.QKeyEvent>
"""
if event.key() == QtCore.Qt.Key_Escape:
self.cancel()
elif event.key() == QtCo... | python | def keyPressEvent(self, event):
"""
Listens for the left/right keys and the escape key to control
the slides.
:param event | <QtCore.Qt.QKeyEvent>
"""
if event.key() == QtCore.Qt.Key_Escape:
self.cancel()
elif event.key() == QtCo... | [
"def",
"keyPressEvent",
"(",
"self",
",",
"event",
")",
":",
"if",
"event",
".",
"key",
"(",
")",
"==",
"QtCore",
".",
"Qt",
".",
"Key_Escape",
":",
"self",
".",
"cancel",
"(",
")",
"elif",
"event",
".",
"key",
"(",
")",
"==",
"QtCore",
".",
"Qt"... | Listens for the left/right keys and the escape key to control
the slides.
:param event | <QtCore.Qt.QKeyEvent> | [
"Listens",
"for",
"the",
"left",
"/",
"right",
"keys",
"and",
"the",
"escape",
"key",
"to",
"control",
"the",
"slides",
".",
":",
"param",
"event",
"|",
"<QtCore",
".",
"Qt",
".",
"QKeyEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py#L196-L212 | train | Handles the key press event. |
bitesofcode/projexui | projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py | XWalkthroughWidget.load | def load(self, walkthrough):
"""
Loads the XML text for a new walkthrough.
:param walkthrough | <XWalkthrough> || <str> || <xml.etree.ElementTree.Element>
"""
if type(walkthrough) in (str, unicode):
walkthrough = XWalkthrough.load(walkthrough)
... | python | def load(self, walkthrough):
"""
Loads the XML text for a new walkthrough.
:param walkthrough | <XWalkthrough> || <str> || <xml.etree.ElementTree.Element>
"""
if type(walkthrough) in (str, unicode):
walkthrough = XWalkthrough.load(walkthrough)
... | [
"def",
"load",
"(",
"self",
",",
"walkthrough",
")",
":",
"if",
"type",
"(",
"walkthrough",
")",
"in",
"(",
"str",
",",
"unicode",
")",
":",
"walkthrough",
"=",
"XWalkthrough",
".",
"load",
"(",
"walkthrough",
")",
"self",
".",
"setUpdatesEnabled",
"(",
... | Loads the XML text for a new walkthrough.
:param walkthrough | <XWalkthrough> || <str> || <xml.etree.ElementTree.Element> | [
"Loads",
"the",
"XML",
"text",
"for",
"a",
"new",
"walkthrough",
".",
":",
"param",
"walkthrough",
"|",
"<XWalkthrough",
">",
"||",
"<str",
">",
"||",
"<xml",
".",
"etree",
".",
"ElementTree",
".",
"Element",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py#L214-L228 | train | Load the XML text for a new walkthrough. |
bitesofcode/projexui | projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py | XWalkthroughWidget.resizeEvent | def resizeEvent(self, event):
"""
Moves the widgets around the system.
:param event | <QtGui.QResizeEvent>
"""
super(XWalkthroughWidget, self).resizeEvent(event)
if self.isVisible():
self.autoLayout() | python | def resizeEvent(self, event):
"""
Moves the widgets around the system.
:param event | <QtGui.QResizeEvent>
"""
super(XWalkthroughWidget, self).resizeEvent(event)
if self.isVisible():
self.autoLayout() | [
"def",
"resizeEvent",
"(",
"self",
",",
"event",
")",
":",
"super",
"(",
"XWalkthroughWidget",
",",
"self",
")",
".",
"resizeEvent",
"(",
"event",
")",
"if",
"self",
".",
"isVisible",
"(",
")",
":",
"self",
".",
"autoLayout",
"(",
")"
] | Moves the widgets around the system.
:param event | <QtGui.QResizeEvent> | [
"Moves",
"the",
"widgets",
"around",
"the",
"system",
".",
":",
"param",
"event",
"|",
"<QtGui",
".",
"QResizeEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py#L236-L245 | train | Resize the widgets around the system. |
bitesofcode/projexui | projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py | XWalkthroughWidget.updateUi | def updateUi(self):
"""
Updates the interface to show the selection buttons.
"""
index = self._slideshow.currentIndex()
count = self._slideshow.count()
self._previousButton.setVisible(index != 0)
self._nextButton.setText('Finish' if index == count... | python | def updateUi(self):
"""
Updates the interface to show the selection buttons.
"""
index = self._slideshow.currentIndex()
count = self._slideshow.count()
self._previousButton.setVisible(index != 0)
self._nextButton.setText('Finish' if index == count... | [
"def",
"updateUi",
"(",
"self",
")",
":",
"index",
"=",
"self",
".",
"_slideshow",
".",
"currentIndex",
"(",
")",
"count",
"=",
"self",
".",
"_slideshow",
".",
"count",
"(",
")",
"self",
".",
"_previousButton",
".",
"setVisible",
"(",
"index",
"!=",
"0... | Updates the interface to show the selection buttons. | [
"Updates",
"the",
"interface",
"to",
"show",
"the",
"selection",
"buttons",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py#L247-L256 | train | Updates the interface to show the selection buttons. |
bitesofcode/projexui | projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py | XWalkthroughWidget.mouseReleaseEvent | def mouseReleaseEvent(self, event):
"""
Moves the slide forward when clicked.
:param event | <QtCore.QMouseEvent>
"""
if event.button() == QtCore.Qt.LeftButton:
if event.modifiers() == QtCore.Qt.ControlModifier:
self.goBack()
... | python | def mouseReleaseEvent(self, event):
"""
Moves the slide forward when clicked.
:param event | <QtCore.QMouseEvent>
"""
if event.button() == QtCore.Qt.LeftButton:
if event.modifiers() == QtCore.Qt.ControlModifier:
self.goBack()
... | [
"def",
"mouseReleaseEvent",
"(",
"self",
",",
"event",
")",
":",
"if",
"event",
".",
"button",
"(",
")",
"==",
"QtCore",
".",
"Qt",
".",
"LeftButton",
":",
"if",
"event",
".",
"modifiers",
"(",
")",
"==",
"QtCore",
".",
"Qt",
".",
"ControlModifier",
... | Moves the slide forward when clicked.
:param event | <QtCore.QMouseEvent> | [
"Moves",
"the",
"slide",
"forward",
"when",
"clicked",
".",
":",
"param",
"event",
"|",
"<QtCore",
".",
"QMouseEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py#L258-L270 | train | Moves the slide back when clicked. |
bitesofcode/projexui | projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py | XWalkthroughWidget.showEvent | def showEvent(self, event):
"""
Raises this widget when it is shown.
:param event | <QtCore.QShowEvent>
"""
super(XWalkthroughWidget, self).showEvent(event)
self.autoLayout()
self.restart()
self.setFocus()
self.rai... | python | def showEvent(self, event):
"""
Raises this widget when it is shown.
:param event | <QtCore.QShowEvent>
"""
super(XWalkthroughWidget, self).showEvent(event)
self.autoLayout()
self.restart()
self.setFocus()
self.rai... | [
"def",
"showEvent",
"(",
"self",
",",
"event",
")",
":",
"super",
"(",
"XWalkthroughWidget",
",",
"self",
")",
".",
"showEvent",
"(",
"event",
")",
"self",
".",
"autoLayout",
"(",
")",
"self",
".",
"restart",
"(",
")",
"self",
".",
"setFocus",
"(",
"... | Raises this widget when it is shown.
:param event | <QtCore.QShowEvent> | [
"Raises",
"this",
"widget",
"when",
"it",
"is",
"shown",
".",
":",
"param",
"event",
"|",
"<QtCore",
".",
"QShowEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xwalkthroughwidget/xwalkthroughwidget.py#L272-L283 | train | Called by Qt when the user hits the show event. |
FNNDSC/pfurl | docker-entrypoint.py | http_construct | def http_construct(args, unknown):
"""
Construct the --http <arg> from the args/unknown space -- relevant only for 'purl'.
:param args:
:param unknown:
:return:
"""
str_http = ''
b_httpSpecd = False
if '--http' in unknown:
try:
str_httpArg = unknown[unknown.... | python | def http_construct(args, unknown):
"""
Construct the --http <arg> from the args/unknown space -- relevant only for 'purl'.
:param args:
:param unknown:
:return:
"""
str_http = ''
b_httpSpecd = False
if '--http' in unknown:
try:
str_httpArg = unknown[unknown.... | [
"def",
"http_construct",
"(",
"args",
",",
"unknown",
")",
":",
"str_http",
"=",
"''",
"b_httpSpecd",
"=",
"False",
"if",
"'--http'",
"in",
"unknown",
":",
"try",
":",
"str_httpArg",
"=",
"unknown",
"[",
"unknown",
".",
"index",
"(",
"'--http'",
")",
"+"... | Construct the --http <arg> from the args/unknown space -- relevant only for 'purl'.
:param args:
:param unknown:
:return: | [
"Construct",
"the",
"--",
"http",
"<arg",
">",
"from",
"the",
"args",
"/",
"unknown",
"space",
"--",
"relevant",
"only",
"for",
"purl",
"."
] | 572f634ab582b7b7b7a3fbfd5bf12aadc1ba7958 | https://github.com/FNNDSC/pfurl/blob/572f634ab582b7b7b7a3fbfd5bf12aadc1ba7958/docker-entrypoint.py#L30-L66 | train | Construct the HTTP command from the args and unknown space. |
fitnr/buoyant | buoyant/buoy.py | parse_unit | def parse_unit(prop, dictionary, dt=None):
'''Do a fuzzy match for `prop` in the dictionary, taking into account unit suffix.'''
# add the observation's time
try:
dt = timezone.parse_datetime(dictionary.get('date_time'))
except TypeError:
dt = None
# 'prop' is a stub of the property... | python | def parse_unit(prop, dictionary, dt=None):
'''Do a fuzzy match for `prop` in the dictionary, taking into account unit suffix.'''
# add the observation's time
try:
dt = timezone.parse_datetime(dictionary.get('date_time'))
except TypeError:
dt = None
# 'prop' is a stub of the property... | [
"def",
"parse_unit",
"(",
"prop",
",",
"dictionary",
",",
"dt",
"=",
"None",
")",
":",
"# add the observation's time",
"try",
":",
"dt",
"=",
"timezone",
".",
"parse_datetime",
"(",
"dictionary",
".",
"get",
"(",
"'date_time'",
")",
")",
"except",
"TypeError... | Do a fuzzy match for `prop` in the dictionary, taking into account unit suffix. | [
"Do",
"a",
"fuzzy",
"match",
"for",
"prop",
"in",
"the",
"dictionary",
"taking",
"into",
"account",
"unit",
"suffix",
"."
] | ef7a74f9ebd4774629508ccf2c9abb43aa0235c9 | https://github.com/fitnr/buoyant/blob/ef7a74f9ebd4774629508ccf2c9abb43aa0235c9/buoyant/buoy.py#L37-L70 | train | Do a fuzzy match for prop in the dictionary taking into account unit suffix. |
bitesofcode/projexui | projexui/widgets/xorbquerywidget/xorbquerywidget.py | XOrbQueryWidget.addContainer | def addContainer(self, query):
"""
Creates a new query container widget object and slides it into
the frame.
:return <XOrbQueryContainer>
"""
self.setUpdatesEnabled(False)
self.blockSignals(True)
container = XOrbQueryContainer(self)
... | python | def addContainer(self, query):
"""
Creates a new query container widget object and slides it into
the frame.
:return <XOrbQueryContainer>
"""
self.setUpdatesEnabled(False)
self.blockSignals(True)
container = XOrbQueryContainer(self)
... | [
"def",
"addContainer",
"(",
"self",
",",
"query",
")",
":",
"self",
".",
"setUpdatesEnabled",
"(",
"False",
")",
"self",
".",
"blockSignals",
"(",
"True",
")",
"container",
"=",
"XOrbQueryContainer",
"(",
"self",
")",
"# setup properties\r",
"container",
".",
... | Creates a new query container widget object and slides it into
the frame.
:return <XOrbQueryContainer> | [
"Creates",
"a",
"new",
"query",
"container",
"widget",
"object",
"and",
"slides",
"it",
"into",
"the",
"frame",
".",
":",
"return",
"<XOrbQueryContainer",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbquerywidget/xorbquerywidget.py#L51-L76 | train | Creates a new query container object and slides it into the next frame. Returns the newly created container object. |
bitesofcode/projexui | projexui/widgets/xorbquerywidget/xorbquerywidget.py | XOrbQueryWidget.clear | def clear(self):
"""
Clears all the container for this query widget.
"""
for i in range(self.count()):
widget = self.widget(i)
if widget is not None:
widget.close()
widget.setParent(None)
widget.deleteLater(... | python | def clear(self):
"""
Clears all the container for this query widget.
"""
for i in range(self.count()):
widget = self.widget(i)
if widget is not None:
widget.close()
widget.setParent(None)
widget.deleteLater(... | [
"def",
"clear",
"(",
"self",
")",
":",
"for",
"i",
"in",
"range",
"(",
"self",
".",
"count",
"(",
")",
")",
":",
"widget",
"=",
"self",
".",
"widget",
"(",
"i",
")",
"if",
"widget",
"is",
"not",
"None",
":",
"widget",
".",
"close",
"(",
")",
... | Clears all the container for this query widget. | [
"Clears",
"all",
"the",
"container",
"for",
"this",
"query",
"widget",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbquerywidget/xorbquerywidget.py#L78-L87 | train | Clears all the container for this query. |
bitesofcode/projexui | projexui/widgets/xorbquerywidget/xorbquerywidget.py | XOrbQueryWidget.cleanupContainers | def cleanupContainers(self):
"""
Cleans up all containers to the right of the current one.
"""
for i in range(self.count() - 1, self.currentIndex(), -1):
widget = self.widget(i)
widget.close()
widget.setParent(None)
widget.deleteLat... | python | def cleanupContainers(self):
"""
Cleans up all containers to the right of the current one.
"""
for i in range(self.count() - 1, self.currentIndex(), -1):
widget = self.widget(i)
widget.close()
widget.setParent(None)
widget.deleteLat... | [
"def",
"cleanupContainers",
"(",
"self",
")",
":",
"for",
"i",
"in",
"range",
"(",
"self",
".",
"count",
"(",
")",
"-",
"1",
",",
"self",
".",
"currentIndex",
"(",
")",
",",
"-",
"1",
")",
":",
"widget",
"=",
"self",
".",
"widget",
"(",
"i",
")... | Cleans up all containers to the right of the current one. | [
"Cleans",
"up",
"all",
"containers",
"to",
"the",
"right",
"of",
"the",
"current",
"one",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbquerywidget/xorbquerywidget.py#L89-L97 | train | Cleans up all containers to the right of the current one. |
bitesofcode/projexui | projexui/widgets/xorbquerywidget/xorbquerywidget.py | XOrbQueryWidget.containerFor | def containerFor(self, entry):
"""
Returns a container for the inputed entry widget.
:param entry | <XOrbQueryEntryWidget>
:return <XOrbQueryContainer> || None
"""
try:
index = self._compoundStack.index(entry)
excep... | python | def containerFor(self, entry):
"""
Returns a container for the inputed entry widget.
:param entry | <XOrbQueryEntryWidget>
:return <XOrbQueryContainer> || None
"""
try:
index = self._compoundStack.index(entry)
excep... | [
"def",
"containerFor",
"(",
"self",
",",
"entry",
")",
":",
"try",
":",
"index",
"=",
"self",
".",
"_compoundStack",
".",
"index",
"(",
"entry",
")",
"except",
"ValueError",
":",
"return",
"None",
"return",
"self",
".",
"widget",
"(",
"index",
"+",
"1"... | Returns a container for the inputed entry widget.
:param entry | <XOrbQueryEntryWidget>
:return <XOrbQueryContainer> || None | [
"Returns",
"a",
"container",
"for",
"the",
"inputed",
"entry",
"widget",
".",
":",
"param",
"entry",
"|",
"<XOrbQueryEntryWidget",
">",
":",
"return",
"<XOrbQueryContainer",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbquerywidget/xorbquerywidget.py#L99-L112 | train | Returns a container for the inputed entry. |
bitesofcode/projexui | projexui/widgets/xorbquerywidget/xorbquerywidget.py | XOrbQueryWidget.enterContainer | def enterContainer(self, entry, query):
"""
Enters a new container for the given entry widget.
:param entry | <XOrbQueryEntryWidget> || None
"""
self._compoundStack.append(entry)
self.addContainer(query) | python | def enterContainer(self, entry, query):
"""
Enters a new container for the given entry widget.
:param entry | <XOrbQueryEntryWidget> || None
"""
self._compoundStack.append(entry)
self.addContainer(query) | [
"def",
"enterContainer",
"(",
"self",
",",
"entry",
",",
"query",
")",
":",
"self",
".",
"_compoundStack",
".",
"append",
"(",
"entry",
")",
"self",
".",
"addContainer",
"(",
"query",
")"
] | Enters a new container for the given entry widget.
:param entry | <XOrbQueryEntryWidget> || None | [
"Enters",
"a",
"new",
"container",
"for",
"the",
"given",
"entry",
"widget",
".",
":",
"param",
"entry",
"|",
"<XOrbQueryEntryWidget",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbquerywidget/xorbquerywidget.py#L134-L141 | train | Adds a new container for the given entry widget. |
bitesofcode/projexui | projexui/widgets/xorbquerywidget/xorbquerywidget.py | XOrbQueryWidget.exitContainer | def exitContainer(self):
"""
Removes the current query container.
"""
try:
entry = self._compoundStack.pop()
except IndexError:
return
container = self.currentContainer()
entry.setQuery(container.query())
... | python | def exitContainer(self):
"""
Removes the current query container.
"""
try:
entry = self._compoundStack.pop()
except IndexError:
return
container = self.currentContainer()
entry.setQuery(container.query())
... | [
"def",
"exitContainer",
"(",
"self",
")",
":",
"try",
":",
"entry",
"=",
"self",
".",
"_compoundStack",
".",
"pop",
"(",
")",
"except",
"IndexError",
":",
"return",
"container",
"=",
"self",
".",
"currentContainer",
"(",
")",
"entry",
".",
"setQuery",
"(... | Removes the current query container. | [
"Removes",
"the",
"current",
"query",
"container",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbquerywidget/xorbquerywidget.py#L143-L155 | train | Removes the current query container from the compound stack. |
bitesofcode/projexui | projexui/widgets/xorbquerywidget/xorbquerywidget.py | XOrbQueryWidget.query | def query(self):
"""
Returns the full query for this widget. This will reflect the complete
combined query for all containers within this widget.
:return <orb.Query>
"""
if self._loadQuery is not None:
return self._loadQuery
... | python | def query(self):
"""
Returns the full query for this widget. This will reflect the complete
combined query for all containers within this widget.
:return <orb.Query>
"""
if self._loadQuery is not None:
return self._loadQuery
... | [
"def",
"query",
"(",
"self",
")",
":",
"if",
"self",
".",
"_loadQuery",
"is",
"not",
"None",
":",
"return",
"self",
".",
"_loadQuery",
"container",
"=",
"self",
".",
"widget",
"(",
"0",
")",
"if",
"container",
":",
"query",
"=",
"container",
".",
"qu... | Returns the full query for this widget. This will reflect the complete
combined query for all containers within this widget.
:return <orb.Query> | [
"Returns",
"the",
"full",
"query",
"for",
"this",
"widget",
".",
"This",
"will",
"reflect",
"the",
"complete",
"combined",
"query",
"for",
"all",
"containers",
"within",
"this",
"widget",
".",
":",
"return",
"<orb",
".",
"Query",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbquerywidget/xorbquerywidget.py#L157-L173 | train | Returns the full query for all containers within this widget. |
bitesofcode/projexui | projexui/widgets/xorbquerywidget/xorbquerywidget.py | XOrbQueryWidget.setCurrentQuery | def setCurrentQuery(self, query):
"""
Sets the query for the current container widget. This will only change
the active container, not parent containers. You should use the
setQuery method to completely assign a query to this widget.
:param query | <orb.Quer... | python | def setCurrentQuery(self, query):
"""
Sets the query for the current container widget. This will only change
the active container, not parent containers. You should use the
setQuery method to completely assign a query to this widget.
:param query | <orb.Quer... | [
"def",
"setCurrentQuery",
"(",
"self",
",",
"query",
")",
":",
"container",
"=",
"self",
".",
"currentContainer",
"(",
")",
"if",
"container",
":",
"container",
".",
"setQuery",
"(",
"query",
")"
] | Sets the query for the current container widget. This will only change
the active container, not parent containers. You should use the
setQuery method to completely assign a query to this widget.
:param query | <orb.Query> | [
"Sets",
"the",
"query",
"for",
"the",
"current",
"container",
"widget",
".",
"This",
"will",
"only",
"change",
"the",
"active",
"container",
"not",
"parent",
"containers",
".",
"You",
"should",
"use",
"the",
"setQuery",
"method",
"to",
"completely",
"assign",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbquerywidget/xorbquerywidget.py#L191-L201 | train | Sets the query for the current container widget. |
bitesofcode/projexui | projexui/widgets/xorbquerywidget/xorbquerywidget.py | XOrbQueryWidget.setQuery | def setQuery(self, query):
"""
Sets the query for this widget to the inputed query. This will clear
completely the current inforamation and reest all containers to the
inputed query information.
:param query | <orb.Query>
"""
if not self.isV... | python | def setQuery(self, query):
"""
Sets the query for this widget to the inputed query. This will clear
completely the current inforamation and reest all containers to the
inputed query information.
:param query | <orb.Query>
"""
if not self.isV... | [
"def",
"setQuery",
"(",
"self",
",",
"query",
")",
":",
"if",
"not",
"self",
".",
"isVisible",
"(",
")",
":",
"self",
".",
"_loadQuery",
"=",
"query",
"else",
":",
"self",
".",
"_loadQuery",
"=",
"None",
"if",
"self",
".",
"_initialized",
"and",
"has... | Sets the query for this widget to the inputed query. This will clear
completely the current inforamation and reest all containers to the
inputed query information.
:param query | <orb.Query> | [
"Sets",
"the",
"query",
"for",
"this",
"widget",
"to",
"the",
"inputed",
"query",
".",
"This",
"will",
"clear",
"completely",
"the",
"current",
"inforamation",
"and",
"reest",
"all",
"containers",
"to",
"the",
"inputed",
"query",
"information",
".",
":",
"pa... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbquerywidget/xorbquerywidget.py#L203-L221 | train | Sets the query for this widget to the inputed query. |
bitesofcode/projexui | projexui/widgets/xorbquerywidget/xorbquerywidget.py | XOrbQueryWidget.setTableType | def setTableType(self, tableType):
"""
Sets the table type for this instance to the given type.
:param tableType | <orb.Table>
"""
if tableType == self._tableType:
return
self._initialized = False
self._tableType = tabl... | python | def setTableType(self, tableType):
"""
Sets the table type for this instance to the given type.
:param tableType | <orb.Table>
"""
if tableType == self._tableType:
return
self._initialized = False
self._tableType = tabl... | [
"def",
"setTableType",
"(",
"self",
",",
"tableType",
")",
":",
"if",
"tableType",
"==",
"self",
".",
"_tableType",
":",
"return",
"self",
".",
"_initialized",
"=",
"False",
"self",
".",
"_tableType",
"=",
"tableType",
"self",
".",
"setQuery",
"(",
"Query"... | Sets the table type for this instance to the given type.
:param tableType | <orb.Table> | [
"Sets",
"the",
"table",
"type",
"for",
"this",
"instance",
"to",
"the",
"given",
"type",
".",
":",
"param",
"tableType",
"|",
"<orb",
".",
"Table",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbquerywidget/xorbquerywidget.py#L257-L268 | train | Sets the table type for this instance to the given type. |
bitesofcode/projexui | projexui/widgets/xorbrecordedit.py | XOrbRecordEdit.rebuild | def rebuild( self ):
"""
Rebuilds the interface for this widget based on the current model.
"""
self.setUpdatesEnabled(False)
self.blockSignals(True)
# clear out all the subwidgets for this widget
for child in self.findChildren(QObject):
... | python | def rebuild( self ):
"""
Rebuilds the interface for this widget based on the current model.
"""
self.setUpdatesEnabled(False)
self.blockSignals(True)
# clear out all the subwidgets for this widget
for child in self.findChildren(QObject):
... | [
"def",
"rebuild",
"(",
"self",
")",
":",
"self",
".",
"setUpdatesEnabled",
"(",
"False",
")",
"self",
".",
"blockSignals",
"(",
"True",
")",
"# clear out all the subwidgets for this widget\r",
"for",
"child",
"in",
"self",
".",
"findChildren",
"(",
"QObject",
")... | Rebuilds the interface for this widget based on the current model. | [
"Rebuilds",
"the",
"interface",
"for",
"this",
"widget",
"based",
"on",
"the",
"current",
"model",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordedit.py#L78-L146 | train | Rebuilds the interface for this widget based on the current model. |
bitesofcode/projexui | projexui/widgets/xorbrecordedit.py | XOrbRecordEdit.save | def save( self ):
"""
Saves the values from the editor to the system.
"""
schema = self.schema()
if ( not schema ):
self.saved.emit()
return
record = self.record()
if not record:
record = self._model()
... | python | def save( self ):
"""
Saves the values from the editor to the system.
"""
schema = self.schema()
if ( not schema ):
self.saved.emit()
return
record = self.record()
if not record:
record = self._model()
... | [
"def",
"save",
"(",
"self",
")",
":",
"schema",
"=",
"self",
".",
"schema",
"(",
")",
"if",
"(",
"not",
"schema",
")",
":",
"self",
".",
"saved",
".",
"emit",
"(",
")",
"return",
"record",
"=",
"self",
".",
"record",
"(",
")",
"if",
"not",
"rec... | Saves the values from the editor to the system. | [
"Saves",
"the",
"values",
"from",
"the",
"editor",
"to",
"the",
"system",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordedit.py#L149-L210 | train | Saves the values from the editor to the system. |
bitesofcode/projexui | projexui/widgets/xorbrecordedit.py | XOrbRecordEdit.setRecord | def setRecord( self, record ):
"""
Sets the record instance for this widget to the inputed record.
:param record | <orb.Table>
"""
self._record = record
if ( not record ):
return
self.setModel(record.__class__... | python | def setRecord( self, record ):
"""
Sets the record instance for this widget to the inputed record.
:param record | <orb.Table>
"""
self._record = record
if ( not record ):
return
self.setModel(record.__class__... | [
"def",
"setRecord",
"(",
"self",
",",
"record",
")",
":",
"self",
".",
"_record",
"=",
"record",
"if",
"(",
"not",
"record",
")",
":",
"return",
"self",
".",
"setModel",
"(",
"record",
".",
"__class__",
")",
"schema",
"=",
"self",
".",
"model",
"(",
... | Sets the record instance for this widget to the inputed record.
:param record | <orb.Table> | [
"Sets",
"the",
"record",
"instance",
"for",
"this",
"widget",
"to",
"the",
"inputed",
"record",
".",
":",
"param",
"record",
"|",
"<orb",
".",
"Table",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordedit.py#L222-L248 | train | Sets the record instance for this widget to the inputed record. |
bitesofcode/projexui | projexui/widgets/xorbrecordedit.py | XOrbRecordEdit.setModel | def setModel( self, model ):
"""
Defines the model that is going to be used to define the interface for
this widget.
:param model | <subclass of orb.Table>
"""
if model == self._model:
return False
self._model = mod... | python | def setModel( self, model ):
"""
Defines the model that is going to be used to define the interface for
this widget.
:param model | <subclass of orb.Table>
"""
if model == self._model:
return False
self._model = mod... | [
"def",
"setModel",
"(",
"self",
",",
"model",
")",
":",
"if",
"model",
"==",
"self",
".",
"_model",
":",
"return",
"False",
"self",
".",
"_model",
"=",
"model",
"if",
"not",
"self",
".",
"_record",
"and",
"model",
":",
"self",
".",
"_record",
"=",
... | Defines the model that is going to be used to define the interface for
this widget.
:param model | <subclass of orb.Table> | [
"Defines",
"the",
"model",
"that",
"is",
"going",
"to",
"be",
"used",
"to",
"define",
"the",
"interface",
"for",
"this",
"widget",
".",
":",
"param",
"model",
"|",
"<subclass",
"of",
"orb",
".",
"Table",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordedit.py#L250-L272 | train | Sets the model that this widget is going to be used to define the interface for this model. |
bitesofcode/projexui | projexui/widgets/xorbrecordedit.py | XOrbRecordEdit.edit | def edit( cls, record, parent = None, uifile = '', commit = True ):
"""
Prompts the user to edit the inputed record.
:param record | <orb.Table>
parent | <QWidget>
:return <bool> | accepted
"""
# create the dialog
... | python | def edit( cls, record, parent = None, uifile = '', commit = True ):
"""
Prompts the user to edit the inputed record.
:param record | <orb.Table>
parent | <QWidget>
:return <bool> | accepted
"""
# create the dialog
... | [
"def",
"edit",
"(",
"cls",
",",
"record",
",",
"parent",
"=",
"None",
",",
"uifile",
"=",
"''",
",",
"commit",
"=",
"True",
")",
":",
"# create the dialog\r",
"dlg",
"=",
"QDialog",
"(",
"parent",
")",
"dlg",
".",
"setWindowTitle",
"(",
"'Edit %s'",
"%... | Prompts the user to edit the inputed record.
:param record | <orb.Table>
parent | <QWidget>
:return <bool> | accepted | [
"Prompts",
"the",
"user",
"to",
"edit",
"the",
"inputed",
"record",
".",
":",
"param",
"record",
"|",
"<orb",
".",
"Table",
">",
"parent",
"|",
"<QWidget",
">",
":",
"return",
"<bool",
">",
"|",
"accepted"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordedit.py#L291-L341 | train | Prompts the user to edit the inputed record. |
bitesofcode/projexui | projexui/widgets/xorbrecordedit.py | XOrbRecordEdit.create | def create( cls, model, parent = None, uifile = '', commit = True ):
"""
Prompts the user to create a new record for the inputed table.
:param model | <subclass of orb.Table>
parent | <QWidget>
:return <orb.Table> || None/ | instan... | python | def create( cls, model, parent = None, uifile = '', commit = True ):
"""
Prompts the user to create a new record for the inputed table.
:param model | <subclass of orb.Table>
parent | <QWidget>
:return <orb.Table> || None/ | instan... | [
"def",
"create",
"(",
"cls",
",",
"model",
",",
"parent",
"=",
"None",
",",
"uifile",
"=",
"''",
",",
"commit",
"=",
"True",
")",
":",
"# create the dialog\r",
"dlg",
"=",
"QDialog",
"(",
"parent",
")",
"dlg",
".",
"setWindowTitle",
"(",
"'Create %s'",
... | Prompts the user to create a new record for the inputed table.
:param model | <subclass of orb.Table>
parent | <QWidget>
:return <orb.Table> || None/ | instance of the inputed table class | [
"Prompts",
"the",
"user",
"to",
"create",
"a",
"new",
"record",
"for",
"the",
"inputed",
"table",
".",
":",
"param",
"model",
"|",
"<subclass",
"of",
"orb",
".",
"Table",
">",
"parent",
"|",
"<QWidget",
">",
":",
"return",
"<orb",
".",
"Table",
">",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbrecordedit.py#L344-L389 | train | Create a new record for the inputed table. |
bitesofcode/projexui | projexui/widgets/xpushbutton.py | XPushButton.eventFilter | def eventFilter(self, object, event):
"""
Ignore all events for the text label.
:param object | <QObject>
event | <QEvent>
"""
if object == self._richTextLabel:
if event.type() in (event.MouseButtonPress,
... | python | def eventFilter(self, object, event):
"""
Ignore all events for the text label.
:param object | <QObject>
event | <QEvent>
"""
if object == self._richTextLabel:
if event.type() in (event.MouseButtonPress,
... | [
"def",
"eventFilter",
"(",
"self",
",",
"object",
",",
"event",
")",
":",
"if",
"object",
"==",
"self",
".",
"_richTextLabel",
":",
"if",
"event",
".",
"type",
"(",
")",
"in",
"(",
"event",
".",
"MouseButtonPress",
",",
"event",
".",
"MouseMove",
",",
... | Ignore all events for the text label.
:param object | <QObject>
event | <QEvent> | [
"Ignore",
"all",
"events",
"for",
"the",
"text",
"label",
".",
":",
"param",
"object",
"|",
"<QObject",
">",
"event",
"|",
"<QEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpushbutton.py#L32-L46 | train | Returns True if event should be ignored. |
bitesofcode/projexui | projexui/widgets/xpushbutton.py | XPushButton.resizeEvent | def resizeEvent(self, event):
"""
Overloads the resize event to auto-resize the rich text label to the
size of this QPushButton.
:param event | <QResizeEvent>
"""
super(XPushButton, self).resizeEvent(event)
if self._richTextLabel:
... | python | def resizeEvent(self, event):
"""
Overloads the resize event to auto-resize the rich text label to the
size of this QPushButton.
:param event | <QResizeEvent>
"""
super(XPushButton, self).resizeEvent(event)
if self._richTextLabel:
... | [
"def",
"resizeEvent",
"(",
"self",
",",
"event",
")",
":",
"super",
"(",
"XPushButton",
",",
"self",
")",
".",
"resizeEvent",
"(",
"event",
")",
"if",
"self",
".",
"_richTextLabel",
":",
"self",
".",
"_richTextLabel",
".",
"resize",
"(",
"event",
".",
... | Overloads the resize event to auto-resize the rich text label to the
size of this QPushButton.
:param event | <QResizeEvent> | [
"Overloads",
"the",
"resize",
"event",
"to",
"auto",
"-",
"resize",
"the",
"rich",
"text",
"label",
"to",
"the",
"size",
"of",
"this",
"QPushButton",
".",
":",
"param",
"event",
"|",
"<QResizeEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpushbutton.py#L48-L58 | train | Overloads the resize event to auto - resize the rich text label. |
bitesofcode/projexui | projexui/widgets/xpushbutton.py | XPushButton.richTextLabel | def richTextLabel(self):
"""
Returns the label that is used for drawing the rich text to this button.
:return <QLabel>
"""
if not self._richTextLabel:
self._richTextLabel = QLabel(self)
self._richTextLabel.installEventFilter(self)
... | python | def richTextLabel(self):
"""
Returns the label that is used for drawing the rich text to this button.
:return <QLabel>
"""
if not self._richTextLabel:
self._richTextLabel = QLabel(self)
self._richTextLabel.installEventFilter(self)
... | [
"def",
"richTextLabel",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"_richTextLabel",
":",
"self",
".",
"_richTextLabel",
"=",
"QLabel",
"(",
"self",
")",
"self",
".",
"_richTextLabel",
".",
"installEventFilter",
"(",
"self",
")",
"self",
".",
"_richT... | Returns the label that is used for drawing the rich text to this button.
:return <QLabel> | [
"Returns",
"the",
"label",
"that",
"is",
"used",
"for",
"drawing",
"the",
"rich",
"text",
"to",
"this",
"button",
".",
":",
"return",
"<QLabel",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpushbutton.py#L60-L70 | train | Returns the label that is used for drawing the rich text to this button. |
bitesofcode/projexui | projexui/widgets/xpushbutton.py | XPushButton.setShowRichText | def setShowRichText(self, state):
"""
Sets whether or not to display rich text for this button.
:param state | <bool>
"""
self._showRichText = state
text = self.text()
if state:
label = self.richTextLabel()
... | python | def setShowRichText(self, state):
"""
Sets whether or not to display rich text for this button.
:param state | <bool>
"""
self._showRichText = state
text = self.text()
if state:
label = self.richTextLabel()
... | [
"def",
"setShowRichText",
"(",
"self",
",",
"state",
")",
":",
"self",
".",
"_showRichText",
"=",
"state",
"text",
"=",
"self",
".",
"text",
"(",
")",
"if",
"state",
":",
"label",
"=",
"self",
".",
"richTextLabel",
"(",
")",
"label",
".",
"setText",
... | Sets whether or not to display rich text for this button.
:param state | <bool> | [
"Sets",
"whether",
"or",
"not",
"to",
"display",
"rich",
"text",
"for",
"this",
"button",
".",
":",
"param",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpushbutton.py#L72-L90 | train | Sets whether or not to display rich text for this button. |
bitesofcode/projexui | projexui/widgets/xpushbutton.py | XPushButton.setText | def setText(self, text):
"""
Sets the text for this button. If it is set to show rich text, then
it will update the label text, leaving the root button text blank,
otherwise it will update the button.
:param text | <str>
"""
self._text = na... | python | def setText(self, text):
"""
Sets the text for this button. If it is set to show rich text, then
it will update the label text, leaving the root button text blank,
otherwise it will update the button.
:param text | <str>
"""
self._text = na... | [
"def",
"setText",
"(",
"self",
",",
"text",
")",
":",
"self",
".",
"_text",
"=",
"nativestring",
"(",
"text",
")",
"if",
"self",
".",
"showRichText",
"(",
")",
":",
"self",
".",
"richTextLabel",
"(",
")",
".",
"setText",
"(",
"text",
")",
"else",
"... | Sets the text for this button. If it is set to show rich text, then
it will update the label text, leaving the root button text blank,
otherwise it will update the button.
:param text | <str> | [
"Sets",
"the",
"text",
"for",
"this",
"button",
".",
"If",
"it",
"is",
"set",
"to",
"show",
"rich",
"text",
"then",
"it",
"will",
"update",
"the",
"label",
"text",
"leaving",
"the",
"root",
"button",
"text",
"blank",
"otherwise",
"it",
"will",
"update",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpushbutton.py#L92-L104 | train | Sets the text for this button. |
bitesofcode/projexui | projexui/widgets/xlogrecordwidget/xlogrecordwidget.py | XLogRecordWidget.addLogger | def addLogger(self, logger, level=logging.INFO):
"""
Adds the inputed logger to the list of loggers that are being tracked
with this widget.
:param logger | <logging.Logger> || <str>
level | <logging.LEVEL>
"""
if isinstance(logg... | python | def addLogger(self, logger, level=logging.INFO):
"""
Adds the inputed logger to the list of loggers that are being tracked
with this widget.
:param logger | <logging.Logger> || <str>
level | <logging.LEVEL>
"""
if isinstance(logg... | [
"def",
"addLogger",
"(",
"self",
",",
"logger",
",",
"level",
"=",
"logging",
".",
"INFO",
")",
":",
"if",
"isinstance",
"(",
"logger",
",",
"logging",
".",
"Logger",
")",
":",
"logger",
"=",
"logger",
".",
"name",
"if",
"logger",
"in",
"self",
".",
... | Adds the inputed logger to the list of loggers that are being tracked
with this widget.
:param logger | <logging.Logger> || <str>
level | <logging.LEVEL> | [
"Adds",
"the",
"inputed",
"logger",
"to",
"the",
"list",
"of",
"loggers",
"that",
"are",
"being",
"tracked",
"with",
"this",
"widget",
".",
":",
"param",
"logger",
"|",
"<logging",
".",
"Logger",
">",
"||",
"<str",
">",
"level",
"|",
"<logging",
".",
"... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlogrecordwidget/xlogrecordwidget.py#L137-L160 | train | Adds the inputed logger to the list of loggers that are being tracked
with this widget. |
bitesofcode/projexui | projexui/widgets/xlogrecordwidget/xlogrecordwidget.py | XLogRecordWidget.addRecord | def addRecord(self, record):
"""
Adds the inputed record to this logger tree widget.
:param record | <logging.LogRecord>
"""
if self._destroyed:
return
if not self.uiRecordBTN.isChecked():
return
... | python | def addRecord(self, record):
"""
Adds the inputed record to this logger tree widget.
:param record | <logging.LogRecord>
"""
if self._destroyed:
return
if not self.uiRecordBTN.isChecked():
return
... | [
"def",
"addRecord",
"(",
"self",
",",
"record",
")",
":",
"if",
"self",
".",
"_destroyed",
":",
"return",
"if",
"not",
"self",
".",
"uiRecordBTN",
".",
"isChecked",
"(",
")",
":",
"return",
"self",
".",
"_queue",
".",
"append",
"(",
"record",
")"
] | Adds the inputed record to this logger tree widget.
:param record | <logging.LogRecord> | [
"Adds",
"the",
"inputed",
"record",
"to",
"this",
"logger",
"tree",
"widget",
".",
":",
"param",
"record",
"|",
"<logging",
".",
"LogRecord",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlogrecordwidget/xlogrecordwidget.py#L162-L174 | train | Adds the inputed record to the internal list of log records. |
bitesofcode/projexui | projexui/widgets/xlogrecordwidget/xlogrecordwidget.py | XLogRecordWidget.clearLoggers | def clearLoggers(self, logger):
"""
Removes the inputed logger from the set for this widget.
:param logger | <str> || <logging.Logger>
"""
for logger in self._loggers:
if logger == 'root':
logger = logging.getLogger()
... | python | def clearLoggers(self, logger):
"""
Removes the inputed logger from the set for this widget.
:param logger | <str> || <logging.Logger>
"""
for logger in self._loggers:
if logger == 'root':
logger = logging.getLogger()
... | [
"def",
"clearLoggers",
"(",
"self",
",",
"logger",
")",
":",
"for",
"logger",
"in",
"self",
".",
"_loggers",
":",
"if",
"logger",
"==",
"'root'",
":",
"logger",
"=",
"logging",
".",
"getLogger",
"(",
")",
"else",
":",
"logger",
"=",
"logging",
".",
"... | Removes the inputed logger from the set for this widget.
:param logger | <str> || <logging.Logger> | [
"Removes",
"the",
"inputed",
"logger",
"from",
"the",
"set",
"for",
"this",
"widget",
".",
":",
"param",
"logger",
"|",
"<str",
">",
"||",
"<logging",
".",
"Logger",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlogrecordwidget/xlogrecordwidget.py#L195-L208 | train | Removes the inputed logger from the set for this widget. |
bitesofcode/projexui | projexui/widgets/xlogrecordwidget/xlogrecordwidget.py | XLogRecordWidget.hasLogger | def hasLogger(self, logger):
"""
Returns whether or not the inputed logger is tracked by this widget.
:param logger | <str> || <logging.Logger>
"""
if isinstance(logger, logging.Logger):
logger = logging.name
return logger in se... | python | def hasLogger(self, logger):
"""
Returns whether or not the inputed logger is tracked by this widget.
:param logger | <str> || <logging.Logger>
"""
if isinstance(logger, logging.Logger):
logger = logging.name
return logger in se... | [
"def",
"hasLogger",
"(",
"self",
",",
"logger",
")",
":",
"if",
"isinstance",
"(",
"logger",
",",
"logging",
".",
"Logger",
")",
":",
"logger",
"=",
"logging",
".",
"name",
"return",
"logger",
"in",
"self",
".",
"_loggers"
] | Returns whether or not the inputed logger is tracked by this widget.
:param logger | <str> || <logging.Logger> | [
"Returns",
"whether",
"or",
"not",
"the",
"inputed",
"logger",
"is",
"tracked",
"by",
"this",
"widget",
".",
":",
"param",
"logger",
"|",
"<str",
">",
"||",
"<logging",
".",
"Logger",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlogrecordwidget/xlogrecordwidget.py#L218-L227 | train | Returns whether or not the given logger is tracked by this widget. |
bitesofcode/projexui | projexui/widgets/xlogrecordwidget/xlogrecordwidget.py | XLogRecordWidget.removeLogger | def removeLogger(self, logger):
"""
Removes the inputed logger from the set for this widget.
:param logger | <str> || <logging.Logger>
"""
if isinstance(logger, logging.Logger):
logger = logger.name
if logger in self._loggers:
... | python | def removeLogger(self, logger):
"""
Removes the inputed logger from the set for this widget.
:param logger | <str> || <logging.Logger>
"""
if isinstance(logger, logging.Logger):
logger = logger.name
if logger in self._loggers:
... | [
"def",
"removeLogger",
"(",
"self",
",",
"logger",
")",
":",
"if",
"isinstance",
"(",
"logger",
",",
"logging",
".",
"Logger",
")",
":",
"logger",
"=",
"logger",
".",
"name",
"if",
"logger",
"in",
"self",
".",
"_loggers",
":",
"self",
".",
"_loggers",
... | Removes the inputed logger from the set for this widget.
:param logger | <str> || <logging.Logger> | [
"Removes",
"the",
"inputed",
"logger",
"from",
"the",
"set",
"for",
"this",
"widget",
".",
":",
"param",
"logger",
"|",
"<str",
">",
"||",
"<logging",
".",
"Logger",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlogrecordwidget/xlogrecordwidget.py#L258-L274 | train | Removes the specified logger from the set for this widget. |
bitesofcode/projexui | projexui/widgets/xlogrecordwidget/xlogrecordwidget.py | XLogRecordWidget.restoreSettings | def restoreSettings(self, settings):
"""
Restores the settings for this logger from the inputed settings.
:param <QtCore.QSettings>
"""
levels = unwrapVariant(settings.value('levels'))
if levels:
self.setActiveLevels(map(int, levels.split... | python | def restoreSettings(self, settings):
"""
Restores the settings for this logger from the inputed settings.
:param <QtCore.QSettings>
"""
levels = unwrapVariant(settings.value('levels'))
if levels:
self.setActiveLevels(map(int, levels.split... | [
"def",
"restoreSettings",
"(",
"self",
",",
"settings",
")",
":",
"levels",
"=",
"unwrapVariant",
"(",
"settings",
".",
"value",
"(",
"'levels'",
")",
")",
"if",
"levels",
":",
"self",
".",
"setActiveLevels",
"(",
"map",
"(",
"int",
",",
"levels",
".",
... | Restores the settings for this logger from the inputed settings.
:param <QtCore.QSettings> | [
"Restores",
"the",
"settings",
"for",
"this",
"logger",
"from",
"the",
"inputed",
"settings",
".",
":",
"param",
"<QtCore",
".",
"QSettings",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlogrecordwidget/xlogrecordwidget.py#L276-L296 | train | Restores the settings for this logger from the inputed settings. |
bitesofcode/projexui | projexui/widgets/xlogrecordwidget/xlogrecordwidget.py | XLogRecordWidget.restoreXml | def restoreXml(self, xml):
"""
Saves the logging settings for this widget to XML format.
:param xml | <xml.etree.ElementTree.Element>
"""
self.uiFilterTXT.setText(xml.get('filter', ''))
xlevels = xml.find('levels')
xloggerlevels = x... | python | def restoreXml(self, xml):
"""
Saves the logging settings for this widget to XML format.
:param xml | <xml.etree.ElementTree.Element>
"""
self.uiFilterTXT.setText(xml.get('filter', ''))
xlevels = xml.find('levels')
xloggerlevels = x... | [
"def",
"restoreXml",
"(",
"self",
",",
"xml",
")",
":",
"self",
".",
"uiFilterTXT",
".",
"setText",
"(",
"xml",
".",
"get",
"(",
"'filter'",
",",
"''",
")",
")",
"xlevels",
"=",
"xml",
".",
"find",
"(",
"'levels'",
")",
"xloggerlevels",
"=",
"xml",
... | Saves the logging settings for this widget to XML format.
:param xml | <xml.etree.ElementTree.Element> | [
"Saves",
"the",
"logging",
"settings",
"for",
"this",
"widget",
"to",
"XML",
"format",
".",
":",
"param",
"xml",
"|",
"<xml",
".",
"etree",
".",
"ElementTree",
".",
"Element",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlogrecordwidget/xlogrecordwidget.py#L298-L319 | train | Restores the logging settings for this widget from XML format. |
bitesofcode/projexui | projexui/widgets/xlogrecordwidget/xlogrecordwidget.py | XLogRecordWidget.saveXml | def saveXml(self, xml):
"""
Saves the logging settings for this widget to XML format.
:param xml | <xml.etree.ElementTree.Element>
"""
lvls = []
for logger, level in self.loggerLevels().items():
lvls.append('{0}:{1}'.format(logger, level)... | python | def saveXml(self, xml):
"""
Saves the logging settings for this widget to XML format.
:param xml | <xml.etree.ElementTree.Element>
"""
lvls = []
for logger, level in self.loggerLevels().items():
lvls.append('{0}:{1}'.format(logger, level)... | [
"def",
"saveXml",
"(",
"self",
",",
"xml",
")",
":",
"lvls",
"=",
"[",
"]",
"for",
"logger",
",",
"level",
"in",
"self",
".",
"loggerLevels",
"(",
")",
".",
"items",
"(",
")",
":",
"lvls",
".",
"append",
"(",
"'{0}:{1}'",
".",
"format",
"(",
"log... | Saves the logging settings for this widget to XML format.
:param xml | <xml.etree.ElementTree.Element> | [
"Saves",
"the",
"logging",
"settings",
"for",
"this",
"widget",
"to",
"XML",
"format",
".",
":",
"param",
"xml",
"|",
"<xml",
".",
"etree",
".",
"ElementTree",
".",
"Element",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlogrecordwidget/xlogrecordwidget.py#L337-L356 | train | Save the logging settings for this widget to XML format. |
bitesofcode/projexui | projexui/widgets/xlogrecordwidget/xlogrecordwidget.py | XLogRecordWidget.setActiveLevels | def setActiveLevels(self, levels):
"""
Defines the levels for this widgets visible/processed levels.
:param levels | [<int>, ..]
"""
self._activeLevels = levels
tree = self.uiRecordTREE
tree.setUpdatesEnabled(False)
tree.blockSignals... | python | def setActiveLevels(self, levels):
"""
Defines the levels for this widgets visible/processed levels.
:param levels | [<int>, ..]
"""
self._activeLevels = levels
tree = self.uiRecordTREE
tree.setUpdatesEnabled(False)
tree.blockSignals... | [
"def",
"setActiveLevels",
"(",
"self",
",",
"levels",
")",
":",
"self",
".",
"_activeLevels",
"=",
"levels",
"tree",
"=",
"self",
".",
"uiRecordTREE",
"tree",
".",
"setUpdatesEnabled",
"(",
"False",
")",
"tree",
".",
"blockSignals",
"(",
"True",
")",
"for"... | Defines the levels for this widgets visible/processed levels.
:param levels | [<int>, ..] | [
"Defines",
"the",
"levels",
"for",
"this",
"widgets",
"visible",
"/",
"processed",
"levels",
".",
":",
"param",
"levels",
"|",
"[",
"<int",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlogrecordwidget/xlogrecordwidget.py#L358-L376 | train | Sets the active levels for this widgets visible and processed levels. |
bitesofcode/projexui | projexui/widgets/xlogrecordwidget/xlogrecordwidget.py | XLogRecordWidget.setLoggerLevel | def setLoggerLevel(self, logger, level):
"""
Returns the logging level for the inputed logger.
:param logger | <logging.Logger> || <str>
level | <logging.LEVEL>
"""
if level == logging.NOTSET:
self.removeLogger(logger)
... | python | def setLoggerLevel(self, logger, level):
"""
Returns the logging level for the inputed logger.
:param logger | <logging.Logger> || <str>
level | <logging.LEVEL>
"""
if level == logging.NOTSET:
self.removeLogger(logger)
... | [
"def",
"setLoggerLevel",
"(",
"self",
",",
"logger",
",",
"level",
")",
":",
"if",
"level",
"==",
"logging",
".",
"NOTSET",
":",
"self",
".",
"removeLogger",
"(",
"logger",
")",
"self",
".",
"handler",
"(",
")",
".",
"setLoggerLevel",
"(",
"logger",
",... | Returns the logging level for the inputed logger.
:param logger | <logging.Logger> || <str>
level | <logging.LEVEL> | [
"Returns",
"the",
"logging",
"level",
"for",
"the",
"inputed",
"logger",
".",
":",
"param",
"logger",
"|",
"<logging",
".",
"Logger",
">",
"||",
"<str",
">",
"level",
"|",
"<logging",
".",
"LEVEL",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlogrecordwidget/xlogrecordwidget.py#L378-L396 | train | Sets the logging level for the inputed logger. |
bitesofcode/projexui | projexui/dialogs/xaboutdialog/xaboutdialog.py | XAboutDialog.setLogo | def setLogo( self, logo ):
"""
Sets the logo image for this dialog
:param logo | <QPixmap> || <str>
"""
if ( isinstance(logo, basestring) ):
logo = QPixmap(logo)
self.uiLogoLBL.setHidden(logo.isNull())
self.uiLogoLBL.setPixmap(lo... | python | def setLogo( self, logo ):
"""
Sets the logo image for this dialog
:param logo | <QPixmap> || <str>
"""
if ( isinstance(logo, basestring) ):
logo = QPixmap(logo)
self.uiLogoLBL.setHidden(logo.isNull())
self.uiLogoLBL.setPixmap(lo... | [
"def",
"setLogo",
"(",
"self",
",",
"logo",
")",
":",
"if",
"(",
"isinstance",
"(",
"logo",
",",
"basestring",
")",
")",
":",
"logo",
"=",
"QPixmap",
"(",
"logo",
")",
"self",
".",
"uiLogoLBL",
".",
"setHidden",
"(",
"logo",
".",
"isNull",
"(",
")"... | Sets the logo image for this dialog
:param logo | <QPixmap> || <str> | [
"Sets",
"the",
"logo",
"image",
"for",
"this",
"dialog",
":",
"param",
"logo",
"|",
"<QPixmap",
">",
"||",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/dialogs/xaboutdialog/xaboutdialog.py#L35-L45 | train | Sets the logo for this dialog. |
bitesofcode/projexui | projexui/dialogs/xaboutdialog/xaboutdialog.py | XAboutDialog.aboutModule | def aboutModule( module, parent = None, logo = '' ):
"""
Displays about information for an inputed module.
:param module | <module>
parent | <QWidget>
logo | <QPixmap> || <str>
"""
dlg = XAboutDialog( parent )
... | python | def aboutModule( module, parent = None, logo = '' ):
"""
Displays about information for an inputed module.
:param module | <module>
parent | <QWidget>
logo | <QPixmap> || <str>
"""
dlg = XAboutDialog( parent )
... | [
"def",
"aboutModule",
"(",
"module",
",",
"parent",
"=",
"None",
",",
"logo",
"=",
"''",
")",
":",
"dlg",
"=",
"XAboutDialog",
"(",
"parent",
")",
"dlg",
".",
"setLogo",
"(",
"logo",
")",
"dlg",
".",
"setInfo",
"(",
"XAboutDialog",
".",
"moduleInfo",
... | Displays about information for an inputed module.
:param module | <module>
parent | <QWidget>
logo | <QPixmap> || <str> | [
"Displays",
"about",
"information",
"for",
"an",
"inputed",
"module",
".",
":",
"param",
"module",
"|",
"<module",
">",
"parent",
"|",
"<QWidget",
">",
"logo",
"|",
"<QPixmap",
">",
"||",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/dialogs/xaboutdialog/xaboutdialog.py#L57-L70 | train | Displays information about a module. |
bitesofcode/projexui | projexui/dialogs/xaboutdialog/xaboutdialog.py | XAboutDialog.about | def about( info, parent = None, logo = '' ):
"""
Displays about information in a popup dialog.
:param info | <str>
parent | <QWidget>
logo | <QPixmap> || <str>
"""
dlg = XAboutDialog(parent)
dlg.setLogo... | python | def about( info, parent = None, logo = '' ):
"""
Displays about information in a popup dialog.
:param info | <str>
parent | <QWidget>
logo | <QPixmap> || <str>
"""
dlg = XAboutDialog(parent)
dlg.setLogo... | [
"def",
"about",
"(",
"info",
",",
"parent",
"=",
"None",
",",
"logo",
"=",
"''",
")",
":",
"dlg",
"=",
"XAboutDialog",
"(",
"parent",
")",
"dlg",
".",
"setLogo",
"(",
"logo",
")",
"dlg",
".",
"setInfo",
"(",
"info",
")",
"dlg",
".",
"exec_",
"(",... | Displays about information in a popup dialog.
:param info | <str>
parent | <QWidget>
logo | <QPixmap> || <str> | [
"Displays",
"about",
"information",
"in",
"a",
"popup",
"dialog",
".",
":",
"param",
"info",
"|",
"<str",
">",
"parent",
"|",
"<QWidget",
">",
"logo",
"|",
"<QPixmap",
">",
"||",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/dialogs/xaboutdialog/xaboutdialog.py#L73-L86 | train | Displays information in a popup dialog. |
bitesofcode/projexui | projexui/dialogs/xaboutdialog/xaboutdialog.py | XAboutDialog.moduleInfo | def moduleInfo( module ):
"""
Generates HTML information to display for the about info for a module.
:param module | <module>
"""
data = module.__dict__
html = []
html.append( '<h2>%s</h2>' % data.get('__name__', 'Unknown') )
html.a... | python | def moduleInfo( module ):
"""
Generates HTML information to display for the about info for a module.
:param module | <module>
"""
data = module.__dict__
html = []
html.append( '<h2>%s</h2>' % data.get('__name__', 'Unknown') )
html.a... | [
"def",
"moduleInfo",
"(",
"module",
")",
":",
"data",
"=",
"module",
".",
"__dict__",
"html",
"=",
"[",
"]",
"html",
".",
"append",
"(",
"'<h2>%s</h2>'",
"%",
"data",
".",
"get",
"(",
"'__name__'",
",",
"'Unknown'",
")",
")",
"html",
".",
"append",
"... | Generates HTML information to display for the about info for a module.
:param module | <module> | [
"Generates",
"HTML",
"information",
"to",
"display",
"for",
"the",
"about",
"info",
"for",
"a",
"module",
".",
":",
"param",
"module",
"|",
"<module",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/dialogs/xaboutdialog/xaboutdialog.py#L89-L129 | train | Generates the HTML information to display for the about info for a module. |
bitesofcode/projexui | projexui/widgets/xtextedit.py | XTextEdit.acceptText | def acceptText(self):
"""
Emits the editing finished signals for this widget.
"""
if not self.signalsBlocked():
self.textEntered.emit(self.toPlainText())
self.htmlEntered.emit(self.toHtml())
self.returnPressed.emit() | python | def acceptText(self):
"""
Emits the editing finished signals for this widget.
"""
if not self.signalsBlocked():
self.textEntered.emit(self.toPlainText())
self.htmlEntered.emit(self.toHtml())
self.returnPressed.emit() | [
"def",
"acceptText",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"signalsBlocked",
"(",
")",
":",
"self",
".",
"textEntered",
".",
"emit",
"(",
"self",
".",
"toPlainText",
"(",
")",
")",
"self",
".",
"htmlEntered",
".",
"emit",
"(",
"self",
".",... | Emits the editing finished signals for this widget. | [
"Emits",
"the",
"editing",
"finished",
"signals",
"for",
"this",
"widget",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtextedit.py#L51-L58 | train | Emits the editing finished signals for this widget. |
bitesofcode/projexui | projexui/widgets/xtextedit.py | XTextEdit.clear | def clear(self):
"""
Clears the text for this edit and resizes the toolbar information.
"""
super(XTextEdit, self).clear()
self.textEntered.emit('')
self.htmlEntered.emit('')
if self.autoResizeToContents():
self.resizeToCont... | python | def clear(self):
"""
Clears the text for this edit and resizes the toolbar information.
"""
super(XTextEdit, self).clear()
self.textEntered.emit('')
self.htmlEntered.emit('')
if self.autoResizeToContents():
self.resizeToCont... | [
"def",
"clear",
"(",
"self",
")",
":",
"super",
"(",
"XTextEdit",
",",
"self",
")",
".",
"clear",
"(",
")",
"self",
".",
"textEntered",
".",
"emit",
"(",
"''",
")",
"self",
".",
"htmlEntered",
".",
"emit",
"(",
"''",
")",
"if",
"self",
".",
"auto... | Clears the text for this edit and resizes the toolbar information. | [
"Clears",
"the",
"text",
"for",
"this",
"edit",
"and",
"resizes",
"the",
"toolbar",
"information",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtextedit.py#L70-L80 | train | Clears the text for this edit and resizes the toolbar information. |
bitesofcode/projexui | projexui/widgets/xtextedit.py | XTextEdit.focusInEvent | def focusInEvent(self, event):
"""
Processes when this widget recieves focus.
:param event | <QFocusEvent>
"""
if not self.signalsBlocked():
self.focusChanged.emit(True)
self.focusEntered.emit()
return super(XTextEd... | python | def focusInEvent(self, event):
"""
Processes when this widget recieves focus.
:param event | <QFocusEvent>
"""
if not self.signalsBlocked():
self.focusChanged.emit(True)
self.focusEntered.emit()
return super(XTextEd... | [
"def",
"focusInEvent",
"(",
"self",
",",
"event",
")",
":",
"if",
"not",
"self",
".",
"signalsBlocked",
"(",
")",
":",
"self",
".",
"focusChanged",
".",
"emit",
"(",
"True",
")",
"self",
".",
"focusEntered",
".",
"emit",
"(",
")",
"return",
"super",
... | Processes when this widget recieves focus.
:param event | <QFocusEvent> | [
"Processes",
"when",
"this",
"widget",
"recieves",
"focus",
".",
":",
"param",
"event",
"|",
"<QFocusEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtextedit.py#L92-L102 | train | Processes when this widget recieves focus. |
bitesofcode/projexui | projexui/widgets/xtextedit.py | XTextEdit.focusOutEvent | def focusOutEvent(self, event):
"""
Processes when this widget loses focus.
:param event | <QFocusEvent>
"""
if not self.signalsBlocked():
self.focusChanged.emit(False)
self.focusExited.emit()
return super(XTextEdit... | python | def focusOutEvent(self, event):
"""
Processes when this widget loses focus.
:param event | <QFocusEvent>
"""
if not self.signalsBlocked():
self.focusChanged.emit(False)
self.focusExited.emit()
return super(XTextEdit... | [
"def",
"focusOutEvent",
"(",
"self",
",",
"event",
")",
":",
"if",
"not",
"self",
".",
"signalsBlocked",
"(",
")",
":",
"self",
".",
"focusChanged",
".",
"emit",
"(",
"False",
")",
"self",
".",
"focusExited",
".",
"emit",
"(",
")",
"return",
"super",
... | Processes when this widget loses focus.
:param event | <QFocusEvent> | [
"Processes",
"when",
"this",
"widget",
"loses",
"focus",
".",
":",
"param",
"event",
"|",
"<QFocusEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtextedit.py#L104-L114 | train | Processes when this widget loses focus. |
bitesofcode/projexui | projexui/widgets/xtextedit.py | XTextEdit.keyPressEvent | def keyPressEvent(self, event):
"""
Processes user input when they enter a key.
:param event | <QKeyEvent>
"""
# emit the return pressed signal for this widget
if event.key() in (Qt.Key_Return, Qt.Key_Enter) and \
event.modifiers() == Qt.C... | python | def keyPressEvent(self, event):
"""
Processes user input when they enter a key.
:param event | <QKeyEvent>
"""
# emit the return pressed signal for this widget
if event.key() in (Qt.Key_Return, Qt.Key_Enter) and \
event.modifiers() == Qt.C... | [
"def",
"keyPressEvent",
"(",
"self",
",",
"event",
")",
":",
"# emit the return pressed signal for this widget\r",
"if",
"event",
".",
"key",
"(",
")",
"in",
"(",
"Qt",
".",
"Key_Return",
",",
"Qt",
".",
"Key_Enter",
")",
"and",
"event",
".",
"modifiers",
"(... | Processes user input when they enter a key.
:param event | <QKeyEvent> | [
"Processes",
"user",
"input",
"when",
"they",
"enter",
"a",
"key",
".",
":",
"param",
"event",
"|",
"<QKeyEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtextedit.py#L141-L169 | train | Process user input when they enter a key. |
bitesofcode/projexui | projexui/widgets/xtextedit.py | XTextEdit.paintEvent | def paintEvent(self, event):
"""
Overloads the paint event to support rendering of hints if there are
no items in the tree.
:param event | <QPaintEvent>
"""
super(XTextEdit, self).paintEvent(event)
if self.document().isEmpty() and s... | python | def paintEvent(self, event):
"""
Overloads the paint event to support rendering of hints if there are
no items in the tree.
:param event | <QPaintEvent>
"""
super(XTextEdit, self).paintEvent(event)
if self.document().isEmpty() and s... | [
"def",
"paintEvent",
"(",
"self",
",",
"event",
")",
":",
"super",
"(",
"XTextEdit",
",",
"self",
")",
".",
"paintEvent",
"(",
"event",
")",
"if",
"self",
".",
"document",
"(",
")",
".",
"isEmpty",
"(",
")",
"and",
"self",
".",
"hint",
"(",
")",
... | Overloads the paint event to support rendering of hints if there are
no items in the tree.
:param event | <QPaintEvent> | [
"Overloads",
"the",
"paint",
"event",
"to",
"support",
"rendering",
"of",
"hints",
"if",
"there",
"are",
"no",
"items",
"in",
"the",
"tree",
".",
":",
"param",
"event",
"|",
"<QPaintEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtextedit.py#L171-L195 | train | Overloads the paint event to support rendering of hints if there are no items in the tree. |
bitesofcode/projexui | projexui/widgets/xtextedit.py | XTextEdit.paste | def paste(self):
"""
Pastes text from the clipboard into this edit.
"""
html = QApplication.clipboard().text()
if not self.isRichTextEditEnabled():
self.insertPlainText(projex.text.toAscii(html))
else:
super(XTextEdit, self).paste() | python | def paste(self):
"""
Pastes text from the clipboard into this edit.
"""
html = QApplication.clipboard().text()
if not self.isRichTextEditEnabled():
self.insertPlainText(projex.text.toAscii(html))
else:
super(XTextEdit, self).paste() | [
"def",
"paste",
"(",
"self",
")",
":",
"html",
"=",
"QApplication",
".",
"clipboard",
"(",
")",
".",
"text",
"(",
")",
"if",
"not",
"self",
".",
"isRichTextEditEnabled",
"(",
")",
":",
"self",
".",
"insertPlainText",
"(",
"projex",
".",
"text",
".",
... | Pastes text from the clipboard into this edit. | [
"Pastes",
"text",
"from",
"the",
"clipboard",
"into",
"this",
"edit",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtextedit.py#L198-L206 | train | Pastes text from the clipboard into this edit. |
bitesofcode/projexui | projexui/widgets/xtextedit.py | XTextEdit.resizeEvent | def resizeEvent(self, event):
"""
Processes when this edit has been resized.
:param event | <QResizeEvent>
"""
super(XTextEdit, self).resizeEvent(event)
if self.autoResizeToContents():
self.resizeToContents() | python | def resizeEvent(self, event):
"""
Processes when this edit has been resized.
:param event | <QResizeEvent>
"""
super(XTextEdit, self).resizeEvent(event)
if self.autoResizeToContents():
self.resizeToContents() | [
"def",
"resizeEvent",
"(",
"self",
",",
"event",
")",
":",
"super",
"(",
"XTextEdit",
",",
"self",
")",
".",
"resizeEvent",
"(",
"event",
")",
"if",
"self",
".",
"autoResizeToContents",
"(",
")",
":",
"self",
".",
"resizeToContents",
"(",
")"
] | Processes when this edit has been resized.
:param event | <QResizeEvent> | [
"Processes",
"when",
"this",
"edit",
"has",
"been",
"resized",
".",
":",
"param",
"event",
"|",
"<QResizeEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtextedit.py#L219-L228 | train | Handles the resize event. |
bitesofcode/projexui | projexui/widgets/xtextedit.py | XTextEdit.resizeToContents | def resizeToContents(self):
"""
Resizes this widget to fit the contents of its text.
"""
doc = self.document()
h = doc.documentLayout().documentSize().height()
self.setFixedHeight(h + 4) | python | def resizeToContents(self):
"""
Resizes this widget to fit the contents of its text.
"""
doc = self.document()
h = doc.documentLayout().documentSize().height()
self.setFixedHeight(h + 4) | [
"def",
"resizeToContents",
"(",
"self",
")",
":",
"doc",
"=",
"self",
".",
"document",
"(",
")",
"h",
"=",
"doc",
".",
"documentLayout",
"(",
")",
".",
"documentSize",
"(",
")",
".",
"height",
"(",
")",
"self",
".",
"setFixedHeight",
"(",
"h",
"+",
... | Resizes this widget to fit the contents of its text. | [
"Resizes",
"this",
"widget",
"to",
"fit",
"the",
"contents",
"of",
"its",
"text",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtextedit.py#L231-L237 | train | Resizes this widget to fit the contents of its text. |
bitesofcode/projexui | projexui/widgets/xtextedit.py | XTextEdit.setText | def setText(self, text):
"""
Sets the text for this instance to the inputed text.
:param text | <str>
"""
super(XTextEdit, self).setText(projex.text.toAscii(text)) | python | def setText(self, text):
"""
Sets the text for this instance to the inputed text.
:param text | <str>
"""
super(XTextEdit, self).setText(projex.text.toAscii(text)) | [
"def",
"setText",
"(",
"self",
",",
"text",
")",
":",
"super",
"(",
"XTextEdit",
",",
"self",
")",
".",
"setText",
"(",
"projex",
".",
"text",
".",
"toAscii",
"(",
"text",
")",
")"
] | Sets the text for this instance to the inputed text.
:param text | <str> | [
"Sets",
"the",
"text",
"for",
"this",
"instance",
"to",
"the",
"inputed",
"text",
".",
":",
"param",
"text",
"|",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtextedit.py#L303-L309 | train | Sets the text for this instance to the inputed text. |
bitesofcode/projexui | projexui/widgets/xtextedit.py | XTextEdit.getText | def getText(cls,
parent=None,
windowTitle='Get Text',
label='',
text='',
plain=True,
wrapped=True):
"""
Prompts the user for a text entry using the text edit class.
:param pare... | python | def getText(cls,
parent=None,
windowTitle='Get Text',
label='',
text='',
plain=True,
wrapped=True):
"""
Prompts the user for a text entry using the text edit class.
:param pare... | [
"def",
"getText",
"(",
"cls",
",",
"parent",
"=",
"None",
",",
"windowTitle",
"=",
"'Get Text'",
",",
"label",
"=",
"''",
",",
"text",
"=",
"''",
",",
"plain",
"=",
"True",
",",
"wrapped",
"=",
"True",
")",
":",
"# create the dialog\r",
"dlg",
"=",
"... | Prompts the user for a text entry using the text edit class.
:param parent | <QWidget>
windowTitle | <str>
label | <str>
text | <str>
plain | <bool> | return plain text or not
... | [
"Prompts",
"the",
"user",
"for",
"a",
"text",
"entry",
"using",
"the",
"text",
"edit",
"class",
".",
":",
"param",
"parent",
"|",
"<QWidget",
">",
"windowTitle",
"|",
"<str",
">",
"label",
"|",
"<str",
">",
"text",
"|",
"<str",
">",
"plain",
"|",
"<b... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtextedit.py#L320-L379 | train | Prompts the user for a text entry using the text edit class. Returns the text or plain text if the user is not authorized to edit the entry. |
bitesofcode/projexui | projexui/widgets/xgroupbox.py | XGroupBox.isCollapsed | def isCollapsed( self ):
"""
Returns whether or not this group box is collapsed.
:return <bool>
"""
if not self.isCollapsible():
return False
if self._inverted:
return self.isChecked()
return not self.isChec... | python | def isCollapsed( self ):
"""
Returns whether or not this group box is collapsed.
:return <bool>
"""
if not self.isCollapsible():
return False
if self._inverted:
return self.isChecked()
return not self.isChec... | [
"def",
"isCollapsed",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"isCollapsible",
"(",
")",
":",
"return",
"False",
"if",
"self",
".",
"_inverted",
":",
"return",
"self",
".",
"isChecked",
"(",
")",
"return",
"not",
"self",
".",
"isChecked",
"(",... | Returns whether or not this group box is collapsed.
:return <bool> | [
"Returns",
"whether",
"or",
"not",
"this",
"group",
"box",
"is",
"collapsed",
".",
":",
"return",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xgroupbox.py#L54-L65 | train | Returns whether or not this group box is collapsed. |
bitesofcode/projexui | projexui/widgets/xgroupbox.py | XGroupBox.paintEvent | def paintEvent( self, event ):
"""
Overloads the paint event for this group box if it is currently
collpased.
:param event | <QPaintEvent>
"""
if ( self.isCollapsed() ):
self.setFlat(True)
elif ( self.isCollapsible() ):... | python | def paintEvent( self, event ):
"""
Overloads the paint event for this group box if it is currently
collpased.
:param event | <QPaintEvent>
"""
if ( self.isCollapsed() ):
self.setFlat(True)
elif ( self.isCollapsible() ):... | [
"def",
"paintEvent",
"(",
"self",
",",
"event",
")",
":",
"if",
"(",
"self",
".",
"isCollapsed",
"(",
")",
")",
":",
"self",
".",
"setFlat",
"(",
"True",
")",
"elif",
"(",
"self",
".",
"isCollapsible",
"(",
")",
")",
":",
"self",
".",
"setFlat",
... | Overloads the paint event for this group box if it is currently
collpased.
:param event | <QPaintEvent> | [
"Overloads",
"the",
"paint",
"event",
"for",
"this",
"group",
"box",
"if",
"it",
"is",
"currently",
"collpased",
".",
":",
"param",
"event",
"|",
"<QPaintEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xgroupbox.py#L84-L97 | train | Overloads the paint event for this group box if it is currently collpased. |
bitesofcode/projexui | projexui/widgets/xgroupbox.py | XGroupBox.matchCollapsedState | def matchCollapsedState( self ):
"""
Matches the collapsed state for this groupbox.
"""
collapsed = not self.isChecked()
if self._inverted:
collapsed = not collapsed
if ( not self.isCollapsible() or not collapsed ):
for child in self.c... | python | def matchCollapsedState( self ):
"""
Matches the collapsed state for this groupbox.
"""
collapsed = not self.isChecked()
if self._inverted:
collapsed = not collapsed
if ( not self.isCollapsible() or not collapsed ):
for child in self.c... | [
"def",
"matchCollapsedState",
"(",
"self",
")",
":",
"collapsed",
"=",
"not",
"self",
".",
"isChecked",
"(",
")",
"if",
"self",
".",
"_inverted",
":",
"collapsed",
"=",
"not",
"collapsed",
"if",
"(",
"not",
"self",
".",
"isCollapsible",
"(",
")",
"or",
... | Matches the collapsed state for this groupbox. | [
"Matches",
"the",
"collapsed",
"state",
"for",
"this",
"groupbox",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xgroupbox.py#L99-L126 | train | Matches the collapsed state for this groupbox. |
bitesofcode/projexui | projexui/widgets/xgroupbox.py | XGroupBox.setCollapsed | def setCollapsed( self, state ):
"""
Sets whether or not this group box is collapsed.
:param state | <bool>
"""
self.setCollapsible(True)
if not self._inverted:
self.setChecked(not state)
else:
self.setChecked(state) | python | def setCollapsed( self, state ):
"""
Sets whether or not this group box is collapsed.
:param state | <bool>
"""
self.setCollapsible(True)
if not self._inverted:
self.setChecked(not state)
else:
self.setChecked(state) | [
"def",
"setCollapsed",
"(",
"self",
",",
"state",
")",
":",
"self",
".",
"setCollapsible",
"(",
"True",
")",
"if",
"not",
"self",
".",
"_inverted",
":",
"self",
".",
"setChecked",
"(",
"not",
"state",
")",
"else",
":",
"self",
".",
"setChecked",
"(",
... | Sets whether or not this group box is collapsed.
:param state | <bool> | [
"Sets",
"whether",
"or",
"not",
"this",
"group",
"box",
"is",
"collapsed",
".",
":",
"param",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xgroupbox.py#L128-L138 | train | Sets whether or not this group box is collapsed. |
bitesofcode/projexui | projexui/widgets/xgroupbox.py | XGroupBox.setInverted | def setInverted(self, state):
"""
Sets whether or not to invert the check state for collapsing.
:param state | <bool>
"""
collapsed = self.isCollapsed()
self._inverted = state
if self.isCollapsible():
self.setCollapsed(collapsed) | python | def setInverted(self, state):
"""
Sets whether or not to invert the check state for collapsing.
:param state | <bool>
"""
collapsed = self.isCollapsed()
self._inverted = state
if self.isCollapsible():
self.setCollapsed(collapsed) | [
"def",
"setInverted",
"(",
"self",
",",
"state",
")",
":",
"collapsed",
"=",
"self",
".",
"isCollapsed",
"(",
")",
"self",
".",
"_inverted",
"=",
"state",
"if",
"self",
".",
"isCollapsible",
"(",
")",
":",
"self",
".",
"setCollapsed",
"(",
"collapsed",
... | Sets whether or not to invert the check state for collapsing.
:param state | <bool> | [
"Sets",
"whether",
"or",
"not",
"to",
"invert",
"the",
"check",
"state",
"for",
"collapsing",
".",
":",
"param",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xgroupbox.py#L158-L167 | train | Sets whether or not the check state for collapsing is inverted. |
bitesofcode/projexui | projexui/xcommands.py | ancestor | def ancestor(qobject, classType):
"""
Looks up the ancestor of the inputed QObject based on the given class type.
:param qobject | <QObject>
classType | <subclass of QObject> || <str>
:return <subclass of QObject> || None
"""
parent = qobject
is... | python | def ancestor(qobject, classType):
"""
Looks up the ancestor of the inputed QObject based on the given class type.
:param qobject | <QObject>
classType | <subclass of QObject> || <str>
:return <subclass of QObject> || None
"""
parent = qobject
is... | [
"def",
"ancestor",
"(",
"qobject",
",",
"classType",
")",
":",
"parent",
"=",
"qobject",
"is_class",
"=",
"True",
"while",
"parent",
":",
"if",
"type",
"(",
"parent",
")",
".",
"__name__",
"==",
"classType",
":",
"return",
"parent",
"if",
"is_class",
":"... | Looks up the ancestor of the inputed QObject based on the given class type.
:param qobject | <QObject>
classType | <subclass of QObject> || <str>
:return <subclass of QObject> || None | [
"Looks",
"up",
"the",
"ancestor",
"of",
"the",
"inputed",
"QObject",
"based",
"on",
"the",
"given",
"class",
"type",
".",
":",
"param",
"qobject",
"|",
"<QObject",
">",
"classType",
"|",
"<subclass",
"of",
"QObject",
">",
"||",
"<str",
">",
":",
"return"... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xcommands.py#L46-L70 | train | Returns the first ancestor of the inputed QObject based on the given class type. |
bitesofcode/projexui | projexui/xcommands.py | buildResourceFile | def buildResourceFile(rscpath, outpath=''):
"""
Generates a Qt resource module based on the given source path. This will
take all the files and folders within the source and generate a new XML
representation of that path. An optional outpath can be provided as the
generated resource path, by ... | python | def buildResourceFile(rscpath, outpath=''):
"""
Generates a Qt resource module based on the given source path. This will
take all the files and folders within the source and generate a new XML
representation of that path. An optional outpath can be provided as the
generated resource path, by ... | [
"def",
"buildResourceFile",
"(",
"rscpath",
",",
"outpath",
"=",
"''",
")",
":",
"import",
"xqt",
"wrapper",
"=",
"QT_WRAPPER",
".",
"lower",
"(",
")",
"if",
"not",
"outpath",
":",
"name",
"=",
"os",
".",
"path",
".",
"basename",
"(",
"rscpath",
")",
... | Generates a Qt resource module based on the given source path. This will
take all the files and folders within the source and generate a new XML
representation of that path. An optional outpath can be provided as the
generated resource path, by default it will be called the name of the
source path... | [
"Generates",
"a",
"Qt",
"resource",
"module",
"based",
"on",
"the",
"given",
"source",
"path",
".",
"This",
"will",
"take",
"all",
"the",
"files",
"and",
"folders",
"within",
"the",
"source",
"and",
"generate",
"a",
"new",
"XML",
"representation",
"of",
"t... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xcommands.py#L72-L128 | train | Builds a new resource file based on the given path. |
bitesofcode/projexui | projexui/xcommands.py | generateUiClasses | def generateUiClasses(srcpath):
"""
Generates the UI classes using the compilation system for Qt.
:param srcpath | <str>
"""
import_qt(globals())
for root, folders, files in os.walk(srcpath):
found = False
for file in files:
name, ext = os.pa... | python | def generateUiClasses(srcpath):
"""
Generates the UI classes using the compilation system for Qt.
:param srcpath | <str>
"""
import_qt(globals())
for root, folders, files in os.walk(srcpath):
found = False
for file in files:
name, ext = os.pa... | [
"def",
"generateUiClasses",
"(",
"srcpath",
")",
":",
"import_qt",
"(",
"globals",
"(",
")",
")",
"for",
"root",
",",
"folders",
",",
"files",
"in",
"os",
".",
"walk",
"(",
"srcpath",
")",
":",
"found",
"=",
"False",
"for",
"file",
"in",
"files",
":"... | Generates the UI classes using the compilation system for Qt.
:param srcpath | <str> | [
"Generates",
"the",
"UI",
"classes",
"using",
"the",
"compilation",
"system",
"for",
"Qt",
".",
":",
"param",
"srcpath",
"|",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xcommands.py#L130-L173 | train | Generates the UI classes for all the items in srcpath. |
bitesofcode/projexui | projexui/xcommands.py | generateResourceFile | def generateResourceFile(srcpath, outpath='', buildpath='', build=True):
"""
Generates a Qt resource file based on the given source path. This will
take all the files and folders within the source and generate a new XML
representation of that path. An optional outpath can be provided as the
g... | python | def generateResourceFile(srcpath, outpath='', buildpath='', build=True):
"""
Generates a Qt resource file based on the given source path. This will
take all the files and folders within the source and generate a new XML
representation of that path. An optional outpath can be provided as the
g... | [
"def",
"generateResourceFile",
"(",
"srcpath",
",",
"outpath",
"=",
"''",
",",
"buildpath",
"=",
"''",
",",
"build",
"=",
"True",
")",
":",
"if",
"not",
"outpath",
":",
"outpath",
"=",
"os",
".",
"path",
".",
"join",
"(",
"os",
".",
"path",
".",
"d... | Generates a Qt resource file based on the given source path. This will
take all the files and folders within the source and generate a new XML
representation of that path. An optional outpath can be provided as the
generated resource path, by default it will be called the name of the
source path.
... | [
"Generates",
"a",
"Qt",
"resource",
"file",
"based",
"on",
"the",
"given",
"source",
"path",
".",
"This",
"will",
"take",
"all",
"the",
"files",
"and",
"folders",
"within",
"the",
"source",
"and",
"generate",
"a",
"new",
"XML",
"representation",
"of",
"tha... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xcommands.py#L175-L224 | train | This method generates a Qt resource file based on the given source path. |
bitesofcode/projexui | projexui/xcommands.py | generateResourceFiles | def generateResourceFiles(srcpath, outpath='', buildpath='', build=True):
"""
Generates a Qt resource file based on the given source path. This will
take all the files and folders within the source and generate a new XML
representation of that path. An optional outpath can be provided as the
... | python | def generateResourceFiles(srcpath, outpath='', buildpath='', build=True):
"""
Generates a Qt resource file based on the given source path. This will
take all the files and folders within the source and generate a new XML
representation of that path. An optional outpath can be provided as the
... | [
"def",
"generateResourceFiles",
"(",
"srcpath",
",",
"outpath",
"=",
"''",
",",
"buildpath",
"=",
"''",
",",
"build",
"=",
"True",
")",
":",
"for",
"filename",
"in",
"os",
".",
"listdir",
"(",
"srcpath",
")",
":",
"rscpath",
"=",
"os",
".",
"path",
"... | Generates a Qt resource file based on the given source path. This will
take all the files and folders within the source and generate a new XML
representation of that path. An optional outpath can be provided as the
generated resource path, by default it will be called the name of the
source path.
... | [
"Generates",
"a",
"Qt",
"resource",
"file",
"based",
"on",
"the",
"given",
"source",
"path",
".",
"This",
"will",
"take",
"all",
"the",
"files",
"and",
"folders",
"within",
"the",
"source",
"and",
"generate",
"a",
"new",
"XML",
"representation",
"of",
"tha... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xcommands.py#L226-L240 | train | Generates a Qt resource file based on the given source path. |
bitesofcode/projexui | projexui/xcommands.py | generatePixmap | def generatePixmap(base64_data):
"""
Generates a new pixmap based on the inputed base64 data.
:param base64 | <str>
"""
import_qt(globals())
binary_data = binascii.a2b_base64(base64_data)
arr = QtCore.QByteArray.fromRawData(binary_data)
img = QtGui.QImage.fromDat... | python | def generatePixmap(base64_data):
"""
Generates a new pixmap based on the inputed base64 data.
:param base64 | <str>
"""
import_qt(globals())
binary_data = binascii.a2b_base64(base64_data)
arr = QtCore.QByteArray.fromRawData(binary_data)
img = QtGui.QImage.fromDat... | [
"def",
"generatePixmap",
"(",
"base64_data",
")",
":",
"import_qt",
"(",
"globals",
"(",
")",
")",
"binary_data",
"=",
"binascii",
".",
"a2b_base64",
"(",
"base64_data",
")",
"arr",
"=",
"QtCore",
".",
"QByteArray",
".",
"fromRawData",
"(",
"binary_data",
")... | Generates a new pixmap based on the inputed base64 data.
:param base64 | <str> | [
"Generates",
"a",
"new",
"pixmap",
"based",
"on",
"the",
"inputed",
"base64",
"data",
".",
":",
"param",
"base64",
"|",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xcommands.py#L242-L253 | train | Returns a new pixmap based on the inputed base64 data. |
bitesofcode/projexui | projexui/xcommands.py | import_qt | def import_qt(glbls):
""" Delayed qt loader. """
if 'QtCore' in glbls:
return
from projexui.qt import QtCore, QtGui, wrapVariant, uic
from projexui.widgets.xloggersplashscreen import XLoggerSplashScreen
glbls['QtCore'] = QtCore
glbls['QtGui'] = QtGui
glbls['wr... | python | def import_qt(glbls):
""" Delayed qt loader. """
if 'QtCore' in glbls:
return
from projexui.qt import QtCore, QtGui, wrapVariant, uic
from projexui.widgets.xloggersplashscreen import XLoggerSplashScreen
glbls['QtCore'] = QtCore
glbls['QtGui'] = QtGui
glbls['wr... | [
"def",
"import_qt",
"(",
"glbls",
")",
":",
"if",
"'QtCore'",
"in",
"glbls",
":",
"return",
"from",
"projexui",
".",
"qt",
"import",
"QtCore",
",",
"QtGui",
",",
"wrapVariant",
",",
"uic",
"from",
"projexui",
".",
"widgets",
".",
"xloggersplashscreen",
"im... | Delayed qt loader. | [
"Delayed",
"qt",
"loader",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xcommands.py#L255-L267 | train | Delayed qt loader. |
bitesofcode/projexui | projexui/xcommands.py | findUiActions | def findUiActions( widget ):
"""
Looks up actions for the inputed widget based on naming convention.
:param widget | <QWidget>
:return [<QAction>, ..]
"""
import_qt(globals())
output = []
for action in widget.findChildren(QtGui.QAction):
name =... | python | def findUiActions( widget ):
"""
Looks up actions for the inputed widget based on naming convention.
:param widget | <QWidget>
:return [<QAction>, ..]
"""
import_qt(globals())
output = []
for action in widget.findChildren(QtGui.QAction):
name =... | [
"def",
"findUiActions",
"(",
"widget",
")",
":",
"import_qt",
"(",
"globals",
"(",
")",
")",
"output",
"=",
"[",
"]",
"for",
"action",
"in",
"widget",
".",
"findChildren",
"(",
"QtGui",
".",
"QAction",
")",
":",
"name",
"=",
"nativestring",
"(",
"actio... | Looks up actions for the inputed widget based on naming convention.
:param widget | <QWidget>
:return [<QAction>, ..] | [
"Looks",
"up",
"actions",
"for",
"the",
"inputed",
"widget",
"based",
"on",
"naming",
"convention",
".",
":",
"param",
"widget",
"|",
"<QWidget",
">",
":",
"return",
"[",
"<QAction",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xcommands.py#L269-L284 | train | Returns a list of all actions that are in the UI. |
bitesofcode/projexui | projexui/xcommands.py | formatDropEvent | def formatDropEvent(event):
"""
Formats information from the drop event.
:param event | <QtGui.QDropEvent>
"""
text = []
text.append('#------------------------------------------------------')
text.append('# Drop Data ')
te... | python | def formatDropEvent(event):
"""
Formats information from the drop event.
:param event | <QtGui.QDropEvent>
"""
text = []
text.append('#------------------------------------------------------')
text.append('# Drop Data ')
te... | [
"def",
"formatDropEvent",
"(",
"event",
")",
":",
"text",
"=",
"[",
"]",
"text",
".",
"append",
"(",
"'#------------------------------------------------------'",
")",
"text",
".",
"append",
"(",
"'# Drop Data '",
")",
"text",
"."... | Formats information from the drop event.
:param event | <QtGui.QDropEvent> | [
"Formats",
"information",
"from",
"the",
"drop",
"event",
".",
":",
"param",
"event",
"|",
"<QtGui",
".",
"QDropEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xcommands.py#L286-L327 | train | Formats the drop event into a list of text. |
bitesofcode/projexui | projexui/xcommands.py | localizeShortcuts | def localizeShortcuts(widget):
"""
Shifts all action shortcuts for the given widget to us the
WidgetWithChildrenShortcut context, effectively localizing it to this
widget.
:param widget | <QWidget>
"""
import_qt(globals())
for action in widget.findChildren(QtGui.... | python | def localizeShortcuts(widget):
"""
Shifts all action shortcuts for the given widget to us the
WidgetWithChildrenShortcut context, effectively localizing it to this
widget.
:param widget | <QWidget>
"""
import_qt(globals())
for action in widget.findChildren(QtGui.... | [
"def",
"localizeShortcuts",
"(",
"widget",
")",
":",
"import_qt",
"(",
"globals",
"(",
")",
")",
"for",
"action",
"in",
"widget",
".",
"findChildren",
"(",
"QtGui",
".",
"QAction",
")",
":",
"action",
".",
"setShortcutContext",
"(",
"QtCore",
".",
"Qt",
... | Shifts all action shortcuts for the given widget to us the
WidgetWithChildrenShortcut context, effectively localizing it to this
widget.
:param widget | <QWidget> | [
"Shifts",
"all",
"action",
"shortcuts",
"for",
"the",
"given",
"widget",
"to",
"us",
"the",
"WidgetWithChildrenShortcut",
"context",
"effectively",
"localizing",
"it",
"to",
"this",
"widget",
".",
":",
"param",
"widget",
"|",
"<QWidget",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xcommands.py#L329-L340 | train | Localizes all action shortcuts for the given widget to us the same context as the given widget. |
bitesofcode/projexui | projexui/xcommands.py | loadUi | def loadUi(modulefile, inst, uifile=None, theme='default', className=None):
"""
Load the ui file based on the module file location and the inputed class.
:param modulefile | <str>
inst | <subclass of QWidget>
uifile | <str> || None
:ret... | python | def loadUi(modulefile, inst, uifile=None, theme='default', className=None):
"""
Load the ui file based on the module file location and the inputed class.
:param modulefile | <str>
inst | <subclass of QWidget>
uifile | <str> || None
:ret... | [
"def",
"loadUi",
"(",
"modulefile",
",",
"inst",
",",
"uifile",
"=",
"None",
",",
"theme",
"=",
"'default'",
",",
"className",
"=",
"None",
")",
":",
"if",
"className",
"is",
"None",
":",
"className",
"=",
"inst",
".",
"__class__",
".",
"__name__",
"im... | Load the ui file based on the module file location and the inputed class.
:param modulefile | <str>
inst | <subclass of QWidget>
uifile | <str> || None
:return <QWidget> | [
"Load",
"the",
"ui",
"file",
"based",
"on",
"the",
"module",
"file",
"location",
"and",
"the",
"inputed",
"class",
".",
":",
"param",
"modulefile",
"|",
"<str",
">",
"inst",
"|",
"<subclass",
"of",
"QWidget",
">",
"uifile",
"|",
"<str",
">",
"||",
"Non... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xcommands.py#L342-L426 | train | Load the ui file based on the module file location and the class name. |
bitesofcode/projexui | projexui/xcommands.py | exec_ | def exec_( window, data ):
"""
Executes the startup data for the given main window. This method needs to
be called in conjunction with the setup method.
:sa setup
:param window | <QWidget>
data | { <str> key: <variant> value, .. }
:return ... | python | def exec_( window, data ):
"""
Executes the startup data for the given main window. This method needs to
be called in conjunction with the setup method.
:sa setup
:param window | <QWidget>
data | { <str> key: <variant> value, .. }
:return ... | [
"def",
"exec_",
"(",
"window",
",",
"data",
")",
":",
"import_qt",
"(",
"globals",
"(",
")",
")",
"if",
"'splash'",
"in",
"data",
":",
"data",
"[",
"'splash'",
"]",
".",
"finish",
"(",
"window",
")",
"if",
"not",
"window",
".",
"parent",
"(",
")",
... | Executes the startup data for the given main window. This method needs to
be called in conjunction with the setup method.
:sa setup
:param window | <QWidget>
data | { <str> key: <variant> value, .. }
:return <int> err | [
"Executes",
"the",
"startup",
"data",
"for",
"the",
"given",
"main",
"window",
".",
"This",
"method",
"needs",
"to",
"be",
"called",
"in",
"conjunction",
"with",
"the",
"setup",
"method",
".",
":",
"sa",
"setup",
":",
"param",
"window",
"|",
"<QWidget",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xcommands.py#L428-L470 | train | Executes the startup data for the given main window. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.