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/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.editRecord | def editRecord(self, record, pos=None):
"""
Prompts the user to edit using a preset editor defined in the
setRecordEditors method.
:param record | <orb.Table>
:return <bool> | success
"""
typ = type(record)
ed... | python | def editRecord(self, record, pos=None):
"""
Prompts the user to edit using a preset editor defined in the
setRecordEditors method.
:param record | <orb.Table>
:return <bool> | success
"""
typ = type(record)
ed... | [
"def",
"editRecord",
"(",
"self",
",",
"record",
",",
"pos",
"=",
"None",
")",
":",
"typ",
"=",
"type",
"(",
"record",
")",
"editor",
"=",
"self",
".",
"_recordEditors",
".",
"get",
"(",
"typ",
")",
"if",
"not",
"editor",
":",
"return",
"False",
"i... | Prompts the user to edit using a preset editor defined in the
setRecordEditors method.
:param record | <orb.Table>
:return <bool> | success | [
"Prompts",
"the",
"user",
"to",
"edit",
"using",
"a",
"preset",
"editor",
"defined",
"in",
"the",
"setRecordEditors",
"method",
".",
":",
"param",
"record",
"|",
"<orb",
".",
"Table",
">",
":",
"return",
"<bool",
">",
"|",
"success"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1075-L1116 | train | Prompts the user to edit the specified record using a preset editor defined in the setRecordEditors method. Returns True if successful False otherwise. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.emitCurrentRecordChanged | def emitCurrentRecordChanged(self, item):
"""
Emits the record changed signal for the given item, provided the
signals are not currently blocked.
:param item | <QTreeWidgetItem>
"""
if self.signalsBlocked():
return
# em... | python | def emitCurrentRecordChanged(self, item):
"""
Emits the record changed signal for the given item, provided the
signals are not currently blocked.
:param item | <QTreeWidgetItem>
"""
if self.signalsBlocked():
return
# em... | [
"def",
"emitCurrentRecordChanged",
"(",
"self",
",",
"item",
")",
":",
"if",
"self",
".",
"signalsBlocked",
"(",
")",
":",
"return",
"# emit that the record has been clicked\r",
"if",
"isinstance",
"(",
"item",
",",
"XOrbRecordItem",
")",
":",
"self",
".",
"curr... | Emits the record changed signal for the given item, provided the
signals are not currently blocked.
:param item | <QTreeWidgetItem> | [
"Emits",
"the",
"record",
"changed",
"signal",
"for",
"the",
"given",
"item",
"provided",
"the",
"signals",
"are",
"not",
"currently",
"blocked",
".",
":",
"param",
"item",
"|",
"<QTreeWidgetItem",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1118-L1132 | train | Emits the current record changed signal for the given item. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.emitRecordClicked | def emitRecordClicked(self, item):
"""
Emits the record clicked signal for the given item, provided the
signals are not currently blocked.
:param item | <QTreeWidgetItem>
"""
# load the next page
if isinstance(item, XBatchItem):
... | python | def emitRecordClicked(self, item):
"""
Emits the record clicked signal for the given item, provided the
signals are not currently blocked.
:param item | <QTreeWidgetItem>
"""
# load the next page
if isinstance(item, XBatchItem):
... | [
"def",
"emitRecordClicked",
"(",
"self",
",",
"item",
")",
":",
"# load the next page\r",
"if",
"isinstance",
"(",
"item",
",",
"XBatchItem",
")",
":",
"item",
".",
"startLoading",
"(",
")",
"self",
".",
"clearSelection",
"(",
")",
"# emit that the record has be... | Emits the record clicked signal for the given item, provided the
signals are not currently blocked.
:param item | <QTreeWidgetItem> | [
"Emits",
"the",
"record",
"clicked",
"signal",
"for",
"the",
"given",
"item",
"provided",
"the",
"signals",
"are",
"not",
"currently",
"blocked",
".",
":",
"param",
"item",
"|",
"<QTreeWidgetItem",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1134-L1148 | train | Emits the record clicked signal for the given item. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.emitRecordDoubleClicked | def emitRecordDoubleClicked(self, item):
"""
Emits the record clicked signal for the given item, provided the
signals are not currently blocked.
:param item | <QTreeWidgetItem>
"""
# emit that the record has been double clicked
if isinstance(... | python | def emitRecordDoubleClicked(self, item):
"""
Emits the record clicked signal for the given item, provided the
signals are not currently blocked.
:param item | <QTreeWidgetItem>
"""
# emit that the record has been double clicked
if isinstance(... | [
"def",
"emitRecordDoubleClicked",
"(",
"self",
",",
"item",
")",
":",
"# emit that the record has been double clicked\r",
"if",
"isinstance",
"(",
"item",
",",
"XOrbRecordItem",
")",
"and",
"not",
"self",
".",
"signalsBlocked",
"(",
")",
":",
"self",
".",
"recordD... | Emits the record clicked signal for the given item, provided the
signals are not currently blocked.
:param item | <QTreeWidgetItem> | [
"Emits",
"the",
"record",
"clicked",
"signal",
"for",
"the",
"given",
"item",
"provided",
"the",
"signals",
"are",
"not",
"currently",
"blocked",
".",
":",
"param",
"item",
"|",
"<QTreeWidgetItem",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1150-L1170 | train | Emits the record double clicked signal for the given item. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.emitRecordMiddleClicked | def emitRecordMiddleClicked(self, item):
"""
Emits the record clicked signal for the given item, provided the
signals are not currently blocked.
:param item | <QTreeWidgetItem>
"""
# emit that the record has been double clicked
if isinstance(... | python | def emitRecordMiddleClicked(self, item):
"""
Emits the record clicked signal for the given item, provided the
signals are not currently blocked.
:param item | <QTreeWidgetItem>
"""
# emit that the record has been double clicked
if isinstance(... | [
"def",
"emitRecordMiddleClicked",
"(",
"self",
",",
"item",
")",
":",
"# emit that the record has been double clicked\r",
"if",
"isinstance",
"(",
"item",
",",
"XOrbRecordItem",
")",
"and",
"not",
"self",
".",
"signalsBlocked",
"(",
")",
":",
"self",
".",
"recordM... | Emits the record clicked signal for the given item, provided the
signals are not currently blocked.
:param item | <QTreeWidgetItem> | [
"Emits",
"the",
"record",
"clicked",
"signal",
"for",
"the",
"given",
"item",
"provided",
"the",
"signals",
"are",
"not",
"currently",
"blocked",
".",
":",
"param",
"item",
"|",
"<QTreeWidgetItem",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1172-L1181 | train | Emits the record middle clicked signal for the given item. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.emitRecordMiddleDoubleClicked | def emitRecordMiddleDoubleClicked(self, item):
"""
Emits the record clicked signal for the given item, provided the
signals are not currently blocked.
:param item | <QTreeWidgetItem>
"""
# emit that the record has been double clicked
if isins... | python | def emitRecordMiddleDoubleClicked(self, item):
"""
Emits the record clicked signal for the given item, provided the
signals are not currently blocked.
:param item | <QTreeWidgetItem>
"""
# emit that the record has been double clicked
if isins... | [
"def",
"emitRecordMiddleDoubleClicked",
"(",
"self",
",",
"item",
")",
":",
"# emit that the record has been double clicked\r",
"if",
"isinstance",
"(",
"item",
",",
"XOrbRecordItem",
")",
"and",
"not",
"self",
".",
"signalsBlocked",
"(",
")",
":",
"self",
".",
"r... | Emits the record clicked signal for the given item, provided the
signals are not currently blocked.
:param item | <QTreeWidgetItem> | [
"Emits",
"the",
"record",
"clicked",
"signal",
"for",
"the",
"given",
"item",
"provided",
"the",
"signals",
"are",
"not",
"currently",
"blocked",
".",
":",
"param",
"item",
"|",
"<QTreeWidgetItem",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1183-L1192 | train | Emits the record middle double clicked signal for the given item. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.findRecordItem | def findRecordItem(self, record, parent=None):
"""
Looks through the tree hierarchy for the given record.
:param record | <orb.Record>
parent | <QTreeWidgetItem> || None
:return <XOrbRecordItem> || None
"""
try:
... | python | def findRecordItem(self, record, parent=None):
"""
Looks through the tree hierarchy for the given record.
:param record | <orb.Record>
parent | <QTreeWidgetItem> || None
:return <XOrbRecordItem> || None
"""
try:
... | [
"def",
"findRecordItem",
"(",
"self",
",",
"record",
",",
"parent",
"=",
"None",
")",
":",
"try",
":",
"item",
"=",
"self",
".",
"_recordMapping",
"[",
"record",
"]",
"(",
")",
"except",
"KeyError",
":",
"return",
"None",
"if",
"item",
"is",
"None",
... | Looks through the tree hierarchy for the given record.
:param record | <orb.Record>
parent | <QTreeWidgetItem> || None
:return <XOrbRecordItem> || None | [
"Looks",
"through",
"the",
"tree",
"hierarchy",
"for",
"the",
"given",
"record",
".",
":",
"param",
"record",
"|",
"<orb",
".",
"Record",
">",
"parent",
"|",
"<QTreeWidgetItem",
">",
"||",
"None",
":",
"return",
"<XOrbRecordItem",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1194-L1211 | train | Returns the first record item in the tree hierarchy that matches the given record. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.initializeColumns | def initializeColumns(self):
"""
Initializes the columns that will be used for this tree widget based \
on the table type linked to it.
"""
tableType = self.tableType()
if not tableType:
return
elif self._columnsInitialized or self.columnOf(0) ... | python | def initializeColumns(self):
"""
Initializes the columns that will be used for this tree widget based \
on the table type linked to it.
"""
tableType = self.tableType()
if not tableType:
return
elif self._columnsInitialized or self.columnOf(0) ... | [
"def",
"initializeColumns",
"(",
"self",
")",
":",
"tableType",
"=",
"self",
".",
"tableType",
"(",
")",
"if",
"not",
"tableType",
":",
"return",
"elif",
"self",
".",
"_columnsInitialized",
"or",
"self",
".",
"columnOf",
"(",
"0",
")",
"!=",
"'1'",
":",
... | Initializes the columns that will be used for this tree widget based \
on the table type linked to it. | [
"Initializes",
"the",
"columns",
"that",
"will",
"be",
"used",
"for",
"this",
"tree",
"widget",
"based",
"\\",
"on",
"the",
"table",
"type",
"linked",
"to",
"it",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1213-L1232 | train | Initializes the columns that will be used for this tree widget based on the table type linked to it. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.keyPressEvent | def keyPressEvent(self, event):
"""
Listen for the delete key and check to see if this should auto
set the remove property on the object.
:param event | <QKeyPressEvent>
"""
# tag the item for deletion
if self.useDefaultKeystrokes() and self.... | python | def keyPressEvent(self, event):
"""
Listen for the delete key and check to see if this should auto
set the remove property on the object.
:param event | <QKeyPressEvent>
"""
# tag the item for deletion
if self.useDefaultKeystrokes() and self.... | [
"def",
"keyPressEvent",
"(",
"self",
",",
"event",
")",
":",
"# tag the item for deletion\r",
"if",
"self",
".",
"useDefaultKeystrokes",
"(",
")",
"and",
"self",
".",
"isEditable",
"(",
")",
":",
"if",
"event",
".",
"key",
"(",
")",
"==",
"Qt",
".",
"Key... | Listen for the delete key and check to see if this should auto
set the remove property on the object.
:param event | <QKeyPressEvent> | [
"Listen",
"for",
"the",
"delete",
"key",
"and",
"check",
"to",
"see",
"if",
"this",
"should",
"auto",
"set",
"the",
"remove",
"property",
"on",
"the",
"object",
".",
":",
"param",
"event",
"|",
"<QKeyPressEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1292-L1310 | train | Handles the key press event for deletion and save the object state to the database. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.mimeData | def mimeData(self, items):
"""
Returns the mime data for dragging for this instance.
:param items | [<QTreeWidgetItem>, ..]
"""
func = self.dataCollector()
if func:
return func(self, items)
# extract the records from th... | python | def mimeData(self, items):
"""
Returns the mime data for dragging for this instance.
:param items | [<QTreeWidgetItem>, ..]
"""
func = self.dataCollector()
if func:
return func(self, items)
# extract the records from th... | [
"def",
"mimeData",
"(",
"self",
",",
"items",
")",
":",
"func",
"=",
"self",
".",
"dataCollector",
"(",
")",
"if",
"func",
":",
"return",
"func",
"(",
"self",
",",
"items",
")",
"# extract the records from the items\r",
"record_items",
"=",
"[",
"]",
"for"... | Returns the mime data for dragging for this instance.
:param items | [<QTreeWidgetItem>, ..] | [
"Returns",
"the",
"mime",
"data",
"for",
"dragging",
"for",
"this",
"instance",
".",
":",
"param",
"items",
"|",
"[",
"<QTreeWidgetItem",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1380-L1399 | train | Returns the mime data for dragging for this instance. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.popupWidget | def popupWidget(self):
"""
Returns the popup widget for this editor.
:return <skyline.gui.XPopupWidget>
"""
if not self._popup:
btns = QDialogButtonBox.Save | QDialogButtonBox.Cancel
self._popup = XPopupWidget(self, btns)
... | python | def popupWidget(self):
"""
Returns the popup widget for this editor.
:return <skyline.gui.XPopupWidget>
"""
if not self._popup:
btns = QDialogButtonBox.Save | QDialogButtonBox.Cancel
self._popup = XPopupWidget(self, btns)
... | [
"def",
"popupWidget",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"_popup",
":",
"btns",
"=",
"QDialogButtonBox",
".",
"Save",
"|",
"QDialogButtonBox",
".",
"Cancel",
"self",
".",
"_popup",
"=",
"XPopupWidget",
"(",
"self",
",",
"btns",
")",
"self",... | Returns the popup widget for this editor.
:return <skyline.gui.XPopupWidget> | [
"Returns",
"the",
"popup",
"widget",
"for",
"this",
"editor",
".",
":",
"return",
"<skyline",
".",
"gui",
".",
"XPopupWidget",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1446-L1458 | train | Returns the popup widget for this editor. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.recordItemClass | def recordItemClass(self, record=None):
"""
Returns the record item class instance linked with this tree widget.
:return <XOrbRecordItem>
"""
if record is not None:
key = type(record)
else:
key = None
return... | python | def recordItemClass(self, record=None):
"""
Returns the record item class instance linked with this tree widget.
:return <XOrbRecordItem>
"""
if record is not None:
key = type(record)
else:
key = None
return... | [
"def",
"recordItemClass",
"(",
"self",
",",
"record",
"=",
"None",
")",
":",
"if",
"record",
"is",
"not",
"None",
":",
"key",
"=",
"type",
"(",
"record",
")",
"else",
":",
"key",
"=",
"None",
"return",
"self",
".",
"_recordItemClass",
".",
"get",
"("... | Returns the record item class instance linked with this tree widget.
:return <XOrbRecordItem> | [
"Returns",
"the",
"record",
"item",
"class",
"instance",
"linked",
"with",
"this",
"tree",
"widget",
".",
":",
"return",
"<XOrbRecordItem",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1477-L1488 | train | Returns the record item class instance linked with this tree widget. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.recordEditor | def recordEditor(self, tableType=None):
"""
Returns the record editor from the set for the given table type.
:param tableType | <subclass of orb.Table> || None
:return <subclass of XOrbRecordWidget> || None
"""
if tableType == None:
... | python | def recordEditor(self, tableType=None):
"""
Returns the record editor from the set for the given table type.
:param tableType | <subclass of orb.Table> || None
:return <subclass of XOrbRecordWidget> || None
"""
if tableType == None:
... | [
"def",
"recordEditor",
"(",
"self",
",",
"tableType",
"=",
"None",
")",
":",
"if",
"tableType",
"==",
"None",
":",
"tableType",
"=",
"self",
".",
"tableType",
"(",
")",
"return",
"self",
".",
"_recordEditors",
".",
"get",
"(",
"tableType",
",",
"None",
... | Returns the record editor from the set for the given table type.
:param tableType | <subclass of orb.Table> || None
:return <subclass of XOrbRecordWidget> || None | [
"Returns",
"the",
"record",
"editor",
"from",
"the",
"set",
"for",
"the",
"given",
"table",
"type",
".",
":",
"param",
"tableType",
"|",
"<subclass",
"of",
"orb",
".",
"Table",
">",
"||",
"None",
":",
"return",
"<subclass",
"of",
"XOrbRecordWidget",
">",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1500-L1511 | train | Returns the record editor for the given table type. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.reorder | def reorder(self, index, direction):
"""
Reorders the data being displayed in this tree. It will check to
see if a server side requery needs to happen based on the paging
information for this tree.
:param index | <column>
direction | ... | python | def reorder(self, index, direction):
"""
Reorders the data being displayed in this tree. It will check to
see if a server side requery needs to happen based on the paging
information for this tree.
:param index | <column>
direction | ... | [
"def",
"reorder",
"(",
"self",
",",
"index",
",",
"direction",
")",
":",
"columnTitle",
"=",
"self",
".",
"columnOf",
"(",
"index",
")",
"columnName",
"=",
"self",
".",
"columnOrderName",
"(",
"columnTitle",
")",
"if",
"not",
"columnName",
":",
"return",
... | Reorders the data being displayed in this tree. It will check to
see if a server side requery needs to happen based on the paging
information for this tree.
:param index | <column>
direction | <Qt.SortOrder>
:sa setOrder | [
"Reorders",
"the",
"data",
"being",
"displayed",
"in",
"this",
"tree",
".",
"It",
"will",
"check",
"to",
"see",
"if",
"a",
"server",
"side",
"requery",
"needs",
"to",
"happen",
"based",
"on",
"the",
"paging",
"information",
"for",
"this",
"tree",
".",
":... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1528-L1575 | train | Reorders the data in this tree. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.refresh | def refresh(self, reloadData=False, force=False):
"""
Refreshes the record list for the tree.
"""
if not (self.isVisible() or force):
self._refreshTimer.start()
return
if self.isLoading():
return
if reloadDa... | python | def refresh(self, reloadData=False, force=False):
"""
Refreshes the record list for the tree.
"""
if not (self.isVisible() or force):
self._refreshTimer.start()
return
if self.isLoading():
return
if reloadDa... | [
"def",
"refresh",
"(",
"self",
",",
"reloadData",
"=",
"False",
",",
"force",
"=",
"False",
")",
":",
"if",
"not",
"(",
"self",
".",
"isVisible",
"(",
")",
"or",
"force",
")",
":",
"self",
".",
"_refreshTimer",
".",
"start",
"(",
")",
"return",
"if... | Refreshes the record list for the tree. | [
"Refreshes",
"the",
"record",
"list",
"for",
"the",
"tree",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1577-L1639 | train | Refreshes the record list for the tree. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.refreshQueryRecords | def refreshQueryRecords(self):
"""
Refreshes the query results based on the tree's query.
"""
if self._recordSet is not None:
records = RecordSet(self._recordSet)
elif self.tableType():
records = self.tableType().select()
else:
... | python | def refreshQueryRecords(self):
"""
Refreshes the query results based on the tree's query.
"""
if self._recordSet is not None:
records = RecordSet(self._recordSet)
elif self.tableType():
records = self.tableType().select()
else:
... | [
"def",
"refreshQueryRecords",
"(",
"self",
")",
":",
"if",
"self",
".",
"_recordSet",
"is",
"not",
"None",
":",
"records",
"=",
"RecordSet",
"(",
"self",
".",
"_recordSet",
")",
"elif",
"self",
".",
"tableType",
"(",
")",
":",
"records",
"=",
"self",
"... | Refreshes the query results based on the tree's query. | [
"Refreshes",
"the",
"query",
"results",
"based",
"on",
"the",
"tree",
"s",
"query",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1641-L1674 | train | Refreshes the query results based on the tree s query. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.restoreXml | def restoreXml(self, xml):
"""
Restores data from the xml entry.
:param xml | <xml.etree.ElementTree.Element>
:return <bool> | success
"""
if xml is None:
return False
# restore grouping
grps = xm... | python | def restoreXml(self, xml):
"""
Restores data from the xml entry.
:param xml | <xml.etree.ElementTree.Element>
:return <bool> | success
"""
if xml is None:
return False
# restore grouping
grps = xm... | [
"def",
"restoreXml",
"(",
"self",
",",
"xml",
")",
":",
"if",
"xml",
"is",
"None",
":",
"return",
"False",
"# restore grouping\r",
"grps",
"=",
"xml",
".",
"get",
"(",
"'grouping'",
")",
"if",
"grps",
"is",
"not",
"None",
":",
"self",
".",
"setGrouping... | Restores data from the xml entry.
:param xml | <xml.etree.ElementTree.Element>
:return <bool> | success | [
"Restores",
"data",
"from",
"the",
"xml",
"entry",
".",
":",
"param",
"xml",
"|",
"<xml",
".",
"etree",
".",
"ElementTree",
".",
"Element",
">",
":",
"return",
"<bool",
">",
"|",
"success"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1676-L1699 | train | Restores data from the xml entry. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.saveXml | def saveXml(self, xml):
"""
Saves the data for this tree to the inputed xml entry.
:param xml | <xml.etree.ElementTree.Element>
:return <bool> success
"""
if xml is None:
return False
# save the grouping e... | python | def saveXml(self, xml):
"""
Saves the data for this tree to the inputed xml entry.
:param xml | <xml.etree.ElementTree.Element>
:return <bool> success
"""
if xml is None:
return False
# save the grouping e... | [
"def",
"saveXml",
"(",
"self",
",",
"xml",
")",
":",
"if",
"xml",
"is",
"None",
":",
"return",
"False",
"# save the grouping enabled information\r",
"xml",
".",
"set",
"(",
"'groupingActive'",
",",
"nativestring",
"(",
"self",
".",
"isGroupingActive",
"(",
")"... | Saves the data for this tree to the inputed xml entry.
:param xml | <xml.etree.ElementTree.Element>
:return <bool> success | [
"Saves",
"the",
"data",
"for",
"this",
"tree",
"to",
"the",
"inputed",
"xml",
"entry",
".",
":",
"param",
"xml",
"|",
"<xml",
".",
"etree",
".",
"ElementTree",
".",
"Element",
">",
":",
"return",
"<bool",
">",
"success"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1701-L1720 | train | Saves the tree to the inputed xml entry. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.searchRecords | def searchRecords(self, search):
"""
Creates a search for the inputed records by joining the search terms
and query from the inputed search string by using the
Orb.Query.fromSearch method.
:param search | <str>
refined | <orb.Query> || N... | python | def searchRecords(self, search):
"""
Creates a search for the inputed records by joining the search terms
and query from the inputed search string by using the
Orb.Query.fromSearch method.
:param search | <str>
refined | <orb.Query> || N... | [
"def",
"searchRecords",
"(",
"self",
",",
"search",
")",
":",
"# take the base record set\r",
"self",
".",
"_currentRecordSet",
"=",
"None",
"self",
".",
"_searchTerms",
"=",
"nativestring",
"(",
"search",
")",
"# if we don't have a search, then go back to the default rec... | Creates a search for the inputed records by joining the search terms
and query from the inputed search string by using the
Orb.Query.fromSearch method.
:param search | <str>
refined | <orb.Query> || None
:return <bool> | success | [
"Creates",
"a",
"search",
"for",
"the",
"inputed",
"records",
"by",
"joining",
"the",
"search",
"terms",
"and",
"query",
"from",
"the",
"inputed",
"search",
"string",
"by",
"using",
"the",
"Orb",
".",
"Query",
".",
"fromSearch",
"method",
".",
":",
"param"... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1733-L1772 | train | Creates a search for the records in the specified search string. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.selectedRecords | def selectedRecords(self):
"""
Returns a list of all the selected records for this widget.
:return [<orb.Table>, ..]
"""
output = []
for item in self.selectedItems():
if ( isinstance(item, XOrbRecordItem) ):
output.append(... | python | def selectedRecords(self):
"""
Returns a list of all the selected records for this widget.
:return [<orb.Table>, ..]
"""
output = []
for item in self.selectedItems():
if ( isinstance(item, XOrbRecordItem) ):
output.append(... | [
"def",
"selectedRecords",
"(",
"self",
")",
":",
"output",
"=",
"[",
"]",
"for",
"item",
"in",
"self",
".",
"selectedItems",
"(",
")",
":",
"if",
"(",
"isinstance",
"(",
"item",
",",
"XOrbRecordItem",
")",
")",
":",
"output",
".",
"append",
"(",
"ite... | Returns a list of all the selected records for this widget.
:return [<orb.Table>, ..] | [
"Returns",
"a",
"list",
"of",
"all",
"the",
"selected",
"records",
"for",
"this",
"widget",
".",
":",
"return",
"[",
"<orb",
".",
"Table",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1774-L1784 | train | Returns a list of all the selected records for this widget. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.setCheckedRecords | def setCheckedRecords(self, records, column=0, parent=None):
"""
Sets the checked items based on the inputed list of records.
:param records | [<orb.Table>, ..]
parent | <QTreeWidgetItem> || None
"""
if parent is None:
for i ... | python | def setCheckedRecords(self, records, column=0, parent=None):
"""
Sets the checked items based on the inputed list of records.
:param records | [<orb.Table>, ..]
parent | <QTreeWidgetItem> || None
"""
if parent is None:
for i ... | [
"def",
"setCheckedRecords",
"(",
"self",
",",
"records",
",",
"column",
"=",
"0",
",",
"parent",
"=",
"None",
")",
":",
"if",
"parent",
"is",
"None",
":",
"for",
"i",
"in",
"range",
"(",
"self",
".",
"topLevelItemCount",
"(",
")",
")",
":",
"item",
... | Sets the checked items based on the inputed list of records.
:param records | [<orb.Table>, ..]
parent | <QTreeWidgetItem> || None | [
"Sets",
"the",
"checked",
"items",
"based",
"on",
"the",
"inputed",
"list",
"of",
"records",
".",
":",
"param",
"records",
"|",
"[",
"<orb",
".",
"Table",
">",
"..",
"]",
"parent",
"|",
"<QTreeWidgetItem",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1806-L1836 | train | Sets the checked items based on the inputed list of records. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.setColumns | def setColumns(self, columns):
"""
Sets the columns for this widget, and marks the system as having
been initialized.
:param columns | [<str>, ..]
"""
super(XOrbTreeWidget, self).setColumns(columns)
self.setFilteredColumns(range(len(columns))... | python | def setColumns(self, columns):
"""
Sets the columns for this widget, and marks the system as having
been initialized.
:param columns | [<str>, ..]
"""
super(XOrbTreeWidget, self).setColumns(columns)
self.setFilteredColumns(range(len(columns))... | [
"def",
"setColumns",
"(",
"self",
",",
"columns",
")",
":",
"super",
"(",
"XOrbTreeWidget",
",",
"self",
")",
".",
"setColumns",
"(",
"columns",
")",
"self",
".",
"setFilteredColumns",
"(",
"range",
"(",
"len",
"(",
"columns",
")",
")",
")",
"self",
".... | Sets the columns for this widget, and marks the system as having
been initialized.
:param columns | [<str>, ..] | [
"Sets",
"the",
"columns",
"for",
"this",
"widget",
"and",
"marks",
"the",
"system",
"as",
"having",
"been",
"initialized",
".",
":",
"param",
"columns",
"|",
"[",
"<str",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1854-L1864 | train | Sets the columns for this widget and marks the system as having been initialized. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.setColumnMapper | def setColumnMapper(self, columnName, callable):
"""
Sets the mapper for the given column name to the callable. The inputed
callable should accept a single argument for a record from the tree and
return the text that should be displayed in the column.
:param ... | python | def setColumnMapper(self, columnName, callable):
"""
Sets the mapper for the given column name to the callable. The inputed
callable should accept a single argument for a record from the tree and
return the text that should be displayed in the column.
:param ... | [
"def",
"setColumnMapper",
"(",
"self",
",",
"columnName",
",",
"callable",
")",
":",
"columnName",
"=",
"nativestring",
"(",
"columnName",
")",
"if",
"(",
"callable",
"is",
"None",
"and",
"columnName",
"in",
"self",
".",
"_columnMappers",
")",
":",
"self",
... | Sets the mapper for the given column name to the callable. The inputed
callable should accept a single argument for a record from the tree and
return the text that should be displayed in the column.
:param columnName | <str>
callable | <function> || <met... | [
"Sets",
"the",
"mapper",
"for",
"the",
"given",
"column",
"name",
"to",
"the",
"callable",
".",
"The",
"inputed",
"callable",
"should",
"accept",
"a",
"single",
"argument",
"for",
"a",
"record",
"from",
"the",
"tree",
"and",
"return",
"the",
"text",
"that"... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1866-L1880 | train | Sets the mapper for the given column name to the callable. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.setCurrentRecord | def setCurrentRecord(self, record):
"""
Sets the current record for this tree to the inputed record.
:param record | <orb.Table>
"""
if self.isLoading():
self._tempCurrentRecord = record
return
for i in range(self.t... | python | def setCurrentRecord(self, record):
"""
Sets the current record for this tree to the inputed record.
:param record | <orb.Table>
"""
if self.isLoading():
self._tempCurrentRecord = record
return
for i in range(self.t... | [
"def",
"setCurrentRecord",
"(",
"self",
",",
"record",
")",
":",
"if",
"self",
".",
"isLoading",
"(",
")",
":",
"self",
".",
"_tempCurrentRecord",
"=",
"record",
"return",
"for",
"i",
"in",
"range",
"(",
"self",
".",
"topLevelItemCount",
"(",
")",
")",
... | Sets the current record for this tree to the inputed record.
:param record | <orb.Table> | [
"Sets",
"the",
"current",
"record",
"for",
"this",
"tree",
"to",
"the",
"inputed",
"record",
".",
":",
"param",
"record",
"|",
"<orb",
".",
"Table",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1882-L1895 | train | Sets the current record for this tree to the inputed record. Returns True if the tree is loaded False otherwise. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.setGroupBy | def setGroupBy(self, groupBy):
"""
Sets the grouping information for this tree.
:param groupBy | [<str> group level, ..] || None
"""
if groupBy and not type(groupBy) in (list, tuple):
groupBy = [nativestring(groupBy)]
elif not groupBy:
... | python | def setGroupBy(self, groupBy):
"""
Sets the grouping information for this tree.
:param groupBy | [<str> group level, ..] || None
"""
if groupBy and not type(groupBy) in (list, tuple):
groupBy = [nativestring(groupBy)]
elif not groupBy:
... | [
"def",
"setGroupBy",
"(",
"self",
",",
"groupBy",
")",
":",
"if",
"groupBy",
"and",
"not",
"type",
"(",
"groupBy",
")",
"in",
"(",
"list",
",",
"tuple",
")",
":",
"groupBy",
"=",
"[",
"nativestring",
"(",
"groupBy",
")",
"]",
"elif",
"not",
"groupBy"... | Sets the grouping information for this tree.
:param groupBy | [<str> group level, ..] || None | [
"Sets",
"the",
"grouping",
"information",
"for",
"this",
"tree",
".",
":",
"param",
"groupBy",
"|",
"[",
"<str",
">",
"group",
"level",
"..",
"]",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1922-L1933 | train | Sets the grouping information for this tree. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.setGroupingActive | def setGroupingActive(self, state, autoRefresh=False):
"""
Sets whether or not grouping is enabled for this system.
:param state | <bool>
"""
self._groupingActive = state
self.setRootIsDecorated(state)
if autoRefresh:
... | python | def setGroupingActive(self, state, autoRefresh=False):
"""
Sets whether or not grouping is enabled for this system.
:param state | <bool>
"""
self._groupingActive = state
self.setRootIsDecorated(state)
if autoRefresh:
... | [
"def",
"setGroupingActive",
"(",
"self",
",",
"state",
",",
"autoRefresh",
"=",
"False",
")",
":",
"self",
".",
"_groupingActive",
"=",
"state",
"self",
".",
"setRootIsDecorated",
"(",
"state",
")",
"if",
"autoRefresh",
":",
"self",
".",
"refresh",
"(",
")... | Sets whether or not grouping is enabled for this system.
:param state | <bool> | [
"Sets",
"whether",
"or",
"not",
"grouping",
"is",
"enabled",
"for",
"this",
"system",
".",
":",
"param",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1935-L1946 | train | Sets whether or not grouping is enabled for this system. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.setColumnOrderName | def setColumnOrderName(self, columnName, orderName):
"""
Sets the database name to use when ordering this widget by the
given column. When set, this will trigger a server side reorder
of information rather than a client side reorder if the information
displayed is paged - ... | python | def setColumnOrderName(self, columnName, orderName):
"""
Sets the database name to use when ordering this widget by the
given column. When set, this will trigger a server side reorder
of information rather than a client side reorder if the information
displayed is paged - ... | [
"def",
"setColumnOrderName",
"(",
"self",
",",
"columnName",
",",
"orderName",
")",
":",
"self",
".",
"_columnOrderNames",
"[",
"nativestring",
"(",
"columnName",
")",
"]",
"=",
"nativestring",
"(",
"orderName",
")"
] | Sets the database name to use when ordering this widget by the
given column. When set, this will trigger a server side reorder
of information rather than a client side reorder if the information
displayed is paged - as it will modify what to show for this page
based on the order.
... | [
"Sets",
"the",
"database",
"name",
"to",
"use",
"when",
"ordering",
"this",
"widget",
"by",
"the",
"given",
"column",
".",
"When",
"set",
"this",
"will",
"trigger",
"a",
"server",
"side",
"reorder",
"of",
"information",
"rather",
"than",
"a",
"client",
"si... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1948-L1959 | train | Sets the database name to use when ordering this widget by the given column. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.setHierarchyLookup | def setHierarchyLookup(self, columnName, tableType=None):
"""
Sets the hierarchy lookup for the inputed table type and column.
:param columnName | <str>
tableType | <subclass of Table>
"""
if tableType:
tableType = self.table... | python | def setHierarchyLookup(self, columnName, tableType=None):
"""
Sets the hierarchy lookup for the inputed table type and column.
:param columnName | <str>
tableType | <subclass of Table>
"""
if tableType:
tableType = self.table... | [
"def",
"setHierarchyLookup",
"(",
"self",
",",
"columnName",
",",
"tableType",
"=",
"None",
")",
":",
"if",
"tableType",
":",
"tableType",
"=",
"self",
".",
"tableType",
"(",
")",
"self",
".",
"_hierarchyLookup",
"[",
"tableType",
"]",
"=",
"(",
"tableType... | Sets the hierarchy lookup for the inputed table type and column.
:param columnName | <str>
tableType | <subclass of Table> | [
"Sets",
"the",
"hierarchy",
"lookup",
"for",
"the",
"inputed",
"table",
"type",
"and",
"column",
".",
":",
"param",
"columnName",
"|",
"<str",
">",
"tableType",
"|",
"<subclass",
"of",
"Table",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1961-L1970 | train | Sets the hierarchy lookup for the inputed table type and column. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.setPageSize | def setPageSize(self, pageSize):
"""
Sets the page size for this widget. If the page size is set to -1,
then there is no sizing and all records are displayed.
:return <int>
"""
if pageSize == self._pageSize:
return
self... | python | def setPageSize(self, pageSize):
"""
Sets the page size for this widget. If the page size is set to -1,
then there is no sizing and all records are displayed.
:return <int>
"""
if pageSize == self._pageSize:
return
self... | [
"def",
"setPageSize",
"(",
"self",
",",
"pageSize",
")",
":",
"if",
"pageSize",
"==",
"self",
".",
"_pageSize",
":",
"return",
"self",
".",
"_pageSize",
"=",
"pageSize",
"self",
".",
"setPaged",
"(",
"pageSize",
">",
"0",
")"
] | Sets the page size for this widget. If the page size is set to -1,
then there is no sizing and all records are displayed.
:return <int> | [
"Sets",
"the",
"page",
"size",
"for",
"this",
"widget",
".",
"If",
"the",
"page",
"size",
"is",
"set",
"to",
"-",
"1",
"then",
"there",
"is",
"no",
"sizing",
"and",
"all",
"records",
"are",
"displayed",
".",
":",
"return",
"<int",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L1993-L2004 | train | Sets the page size for this widget. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.setQuery | def setQuery(self, query, autoRefresh=False):
"""
Sets the query instance for this tree widget to the inputed query.
:param query | <orb.Query>
"""
self._query = query
self._currentRecordSet = None
if autoRefresh:
... | python | def setQuery(self, query, autoRefresh=False):
"""
Sets the query instance for this tree widget to the inputed query.
:param query | <orb.Query>
"""
self._query = query
self._currentRecordSet = None
if autoRefresh:
... | [
"def",
"setQuery",
"(",
"self",
",",
"query",
",",
"autoRefresh",
"=",
"False",
")",
":",
"self",
".",
"_query",
"=",
"query",
"self",
".",
"_currentRecordSet",
"=",
"None",
"if",
"autoRefresh",
":",
"self",
".",
"refreshQueryRecords",
"(",
")",
"self",
... | Sets the query instance for this tree widget to the inputed query.
:param query | <orb.Query> | [
"Sets",
"the",
"query",
"instance",
"for",
"this",
"tree",
"widget",
"to",
"the",
"inputed",
"query",
".",
":",
"param",
"query",
"|",
"<orb",
".",
"Query",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L2026-L2037 | train | Sets the query instance for this tree widget to the inputed query. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.setRecords | def setRecords(self, records):
"""
Manually sets the list of records that will be displayed in this tree.
This is a shortcut method to creating a RecordSet with a list of records
and assigning it to the tree.
:param records | [<orb.Table>, ..]
... | python | def setRecords(self, records):
"""
Manually sets the list of records that will be displayed in this tree.
This is a shortcut method to creating a RecordSet with a list of records
and assigning it to the tree.
:param records | [<orb.Table>, ..]
... | [
"def",
"setRecords",
"(",
"self",
",",
"records",
")",
":",
"self",
".",
"_searchTerms",
"=",
"''",
"if",
"not",
"isinstance",
"(",
"records",
",",
"RecordSet",
")",
":",
"records",
"=",
"RecordSet",
"(",
"records",
")",
"self",
".",
"setRecordSet",
"(",... | Manually sets the list of records that will be displayed in this tree.
This is a shortcut method to creating a RecordSet with a list of records
and assigning it to the tree.
:param records | [<orb.Table>, ..] | [
"Manually",
"sets",
"the",
"list",
"of",
"records",
"that",
"will",
"be",
"displayed",
"in",
"this",
"tree",
".",
"This",
"is",
"a",
"shortcut",
"method",
"to",
"creating",
"a",
"RecordSet",
"with",
"a",
"list",
"of",
"records",
"and",
"assigning",
"it",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L2049-L2062 | train | Sets the list of records that will be displayed in this tree. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.setRecordEditor | def setRecordEditor(self, editorClass, tableType=None):
"""
Sets the record editor for this tree based on the given table type.
If no tableType is supplied, then the assigned table type will be
used.
:param editorClass | <subclass of XOrbRecordWidget>
... | python | def setRecordEditor(self, editorClass, tableType=None):
"""
Sets the record editor for this tree based on the given table type.
If no tableType is supplied, then the assigned table type will be
used.
:param editorClass | <subclass of XOrbRecordWidget>
... | [
"def",
"setRecordEditor",
"(",
"self",
",",
"editorClass",
",",
"tableType",
"=",
"None",
")",
":",
"if",
"tableType",
"is",
"None",
":",
"tableType",
"=",
"editorClass",
".",
"tableType",
"(",
")",
"self",
".",
"_recordEditors",
"[",
"tableType",
"]",
"="... | Sets the record editor for this tree based on the given table type.
If no tableType is supplied, then the assigned table type will be
used.
:param editorClass | <subclass of XOrbRecordWidget>
tableType | <subclass of orb.Table> || None | [
"Sets",
"the",
"record",
"editor",
"for",
"this",
"tree",
"based",
"on",
"the",
"given",
"table",
"type",
".",
"If",
"no",
"tableType",
"is",
"supplied",
"then",
"the",
"assigned",
"table",
"type",
"will",
"be",
"used",
".",
":",
"param",
"editorClass",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L2064-L2076 | train | Sets the record editor for this tree based on the given table type. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.setRecordSet | def setRecordSet(self, recordSet):
"""
Defines the record set that will be used to lookup the information for
this tree.
:param records | [<Table>, ..] || None
"""
if not self.tableType():
self.setTableType(recordSet.table())
... | python | def setRecordSet(self, recordSet):
"""
Defines the record set that will be used to lookup the information for
this tree.
:param records | [<Table>, ..] || None
"""
if not self.tableType():
self.setTableType(recordSet.table())
... | [
"def",
"setRecordSet",
"(",
"self",
",",
"recordSet",
")",
":",
"if",
"not",
"self",
".",
"tableType",
"(",
")",
":",
"self",
".",
"setTableType",
"(",
"recordSet",
".",
"table",
"(",
")",
")",
"self",
".",
"_currentRecordSet",
"=",
"None",
"self",
"."... | Defines the record set that will be used to lookup the information for
this tree.
:param records | [<Table>, ..] || None | [
"Defines",
"the",
"record",
"set",
"that",
"will",
"be",
"used",
"to",
"lookup",
"the",
"information",
"for",
"this",
"tree",
".",
":",
"param",
"records",
"|",
"[",
"<Table",
">",
"..",
"]",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L2101-L2121 | train | Sets the record set that will be used to lookup the information for the specified tree. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.setSearchedRecords | def setSearchedRecords(self, records):
"""
Sets a record set based off of an external search. Searched results
provide an overridden entry to the tree widget, by passing the
grouping mechanism.
:param records | <orb.RecordSet>
:return <... | python | def setSearchedRecords(self, records):
"""
Sets a record set based off of an external search. Searched results
provide an overridden entry to the tree widget, by passing the
grouping mechanism.
:param records | <orb.RecordSet>
:return <... | [
"def",
"setSearchedRecords",
"(",
"self",
",",
"records",
")",
":",
"self",
".",
"_searchTerms",
"=",
"'EXTERNAL_SEARCH'",
"self",
".",
"_currentRecordSet",
"=",
"records",
"# update widget and notify any listeners\r",
"if",
"not",
"self",
".",
"signalsBlocked",
"(",
... | Sets a record set based off of an external search. Searched results
provide an overridden entry to the tree widget, by passing the
grouping mechanism.
:param records | <orb.RecordSet>
:return <bool> | records | [
"Sets",
"a",
"record",
"set",
"based",
"off",
"of",
"an",
"external",
"search",
".",
"Searched",
"results",
"provide",
"an",
"overridden",
"entry",
"to",
"the",
"tree",
"widget",
"by",
"passing",
"the",
"grouping",
"mechanism",
".",
":",
"param",
"records",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L2132-L2149 | train | Sets the record set based off of an external search. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.setTableType | def setTableType(self, tableType):
"""
Defines the table class type that this tree will be displaying.
:param table | <subclass of orb.Table>
"""
if tableType == self._tableType:
return
# clear all the information
block... | python | def setTableType(self, tableType):
"""
Defines the table class type that this tree will be displaying.
:param table | <subclass of orb.Table>
"""
if tableType == self._tableType:
return
# clear all the information
block... | [
"def",
"setTableType",
"(",
"self",
",",
"tableType",
")",
":",
"if",
"tableType",
"==",
"self",
".",
"_tableType",
":",
"return",
"# clear all the information\r",
"blocked",
"=",
"self",
".",
"signalsBlocked",
"(",
")",
"self",
".",
"blockAllSignals",
"(",
"T... | Defines the table class type that this tree will be displaying.
:param table | <subclass of orb.Table> | [
"Defines",
"the",
"table",
"class",
"type",
"that",
"this",
"tree",
"will",
"be",
"displaying",
".",
":",
"param",
"table",
"|",
"<subclass",
"of",
"orb",
".",
"Table",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L2179-L2210 | train | Sets the type of the table that this tree will be displaying. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.setTableTypeName | def setTableTypeName(self, tableTypeName):
"""
Defines the table type name that this tree will be displaying.
:param tableTypeName | <str>
"""
self._tableTypeName = tableTypeName
if ( not Orb ):
return
self.setTableType... | python | def setTableTypeName(self, tableTypeName):
"""
Defines the table type name that this tree will be displaying.
:param tableTypeName | <str>
"""
self._tableTypeName = tableTypeName
if ( not Orb ):
return
self.setTableType... | [
"def",
"setTableTypeName",
"(",
"self",
",",
"tableTypeName",
")",
":",
"self",
".",
"_tableTypeName",
"=",
"tableTypeName",
"if",
"(",
"not",
"Orb",
")",
":",
"return",
"self",
".",
"setTableType",
"(",
"Orb",
".",
"instance",
"(",
")",
".",
"model",
"(... | Defines the table type name that this tree will be displaying.
:param tableTypeName | <str> | [
"Defines",
"the",
"table",
"type",
"name",
"that",
"this",
"tree",
"will",
"be",
"displaying",
".",
":",
"param",
"tableTypeName",
"|",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L2213-L2223 | train | Sets the table type name that this tree will be displaying. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.setUseGroupStyle | def setUseGroupStyle(self, state):
"""
Sets whether or not the first group should draw with the
grouping style or not.
:param state | <bool>
"""
self._useGroupStyle = state
if state:
self.setRootIsDecorated(False) | python | def setUseGroupStyle(self, state):
"""
Sets whether or not the first group should draw with the
grouping style or not.
:param state | <bool>
"""
self._useGroupStyle = state
if state:
self.setRootIsDecorated(False) | [
"def",
"setUseGroupStyle",
"(",
"self",
",",
"state",
")",
":",
"self",
".",
"_useGroupStyle",
"=",
"state",
"if",
"state",
":",
"self",
".",
"setRootIsDecorated",
"(",
"False",
")"
] | Sets whether or not the first group should draw with the
grouping style or not.
:param state | <bool> | [
"Sets",
"whether",
"or",
"not",
"the",
"first",
"group",
"should",
"draw",
"with",
"the",
"grouping",
"style",
"or",
"not",
".",
":",
"param",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L2254-L2263 | train | Sets whether or not the first group should draw with the
grouping style or not. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.setupHeaderMenu | def setupHeaderMenu(self, menu, index):
"""
Updates the header right-click menu to include grouping options if
desired.
:param menu | <QMenu>
index | <int>
"""
if not self.userGroupingEnabled():
return False
... | python | def setupHeaderMenu(self, menu, index):
"""
Updates the header right-click menu to include grouping options if
desired.
:param menu | <QMenu>
index | <int>
"""
if not self.userGroupingEnabled():
return False
... | [
"def",
"setupHeaderMenu",
"(",
"self",
",",
"menu",
",",
"index",
")",
":",
"if",
"not",
"self",
".",
"userGroupingEnabled",
"(",
")",
":",
"return",
"False",
"first_action",
"=",
"menu",
".",
"actions",
"(",
")",
"[",
"1",
"]",
"column",
"=",
"self",
... | Updates the header right-click menu to include grouping options if
desired.
:param menu | <QMenu>
index | <int> | [
"Updates",
"the",
"header",
"right",
"-",
"click",
"menu",
"to",
"include",
"grouping",
"options",
"if",
"desired",
".",
":",
"param",
"menu",
"|",
"<QMenu",
">",
"index",
"|",
"<int",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L2282-L2319 | train | Setup the header right - click menu. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.showMenu | def showMenu(self, pos):
"""
Creates a new menu for this widget and displays it.
:param pos | <QPoint>
"""
glbl_pos = self.viewport().mapToGlobal(pos)
# lookup the specific item at the given position
item = self.itemAt(pos)
... | python | def showMenu(self, pos):
"""
Creates a new menu for this widget and displays it.
:param pos | <QPoint>
"""
glbl_pos = self.viewport().mapToGlobal(pos)
# lookup the specific item at the given position
item = self.itemAt(pos)
... | [
"def",
"showMenu",
"(",
"self",
",",
"pos",
")",
":",
"glbl_pos",
"=",
"self",
".",
"viewport",
"(",
")",
".",
"mapToGlobal",
"(",
"pos",
")",
"# lookup the specific item at the given position\r",
"item",
"=",
"self",
".",
"itemAt",
"(",
"pos",
")",
"selecte... | Creates a new menu for this widget and displays it.
:param pos | <QPoint> | [
"Creates",
"a",
"new",
"menu",
"for",
"this",
"widget",
"and",
"displays",
"it",
".",
":",
"param",
"pos",
"|",
"<QPoint",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L2337-L2419 | train | Creates a new menu for this widget and displays it. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.sortByColumn | def sortByColumn(self, index, direction):
"""
Sorts the data for this widget based on the inputed index & direction.
:param index | <int>
direction | <Qt.SortOrder
"""
if self.isPaged() and not self.isFullyLoaded():
self.reord... | python | def sortByColumn(self, index, direction):
"""
Sorts the data for this widget based on the inputed index & direction.
:param index | <int>
direction | <Qt.SortOrder
"""
if self.isPaged() and not self.isFullyLoaded():
self.reord... | [
"def",
"sortByColumn",
"(",
"self",
",",
"index",
",",
"direction",
")",
":",
"if",
"self",
".",
"isPaged",
"(",
")",
"and",
"not",
"self",
".",
"isFullyLoaded",
"(",
")",
":",
"self",
".",
"reorder",
"(",
"index",
",",
"direction",
")",
"else",
":",... | Sorts the data for this widget based on the inputed index & direction.
:param index | <int>
direction | <Qt.SortOrder | [
"Sorts",
"the",
"data",
"for",
"this",
"widget",
"based",
"on",
"the",
"inputed",
"index",
"&",
"direction",
".",
":",
"param",
"index",
"|",
"<int",
">",
"direction",
"|",
"<Qt",
".",
"SortOrder"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L2421-L2431 | train | Sort the data for this widget based on the inputed index & direction. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.toggleSelectedItemState | def toggleSelectedItemState(self, state):
"""
Toggles the selection for the inputed state.
:param state | <XOrbRecordItem.State>
"""
items = self.selectedItems()
for item in items:
if ( item.hasRecordState(state) ):
item.... | python | def toggleSelectedItemState(self, state):
"""
Toggles the selection for the inputed state.
:param state | <XOrbRecordItem.State>
"""
items = self.selectedItems()
for item in items:
if ( item.hasRecordState(state) ):
item.... | [
"def",
"toggleSelectedItemState",
"(",
"self",
",",
"state",
")",
":",
"items",
"=",
"self",
".",
"selectedItems",
"(",
")",
"for",
"item",
"in",
"items",
":",
"if",
"(",
"item",
".",
"hasRecordState",
"(",
"state",
")",
")",
":",
"item",
".",
"removeR... | Toggles the selection for the inputed state.
:param state | <XOrbRecordItem.State> | [
"Toggles",
"the",
"selection",
"for",
"the",
"inputed",
"state",
".",
":",
"param",
"state",
"|",
"<XOrbRecordItem",
".",
"State",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L2491-L2502 | train | Toggles the selection for the inputed state. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.updateItemIcon | def updateItemIcon(self, item):
"""
Updates the items icon based on its state.
:param item | <QTreeWidgetItem>
"""
# update the column width
self.setUpdatesEnabled(False)
colwidth = self.columnWidth(0)
self.resizeColumnToContents(0)
... | python | def updateItemIcon(self, item):
"""
Updates the items icon based on its state.
:param item | <QTreeWidgetItem>
"""
# update the column width
self.setUpdatesEnabled(False)
colwidth = self.columnWidth(0)
self.resizeColumnToContents(0)
... | [
"def",
"updateItemIcon",
"(",
"self",
",",
"item",
")",
":",
"# update the column width\r",
"self",
".",
"setUpdatesEnabled",
"(",
"False",
")",
"colwidth",
"=",
"self",
".",
"columnWidth",
"(",
"0",
")",
"self",
".",
"resizeColumnToContents",
"(",
"0",
")",
... | Updates the items icon based on its state.
:param item | <QTreeWidgetItem> | [
"Updates",
"the",
"items",
"icon",
"based",
"on",
"its",
"state",
".",
":",
"param",
"item",
"|",
"<QTreeWidgetItem",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L2510-L2524 | train | Updates the items icon based on its state. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.worker | def worker(self):
"""
Returns the worker associated with this tree widget.
:return <projexui.xorblookupworker.XOrbLookupWorker>
"""
if self._worker is None:
self._worker = XOrbLookupWorker(self.isThreadEnabled())
# create... | python | def worker(self):
"""
Returns the worker associated with this tree widget.
:return <projexui.xorblookupworker.XOrbLookupWorker>
"""
if self._worker is None:
self._worker = XOrbLookupWorker(self.isThreadEnabled())
# create... | [
"def",
"worker",
"(",
"self",
")",
":",
"if",
"self",
".",
"_worker",
"is",
"None",
":",
"self",
".",
"_worker",
"=",
"XOrbLookupWorker",
"(",
"self",
".",
"isThreadEnabled",
"(",
")",
")",
"# create worker connections\r",
"self",
".",
"loadRequested",
".",
... | Returns the worker associated with this tree widget.
:return <projexui.xorblookupworker.XOrbLookupWorker> | [
"Returns",
"the",
"worker",
"associated",
"with",
"this",
"tree",
"widget",
".",
":",
"return",
"<projexui",
".",
"xorblookupworker",
".",
"XOrbLookupWorker",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L2568-L2590 | train | Returns the worker associated with this tree widget. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.dataRestoreRecords | def dataRestoreRecords(mimeData):
"""
Extracts the records from the inputed drag & drop mime data information.
This will lookup the models based on their primary key information and
generate the element class.
:param mimeData | <QMimeData>
:... | python | def dataRestoreRecords(mimeData):
"""
Extracts the records from the inputed drag & drop mime data information.
This will lookup the models based on their primary key information and
generate the element class.
:param mimeData | <QMimeData>
:... | [
"def",
"dataRestoreRecords",
"(",
"mimeData",
")",
":",
"if",
"not",
"mimeData",
".",
"hasFormat",
"(",
"'application/x-orb-records'",
")",
":",
"return",
"[",
"]",
"from",
"orb",
"import",
"Orb",
"repros",
"=",
"nativestring",
"(",
"mimeData",
".",
"data",
... | Extracts the records from the inputed drag & drop mime data information.
This will lookup the models based on their primary key information and
generate the element class.
:param mimeData | <QMimeData>
:return [<orb.Table>, ..] | [
"Extracts",
"the",
"records",
"from",
"the",
"inputed",
"drag",
"&",
"drop",
"mime",
"data",
"information",
".",
"This",
"will",
"lookup",
"the",
"models",
"based",
"on",
"their",
"primary",
"key",
"information",
"and",
"generate",
"the",
"element",
"class",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L2605-L2636 | train | Returns a list of records from the given mime data. |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbtreewidget.py | XOrbTreeWidget.dataStoreRecords | def dataStoreRecords(mimeData, record_items):
"""
Adds the records to the inputed mime data as a text representation
under the application/x-orb-records
:param mimeData | [<orb.Table>, ..]
"""
record_data = []
for record_item in record_items:... | python | def dataStoreRecords(mimeData, record_items):
"""
Adds the records to the inputed mime data as a text representation
under the application/x-orb-records
:param mimeData | [<orb.Table>, ..]
"""
record_data = []
for record_item in record_items:... | [
"def",
"dataStoreRecords",
"(",
"mimeData",
",",
"record_items",
")",
":",
"record_data",
"=",
"[",
"]",
"for",
"record_item",
"in",
"record_items",
":",
"record",
"=",
"record_item",
".",
"record",
"(",
")",
"if",
"record",
"is",
"None",
":",
"continue",
... | Adds the records to the inputed mime data as a text representation
under the application/x-orb-records
:param mimeData | [<orb.Table>, ..] | [
"Adds",
"the",
"records",
"to",
"the",
"inputed",
"mime",
"data",
"as",
"a",
"text",
"representation",
"under",
"the",
"application",
"/",
"x",
"-",
"orb",
"-",
"records",
":",
"param",
"mimeData",
"|",
"[",
"<orb",
".",
"Table",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbtreewidget/xorbtreewidget.py#L2639-L2664 | train | Adds the records to the inputed mime data as a text representation of the records in the individual record. |
bitesofcode/projexui | projexui/widgets/xlockbutton.py | XLockButton.setChecked | def setChecked(self, state):
"""
Sets whether or not this button is in its locked state.
:param state | <bool>
"""
super(XLockButton, self).setChecked(state)
self.updateState() | python | def setChecked(self, state):
"""
Sets whether or not this button is in its locked state.
:param state | <bool>
"""
super(XLockButton, self).setChecked(state)
self.updateState() | [
"def",
"setChecked",
"(",
"self",
",",
"state",
")",
":",
"super",
"(",
"XLockButton",
",",
"self",
")",
".",
"setChecked",
"(",
"state",
")",
"self",
".",
"updateState",
"(",
")"
] | Sets whether or not this button is in its locked state.
:param state | <bool> | [
"Sets",
"whether",
"or",
"not",
"this",
"button",
"is",
"in",
"its",
"locked",
"state",
".",
":",
"param",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlockbutton.py#L53-L60 | train | Sets whether or not this button is in its locked state. |
bitesofcode/projexui | projexui/widgets/xlockbutton.py | XLockButton.updateState | def updateState(self):
"""
Updates the icon for this lock button based on its check state.
"""
if self.isChecked():
self.setIcon(self.lockIcon())
self.setToolTip('Click to unlock')
else:
self.setIcon(self.unlockIcon())
self... | python | def updateState(self):
"""
Updates the icon for this lock button based on its check state.
"""
if self.isChecked():
self.setIcon(self.lockIcon())
self.setToolTip('Click to unlock')
else:
self.setIcon(self.unlockIcon())
self... | [
"def",
"updateState",
"(",
"self",
")",
":",
"if",
"self",
".",
"isChecked",
"(",
")",
":",
"self",
".",
"setIcon",
"(",
"self",
".",
"lockIcon",
"(",
")",
")",
"self",
".",
"setToolTip",
"(",
"'Click to unlock'",
")",
"else",
":",
"self",
".",
"setI... | Updates the icon for this lock button based on its check state. | [
"Updates",
"the",
"icon",
"for",
"this",
"lock",
"button",
"based",
"on",
"its",
"check",
"state",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlockbutton.py#L78-L87 | train | Updates the icon for this lock button based on its check state. |
neithere/eav-django | eav/admin.py | BaseEntityAdmin.render_change_form | def render_change_form(self, request, context, **kwargs):
"""
Wrapper for ModelAdmin.render_change_form. Replaces standard static
AdminForm with an EAV-friendly one. The point is that our form generates
fields dynamically and fieldsets must be inferred from a prepared and
validat... | python | def render_change_form(self, request, context, **kwargs):
"""
Wrapper for ModelAdmin.render_change_form. Replaces standard static
AdminForm with an EAV-friendly one. The point is that our form generates
fields dynamically and fieldsets must be inferred from a prepared and
validat... | [
"def",
"render_change_form",
"(",
"self",
",",
"request",
",",
"context",
",",
"*",
"*",
"kwargs",
")",
":",
"form",
"=",
"context",
"[",
"'adminform'",
"]",
".",
"form",
"# infer correct data from the form",
"fieldsets",
"=",
"[",
"(",
"None",
",",
"{",
"... | Wrapper for ModelAdmin.render_change_form. Replaces standard static
AdminForm with an EAV-friendly one. The point is that our form generates
fields dynamically and fieldsets must be inferred from a prepared and
validated form instance, not just the form class. Django does not seem
to pro... | [
"Wrapper",
"for",
"ModelAdmin",
".",
"render_change_form",
".",
"Replaces",
"standard",
"static",
"AdminForm",
"with",
"an",
"EAV",
"-",
"friendly",
"one",
".",
"The",
"point",
"is",
"that",
"our",
"form",
"generates",
"fields",
"dynamically",
"and",
"fieldsets"... | 7f2e9fe17bbe740622cfb38f6ce0e8413b7da3d7 | https://github.com/neithere/eav-django/blob/7f2e9fe17bbe740622cfb38f6ce0e8413b7da3d7/eav/admin.py#L35-L55 | train | Wrapper for ModelAdmin. render_change_form. Replaces standard static
AdminForm with an EAV - friendly one. |
viatoriche/microservices | microservices/http/runners.py | gevent_run | def gevent_run(app, port=5000, log=None, error_log=None, address='',
monkey_patch=True, start=True, **kwargs): # pragma: no cover
"""Run your app in gevent.wsgi.WSGIServer
:param app: wsgi application, ex. Microservice instance
:param port: int, listen port, default 5000
:param address:... | python | def gevent_run(app, port=5000, log=None, error_log=None, address='',
monkey_patch=True, start=True, **kwargs): # pragma: no cover
"""Run your app in gevent.wsgi.WSGIServer
:param app: wsgi application, ex. Microservice instance
:param port: int, listen port, default 5000
:param address:... | [
"def",
"gevent_run",
"(",
"app",
",",
"port",
"=",
"5000",
",",
"log",
"=",
"None",
",",
"error_log",
"=",
"None",
",",
"address",
"=",
"''",
",",
"monkey_patch",
"=",
"True",
",",
"start",
"=",
"True",
",",
"*",
"*",
"kwargs",
")",
":",
"# pragma:... | Run your app in gevent.wsgi.WSGIServer
:param app: wsgi application, ex. Microservice instance
:param port: int, listen port, default 5000
:param address: str, listen address, default: ""
:param log: logger instance, default app.logger
:param error_log: logger instance, default app.logger
:para... | [
"Run",
"your",
"app",
"in",
"gevent",
".",
"wsgi",
".",
"WSGIServer"
] | 3510563edd15dc6131b8a948d6062856cd904ac7 | https://github.com/viatoriche/microservices/blob/3510563edd15dc6131b8a948d6062856cd904ac7/microservices/http/runners.py#L12-L40 | train | Run your app in gevent. wsgi. WSGIServer |
viatoriche/microservices | microservices/http/runners.py | tornado_run | def tornado_run(app, port=5000, address="", use_gevent=False, start=True,
monkey_patch=None, Container=None,
Server=None, threadpool=None): # pragma: no cover
"""Run your app in one tornado event loop process
:param app: wsgi application, Microservice instance
:param port: ... | python | def tornado_run(app, port=5000, address="", use_gevent=False, start=True,
monkey_patch=None, Container=None,
Server=None, threadpool=None): # pragma: no cover
"""Run your app in one tornado event loop process
:param app: wsgi application, Microservice instance
:param port: ... | [
"def",
"tornado_run",
"(",
"app",
",",
"port",
"=",
"5000",
",",
"address",
"=",
"\"\"",
",",
"use_gevent",
"=",
"False",
",",
"start",
"=",
"True",
",",
"monkey_patch",
"=",
"None",
",",
"Container",
"=",
"None",
",",
"Server",
"=",
"None",
",",
"th... | Run your app in one tornado event loop process
:param app: wsgi application, Microservice instance
:param port: port for listen, int, default: 5000
:param address: address for listen, str, default: ""
:param use_gevent: if True, app.wsgi will be run in gevent.spawn
:param start: if True, will be ca... | [
"Run",
"your",
"app",
"in",
"one",
"tornado",
"event",
"loop",
"process"
] | 3510563edd15dc6131b8a948d6062856cd904ac7 | https://github.com/viatoriche/microservices/blob/3510563edd15dc6131b8a948d6062856cd904ac7/microservices/http/runners.py#L58-L121 | train | Run your app in one tornado event loop |
viatoriche/microservices | microservices/http/runners.py | tornado_combiner | def tornado_combiner(configs, use_gevent=False, start=True, monkey_patch=None,
Container=None, Server=None, threadpool=None): # pragma: no cover
"""Combine servers in one tornado event loop process
:param configs: [
{
'app': Microservice Application or another wsgi app... | python | def tornado_combiner(configs, use_gevent=False, start=True, monkey_patch=None,
Container=None, Server=None, threadpool=None): # pragma: no cover
"""Combine servers in one tornado event loop process
:param configs: [
{
'app': Microservice Application or another wsgi app... | [
"def",
"tornado_combiner",
"(",
"configs",
",",
"use_gevent",
"=",
"False",
",",
"start",
"=",
"True",
",",
"monkey_patch",
"=",
"None",
",",
"Container",
"=",
"None",
",",
"Server",
"=",
"None",
",",
"threadpool",
"=",
"None",
")",
":",
"# pragma: no cove... | Combine servers in one tornado event loop process
:param configs: [
{
'app': Microservice Application or another wsgi application, required
'port': int, default: 5000
'address': str, default: ""
},
{ ... }
]
:param use_gevent: if True, app.wsgi wi... | [
"Combine",
"servers",
"in",
"one",
"tornado",
"event",
"loop",
"process"
] | 3510563edd15dc6131b8a948d6062856cd904ac7 | https://github.com/viatoriche/microservices/blob/3510563edd15dc6131b8a948d6062856cd904ac7/microservices/http/runners.py#L124-L169 | train | Combine servers in one tornado event loop. |
faxir/faxir-python | faxir/api/archives_api.py | ArchivesApi.delete_fax | def delete_fax(self, fax_id, **kwargs): # noqa: E501
"""Delete a fax # noqa: E501
Delete a specific fax record by providing its id # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = a... | python | def delete_fax(self, fax_id, **kwargs): # noqa: E501
"""Delete a fax # noqa: E501
Delete a specific fax record by providing its id # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = a... | [
"def",
"delete_fax",
"(",
"self",
",",
"fax_id",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async'",
")",
":",
"return",
"self",
".",
"delete_fax_with_h... | Delete a fax # noqa: E501
Delete a specific fax record by providing its id # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.delete_fax(fax_id, async=True)
>>> result = thread.get... | [
"Delete",
"a",
"fax",
"#",
"noqa",
":",
"E501"
] | 75ed2ea487a6be537342baea1077a02b0c8e70c1 | https://github.com/faxir/faxir-python/blob/75ed2ea487a6be537342baea1077a02b0c8e70c1/faxir/api/archives_api.py#L36-L56 | train | Delete a specific fax record by providing its id |
faxir/faxir-python | faxir/api/archives_api.py | ArchivesApi.get_fax | def get_fax(self, fax_id, **kwargs): # noqa: E501
"""Get a fax record # noqa: E501
Get a specific fax record details like duration, pages etc. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>... | python | def get_fax(self, fax_id, **kwargs): # noqa: E501
"""Get a fax record # noqa: E501
Get a specific fax record details like duration, pages etc. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>... | [
"def",
"get_fax",
"(",
"self",
",",
"fax_id",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async'",
")",
":",
"return",
"self",
".",
"get_fax_with_http_in... | Get a fax record # noqa: E501
Get a specific fax record details like duration, pages etc. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_fax(fax_id, async=True)
>>> result ... | [
"Get",
"a",
"fax",
"record",
"#",
"noqa",
":",
"E501"
] | 75ed2ea487a6be537342baea1077a02b0c8e70c1 | https://github.com/faxir/faxir-python/blob/75ed2ea487a6be537342baea1077a02b0c8e70c1/faxir/api/archives_api.py#L135-L155 | train | Get a specific fax record |
faxir/faxir-python | faxir/api/archives_api.py | ArchivesApi.list_faxes | def list_faxes(self, user_id, **kwargs): # noqa: E501
"""Get fax records # noqa: E501
With this API call you will be able to retrieve a collection of faxes (either sent or received or spam based on the category selected). If you want to filter your archive please provide the `category` parameter # n... | python | def list_faxes(self, user_id, **kwargs): # noqa: E501
"""Get fax records # noqa: E501
With this API call you will be able to retrieve a collection of faxes (either sent or received or spam based on the category selected). If you want to filter your archive please provide the `category` parameter # n... | [
"def",
"list_faxes",
"(",
"self",
",",
"user_id",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async'",
")",
":",
"return",
"self",
".",
"list_faxes_with_... | Get fax records # noqa: E501
With this API call you will be able to retrieve a collection of faxes (either sent or received or spam based on the category selected). If you want to filter your archive please provide the `category` parameter # noqa: E501
This method makes a synchronous HTTP request by ... | [
"Get",
"fax",
"records",
"#",
"noqa",
":",
"E501"
] | 75ed2ea487a6be537342baea1077a02b0c8e70c1 | https://github.com/faxir/faxir-python/blob/75ed2ea487a6be537342baea1077a02b0c8e70c1/faxir/api/archives_api.py#L234-L258 | train | List all the fax records for a user. |
faxir/faxir-python | faxir/api/archives_api.py | ArchivesApi.update_fax | def update_fax(self, fax_id, payload_fax_modification, **kwargs): # noqa: E501
"""Modify fax record # noqa: E501
You can modify a fax record's comment or mark it as read # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please... | python | def update_fax(self, fax_id, payload_fax_modification, **kwargs): # noqa: E501
"""Modify fax record # noqa: E501
You can modify a fax record's comment or mark it as read # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please... | [
"def",
"update_fax",
"(",
"self",
",",
"fax_id",
",",
"payload_fax_modification",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async'",
")",
":",
"return",
... | Modify fax record # noqa: E501
You can modify a fax record's comment or mark it as read # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.update_fax(fax_id, payload_fax_modification, asyn... | [
"Modify",
"fax",
"record",
"#",
"noqa",
":",
"E501"
] | 75ed2ea487a6be537342baea1077a02b0c8e70c1 | https://github.com/faxir/faxir-python/blob/75ed2ea487a6be537342baea1077a02b0c8e70c1/faxir/api/archives_api.py#L349-L370 | train | Update a specific fax record. |
talkincode/txradius | txradius/radius/dictionary.py | Dictionary.ReadDictionary | def ReadDictionary(self, file):
"""Parse a dictionary file.
Reads a RADIUS dictionary file and merges its contents into the
class instance.
:param file: Name of dictionary file to parse or a file-like object
:type file: string or file-like object
"""
fil = dict... | python | def ReadDictionary(self, file):
"""Parse a dictionary file.
Reads a RADIUS dictionary file and merges its contents into the
class instance.
:param file: Name of dictionary file to parse or a file-like object
:type file: string or file-like object
"""
fil = dict... | [
"def",
"ReadDictionary",
"(",
"self",
",",
"file",
")",
":",
"fil",
"=",
"dictfile",
".",
"DictFile",
"(",
"file",
")",
"state",
"=",
"{",
"}",
"state",
"[",
"'vendor'",
"]",
"=",
"''",
"self",
".",
"defer_parse",
"=",
"[",
"]",
"for",
"line",
"in"... | Parse a dictionary file.
Reads a RADIUS dictionary file and merges its contents into the
class instance.
:param file: Name of dictionary file to parse or a file-like object
:type file: string or file-like object | [
"Parse",
"a",
"dictionary",
"file",
".",
"Reads",
"a",
"RADIUS",
"dictionary",
"file",
"and",
"merges",
"its",
"contents",
"into",
"the",
"class",
"instance",
"."
] | b86fdbc9be41183680b82b07d3a8e8ea10926e01 | https://github.com/talkincode/txradius/blob/b86fdbc9be41183680b82b07d3a8e8ea10926e01/txradius/radius/dictionary.py#L303-L343 | train | Reads a RADIUS dictionary file and merges its contents into a single object containing the class instance. |
bitesofcode/projexui | projexui/widgets/xchartwidget/xchartscene.py | XChartScene.chartItems | def chartItems(self):
"""
Returns the chart items that are found within this scene.
:return [<XChartWidgetItem>, ..]
"""
from projexui.widgets.xchartwidget import XChartWidgetItem
return filter(lambda x: isinstance(x, XChartWidgetItem), self.items()) | python | def chartItems(self):
"""
Returns the chart items that are found within this scene.
:return [<XChartWidgetItem>, ..]
"""
from projexui.widgets.xchartwidget import XChartWidgetItem
return filter(lambda x: isinstance(x, XChartWidgetItem), self.items()) | [
"def",
"chartItems",
"(",
"self",
")",
":",
"from",
"projexui",
".",
"widgets",
".",
"xchartwidget",
"import",
"XChartWidgetItem",
"return",
"filter",
"(",
"lambda",
"x",
":",
"isinstance",
"(",
"x",
",",
"XChartWidgetItem",
")",
",",
"self",
".",
"items",
... | Returns the chart items that are found within this scene.
:return [<XChartWidgetItem>, ..] | [
"Returns",
"the",
"chart",
"items",
"that",
"are",
"found",
"within",
"this",
"scene",
".",
":",
"return",
"[",
"<XChartWidgetItem",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartscene.py#L146-L153 | train | Returns a list of all chart items that are in this scene. |
bitesofcode/projexui | projexui/widgets/xchartwidget/xchartscene.py | XChartScene.drawBackground | def drawBackground( self, painter, rect ):
"""
Draws the backgrounds for the different chart types.
:param painter | <QPainter>
rect | <QRect>
"""
if ( self._dirty ):
self.rebuild()
if ( self.showGrid() )... | python | def drawBackground( self, painter, rect ):
"""
Draws the backgrounds for the different chart types.
:param painter | <QPainter>
rect | <QRect>
"""
if ( self._dirty ):
self.rebuild()
if ( self.showGrid() )... | [
"def",
"drawBackground",
"(",
"self",
",",
"painter",
",",
"rect",
")",
":",
"if",
"(",
"self",
".",
"_dirty",
")",
":",
"self",
".",
"rebuild",
"(",
")",
"if",
"(",
"self",
".",
"showGrid",
"(",
")",
")",
":",
"self",
".",
"drawGrid",
"(",
"pain... | Draws the backgrounds for the different chart types.
:param painter | <QPainter>
rect | <QRect> | [
"Draws",
"the",
"backgrounds",
"for",
"the",
"different",
"chart",
"types",
".",
":",
"param",
"painter",
"|",
"<QPainter",
">",
"rect",
"|",
"<QRect",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartscene.py#L163-L174 | train | Draws the background for the different chart types. |
bitesofcode/projexui | projexui/widgets/xchartwidget/xchartscene.py | XChartScene.drawGrid | def drawGrid( self, painter ):
"""
Draws the rulers for this scene.
:param painter | <QPainter>
"""
# draw the minor grid lines
pen = QPen(self.borderColor())
painter.setPen(pen)
painter.setBrush(self.baseColor())
... | python | def drawGrid( self, painter ):
"""
Draws the rulers for this scene.
:param painter | <QPainter>
"""
# draw the minor grid lines
pen = QPen(self.borderColor())
painter.setPen(pen)
painter.setBrush(self.baseColor())
... | [
"def",
"drawGrid",
"(",
"self",
",",
"painter",
")",
":",
"# draw the minor grid lines\r",
"pen",
"=",
"QPen",
"(",
"self",
".",
"borderColor",
"(",
")",
")",
"painter",
".",
"setPen",
"(",
"pen",
")",
"painter",
".",
"setBrush",
"(",
"self",
".",
"baseC... | Draws the rulers for this scene.
:param painter | <QPainter> | [
"Draws",
"the",
"rulers",
"for",
"this",
"scene",
".",
":",
"param",
"painter",
"|",
"<QPainter",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartscene.py#L186-L221 | train | Draws the grid for this scene. |
bitesofcode/projexui | projexui/widgets/xchartwidget/xchartscene.py | XChartScene.drawAxis | def drawAxis( self, painter ):
"""
Draws the axis for this system.
"""
# draw the axis lines
pen = QPen(self.axisColor())
pen.setWidth(4)
painter.setPen(pen)
painter.drawLines(self._buildData['axis_lines'])
# draw the notches
... | python | def drawAxis( self, painter ):
"""
Draws the axis for this system.
"""
# draw the axis lines
pen = QPen(self.axisColor())
pen.setWidth(4)
painter.setPen(pen)
painter.drawLines(self._buildData['axis_lines'])
# draw the notches
... | [
"def",
"drawAxis",
"(",
"self",
",",
"painter",
")",
":",
"# draw the axis lines\r",
"pen",
"=",
"QPen",
"(",
"self",
".",
"axisColor",
"(",
")",
")",
"pen",
".",
"setWidth",
"(",
"4",
")",
"painter",
".",
"setPen",
"(",
"pen",
")",
"painter",
".",
"... | Draws the axis for this system. | [
"Draws",
"the",
"axis",
"for",
"this",
"system",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartscene.py#L223-L238 | train | Draws the axis for this system. |
bitesofcode/projexui | projexui/widgets/xchartwidget/xchartscene.py | XChartScene.enterEvent | def enterEvent( self, event ):
"""
Toggles the display for the tracker item.
"""
item = self.trackerItem()
if ( item ):
item.setVisible(True) | python | def enterEvent( self, event ):
"""
Toggles the display for the tracker item.
"""
item = self.trackerItem()
if ( item ):
item.setVisible(True) | [
"def",
"enterEvent",
"(",
"self",
",",
"event",
")",
":",
"item",
"=",
"self",
".",
"trackerItem",
"(",
")",
"if",
"(",
"item",
")",
":",
"item",
".",
"setVisible",
"(",
"True",
")"
] | Toggles the display for the tracker item. | [
"Toggles",
"the",
"display",
"for",
"the",
"tracker",
"item",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartscene.py#L240-L246 | train | Toggles the display for the tracker item. |
bitesofcode/projexui | projexui/widgets/xchartwidget/xchartscene.py | XChartScene.eventFilter | def eventFilter( self, object, event ):
"""
Filters the chart widget for the resize event to modify this scenes
rect.
:param object | <QObject>
event | <QEvent>
"""
if ( event.type() != event.Resize ):
return False
... | python | def eventFilter( self, object, event ):
"""
Filters the chart widget for the resize event to modify this scenes
rect.
:param object | <QObject>
event | <QEvent>
"""
if ( event.type() != event.Resize ):
return False
... | [
"def",
"eventFilter",
"(",
"self",
",",
"object",
",",
"event",
")",
":",
"if",
"(",
"event",
".",
"type",
"(",
")",
"!=",
"event",
".",
"Resize",
")",
":",
"return",
"False",
"size",
"=",
"event",
".",
"size",
"(",
")",
"w",
"=",
"size",
".",
... | Filters the chart widget for the resize event to modify this scenes
rect.
:param object | <QObject>
event | <QEvent> | [
"Filters",
"the",
"chart",
"widget",
"for",
"the",
"resize",
"event",
"to",
"modify",
"this",
"scenes",
"rect",
".",
":",
"param",
"object",
"|",
"<QObject",
">",
"event",
"|",
"<QEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartscene.py#L248-L304 | train | Returns True if the object and event are modified. |
bitesofcode/projexui | projexui/widgets/xchartwidget/xchartscene.py | XChartScene.leaveEvent | def leaveEvent( self, event ):
"""
Toggles the display for the tracker item.
"""
item = self.trackerItem()
if ( item ):
item.setVisible(False) | python | def leaveEvent( self, event ):
"""
Toggles the display for the tracker item.
"""
item = self.trackerItem()
if ( item ):
item.setVisible(False) | [
"def",
"leaveEvent",
"(",
"self",
",",
"event",
")",
":",
"item",
"=",
"self",
".",
"trackerItem",
"(",
")",
"if",
"(",
"item",
")",
":",
"item",
".",
"setVisible",
"(",
"False",
")"
] | Toggles the display for the tracker item. | [
"Toggles",
"the",
"display",
"for",
"the",
"tracker",
"item",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartscene.py#L347-L353 | train | Toggles the display for the tracker item. |
bitesofcode/projexui | projexui/widgets/xchartwidget/xchartscene.py | XChartScene.mapFromChart | def mapFromChart( self, x, y ):
"""
Maps a chart point to a pixel position within the grid based on the
rulers.
:param x | <variant>
y | <variant>
:return <QPointF>
"""
grid = self.gridRect()
h... | python | def mapFromChart( self, x, y ):
"""
Maps a chart point to a pixel position within the grid based on the
rulers.
:param x | <variant>
y | <variant>
:return <QPointF>
"""
grid = self.gridRect()
h... | [
"def",
"mapFromChart",
"(",
"self",
",",
"x",
",",
"y",
")",
":",
"grid",
"=",
"self",
".",
"gridRect",
"(",
")",
"hruler",
"=",
"self",
".",
"horizontalRuler",
"(",
")",
"vruler",
"=",
"self",
".",
"verticalRuler",
"(",
")",
"xperc",
"=",
"hruler",
... | Maps a chart point to a pixel position within the grid based on the
rulers.
:param x | <variant>
y | <variant>
:return <QPointF> | [
"Maps",
"a",
"chart",
"point",
"to",
"a",
"pixel",
"position",
"within",
"the",
"grid",
"based",
"on",
"the",
"rulers",
".",
":",
"param",
"x",
"|",
"<variant",
">",
"y",
"|",
"<variant",
">",
":",
"return",
"<QPointF",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartscene.py#L355-L378 | train | Maps a chart point to a pixel position within the grid. |
bitesofcode/projexui | projexui/widgets/xchartwidget/xchartscene.py | XChartScene.mouseMoveEvent | def mouseMoveEvent( self, event ):
"""
Overloads the moving event to move the tracker item.
:param event | <QEvent>
"""
super(XChartScene, self).mouseMoveEvent(event)
self.updateTrackerItem(event.scenePos()) | python | def mouseMoveEvent( self, event ):
"""
Overloads the moving event to move the tracker item.
:param event | <QEvent>
"""
super(XChartScene, self).mouseMoveEvent(event)
self.updateTrackerItem(event.scenePos()) | [
"def",
"mouseMoveEvent",
"(",
"self",
",",
"event",
")",
":",
"super",
"(",
"XChartScene",
",",
"self",
")",
".",
"mouseMoveEvent",
"(",
"event",
")",
"self",
".",
"updateTrackerItem",
"(",
"event",
".",
"scenePos",
"(",
")",
")"
] | Overloads the moving event to move the tracker item.
:param event | <QEvent> | [
"Overloads",
"the",
"moving",
"event",
"to",
"move",
"the",
"tracker",
"item",
".",
":",
"param",
"event",
"|",
"<QEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartscene.py#L380-L388 | train | Updates the current position of the item in the tracker. |
bitesofcode/projexui | projexui/widgets/xchartwidget/xchartscene.py | XChartScene.rebuild | def rebuild( self ):
"""
Rebuilds the data for this scene to draw with.
"""
global XChartWidgetItem
if ( XChartWidgetItem is None ):
from projexui.widgets.xchartwidget.xchartwidgetitem \
import XChartWidgetItem
self._buildData = {... | python | def rebuild( self ):
"""
Rebuilds the data for this scene to draw with.
"""
global XChartWidgetItem
if ( XChartWidgetItem is None ):
from projexui.widgets.xchartwidget.xchartwidgetitem \
import XChartWidgetItem
self._buildData = {... | [
"def",
"rebuild",
"(",
"self",
")",
":",
"global",
"XChartWidgetItem",
"if",
"(",
"XChartWidgetItem",
"is",
"None",
")",
":",
"from",
"projexui",
".",
"widgets",
".",
"xchartwidget",
".",
"xchartwidgetitem",
"import",
"XChartWidgetItem",
"self",
".",
"_buildData... | Rebuilds the data for this scene to draw with. | [
"Rebuilds",
"the",
"data",
"for",
"this",
"scene",
"to",
"draw",
"with",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartscene.py#L407-L486 | train | Rebuilds the data for this scene. |
bitesofcode/projexui | projexui/widgets/xchartwidget/xchartscene.py | XChartScene.rebuildGrid | def rebuildGrid( self ):
"""
Rebuilds the ruler data.
"""
vruler = self.verticalRuler()
hruler = self.horizontalRuler()
rect = self._buildData['grid_rect']
# process the vertical ruler
h_lines = []
h_alt = [... | python | def rebuildGrid( self ):
"""
Rebuilds the ruler data.
"""
vruler = self.verticalRuler()
hruler = self.horizontalRuler()
rect = self._buildData['grid_rect']
# process the vertical ruler
h_lines = []
h_alt = [... | [
"def",
"rebuildGrid",
"(",
"self",
")",
":",
"vruler",
"=",
"self",
".",
"verticalRuler",
"(",
")",
"hruler",
"=",
"self",
".",
"horizontalRuler",
"(",
")",
"rect",
"=",
"self",
".",
"_buildData",
"[",
"'grid_rect'",
"]",
"# process the vertical ruler\r",
"h... | Rebuilds the ruler data. | [
"Rebuilds",
"the",
"ruler",
"data",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartscene.py#L488-L582 | train | Rebuilds the grid data. |
bitesofcode/projexui | projexui/widgets/xchartwidget/xchartscene.py | XChartScene.setChartType | def setChartType( self, chartType ):
"""
Sets the chart type for this scene to the inputed type.
:param chartType | <XChartScene.Type>
"""
self._chartType = chartType
self.setDirty()
# setup default options
if ( chartType =... | python | def setChartType( self, chartType ):
"""
Sets the chart type for this scene to the inputed type.
:param chartType | <XChartScene.Type>
"""
self._chartType = chartType
self.setDirty()
# setup default options
if ( chartType =... | [
"def",
"setChartType",
"(",
"self",
",",
"chartType",
")",
":",
"self",
".",
"_chartType",
"=",
"chartType",
"self",
".",
"setDirty",
"(",
")",
"# setup default options\r",
"if",
"(",
"chartType",
"==",
"XChartScene",
".",
"Type",
".",
"Pie",
")",
":",
"se... | Sets the chart type for this scene to the inputed type.
:param chartType | <XChartScene.Type> | [
"Sets",
"the",
"chart",
"type",
"for",
"this",
"scene",
"to",
"the",
"inputed",
"type",
".",
":",
"param",
"chartType",
"|",
"<XChartScene",
".",
"Type",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartscene.py#L595-L628 | train | Sets the chart type for this scene. |
bitesofcode/projexui | projexui/widgets/xchartwidget/xchartscene.py | XChartScene.setSceneRect | def setSceneRect( self, *args ):
"""
Overloads the set scene rect to handle rebuild information.
"""
super(XChartScene, self).setSceneRect(*args)
self._dirty = True | python | def setSceneRect( self, *args ):
"""
Overloads the set scene rect to handle rebuild information.
"""
super(XChartScene, self).setSceneRect(*args)
self._dirty = True | [
"def",
"setSceneRect",
"(",
"self",
",",
"*",
"args",
")",
":",
"super",
"(",
"XChartScene",
",",
"self",
")",
".",
"setSceneRect",
"(",
"*",
"args",
")",
"self",
".",
"_dirty",
"=",
"True"
] | Overloads the set scene rect to handle rebuild information. | [
"Overloads",
"the",
"set",
"scene",
"rect",
"to",
"handle",
"rebuild",
"information",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartscene.py#L676-L681 | train | Sets the rect of the current scene. |
bitesofcode/projexui | projexui/widgets/xchartwidget/xchartscene.py | XChartScene.trackerItem | def trackerItem( self ):
"""
Returns the tracker item for this chart.
:return <XChartTrackerItem> || None
"""
# check for the tracking enabled state
if not self.isTrackingEnabled():
return None
# generate a new tracker i... | python | def trackerItem( self ):
"""
Returns the tracker item for this chart.
:return <XChartTrackerItem> || None
"""
# check for the tracking enabled state
if not self.isTrackingEnabled():
return None
# generate a new tracker i... | [
"def",
"trackerItem",
"(",
"self",
")",
":",
"# check for the tracking enabled state\r",
"if",
"not",
"self",
".",
"isTrackingEnabled",
"(",
")",
":",
"return",
"None",
"# generate a new tracker item\r",
"if",
"not",
"(",
"self",
".",
"_trackerItem",
"and",
"self",
... | Returns the tracker item for this chart.
:return <XChartTrackerItem> || None | [
"Returns",
"the",
"tracker",
"item",
"for",
"this",
"chart",
".",
":",
"return",
"<XChartTrackerItem",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartscene.py#L756-L772 | train | Returns the first tracker item for this chart or None if there is no tracker item for this chart. |
bitesofcode/projexui | projexui/widgets/xchartwidget/xchartscene.py | XChartScene.updateTrackerItem | def updateTrackerItem( self, point = None ):
"""
Updates the tracker item information.
"""
item = self.trackerItem()
if not item:
return
gridRect = self._buildData.get('grid_rect')
if ( not (gridRect and gridRect.isValid()) ... | python | def updateTrackerItem( self, point = None ):
"""
Updates the tracker item information.
"""
item = self.trackerItem()
if not item:
return
gridRect = self._buildData.get('grid_rect')
if ( not (gridRect and gridRect.isValid()) ... | [
"def",
"updateTrackerItem",
"(",
"self",
",",
"point",
"=",
"None",
")",
":",
"item",
"=",
"self",
".",
"trackerItem",
"(",
")",
"if",
"not",
"item",
":",
"return",
"gridRect",
"=",
"self",
".",
"_buildData",
".",
"get",
"(",
"'grid_rect'",
")",
"if",
... | Updates the tracker item information. | [
"Updates",
"the",
"tracker",
"item",
"information",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartscene.py#L774-L803 | train | Updates the tracker item information. |
bitesofcode/projexui | projexui/widgets/xchartwidget/xchartscene.py | XChartScene.valueAt | def valueAt( self, point ):
"""
Returns the X, Y value for the given point.
:param point | <QPoint>
:return (<variant> x, <variant> y)
"""
x = point.x()
y = point.y()
hruler = self.horizontalRuler()
v... | python | def valueAt( self, point ):
"""
Returns the X, Y value for the given point.
:param point | <QPoint>
:return (<variant> x, <variant> y)
"""
x = point.x()
y = point.y()
hruler = self.horizontalRuler()
v... | [
"def",
"valueAt",
"(",
"self",
",",
"point",
")",
":",
"x",
"=",
"point",
".",
"x",
"(",
")",
"y",
"=",
"point",
".",
"y",
"(",
")",
"hruler",
"=",
"self",
".",
"horizontalRuler",
"(",
")",
"vruler",
"=",
"self",
".",
"verticalRuler",
"(",
")",
... | Returns the X, Y value for the given point.
:param point | <QPoint>
:return (<variant> x, <variant> y) | [
"Returns",
"the",
"X",
"Y",
"value",
"for",
"the",
"given",
"point",
".",
":",
"param",
"point",
"|",
"<QPoint",
">",
":",
"return",
"(",
"<variant",
">",
"x",
"<variant",
">",
"y",
")"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartscene.py#L805-L826 | train | Returns the value at the given point. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationItem.initialize | def initialize( self ):
"""
Begins to load the item data for each tree level.
:return <bool> | success
"""
if ( self._initialized ):
return True
self._initialized = True
# load the item's children
model = self.mod... | python | def initialize( self ):
"""
Begins to load the item data for each tree level.
:return <bool> | success
"""
if ( self._initialized ):
return True
self._initialized = True
# load the item's children
model = self.mod... | [
"def",
"initialize",
"(",
"self",
")",
":",
"if",
"(",
"self",
".",
"_initialized",
")",
":",
"return",
"True",
"self",
".",
"_initialized",
"=",
"True",
"# load the item's children",
"model",
"=",
"self",
".",
"model",
"(",
")",
"signalsBlocked",
"=",
"Fa... | Begins to load the item data for each tree level.
:return <bool> | success | [
"Begins",
"to",
"load",
"the",
"item",
"data",
"for",
"each",
"tree",
"level",
".",
":",
"return",
"<bool",
">",
"|",
"success"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L52-L75 | train | Initializes the item data for each tree level. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationModel.itemPath | def itemPath( self, item ):
"""
Returns the path for the inputed item based on its hierarchy.
:return <str>
"""
path = []
while ( item ):
path.insert(0, nativestring(item.text()))
item = item.parent()
sep = self.separa... | python | def itemPath( self, item ):
"""
Returns the path for the inputed item based on its hierarchy.
:return <str>
"""
path = []
while ( item ):
path.insert(0, nativestring(item.text()))
item = item.parent()
sep = self.separa... | [
"def",
"itemPath",
"(",
"self",
",",
"item",
")",
":",
"path",
"=",
"[",
"]",
"while",
"(",
"item",
")",
":",
"path",
".",
"insert",
"(",
"0",
",",
"nativestring",
"(",
"item",
".",
"text",
"(",
")",
")",
")",
"item",
"=",
"item",
".",
"parent"... | Returns the path for the inputed item based on its hierarchy.
:return <str> | [
"Returns",
"the",
"path",
"for",
"the",
"inputed",
"item",
"based",
"on",
"its",
"hierarchy",
".",
":",
"return",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L96-L108 | train | Returns the path for the inputed item based on its hierarchy. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationModel.itemByPath | def itemByPath( self, path, includeRoot = False ):
"""
Loads the items for the given path.
:param path | <str>
includeRoot | <bool>
"""
sep = self.separator()
path = nativestring(path).strip(sep)
if ( not path ):
... | python | def itemByPath( self, path, includeRoot = False ):
"""
Loads the items for the given path.
:param path | <str>
includeRoot | <bool>
"""
sep = self.separator()
path = nativestring(path).strip(sep)
if ( not path ):
... | [
"def",
"itemByPath",
"(",
"self",
",",
"path",
",",
"includeRoot",
"=",
"False",
")",
":",
"sep",
"=",
"self",
".",
"separator",
"(",
")",
"path",
"=",
"nativestring",
"(",
"path",
")",
".",
"strip",
"(",
"sep",
")",
"if",
"(",
"not",
"path",
")",
... | Loads the items for the given path.
:param path | <str>
includeRoot | <bool> | [
"Loads",
"the",
"items",
"for",
"the",
"given",
"path",
".",
":",
"param",
"path",
"|",
"<str",
">",
"includeRoot",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L110-L142 | train | Loads the items for the given path. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationModel.setTopLevelItems | def setTopLevelItems( self, items ):
"""
Sets the root item for this model to the inputed item.
:param item | <XNavigationItem>
"""
self.blockSignals(True)
root = self.invisibleRootItem()
for row in range(root.rowCount()):
root.t... | python | def setTopLevelItems( self, items ):
"""
Sets the root item for this model to the inputed item.
:param item | <XNavigationItem>
"""
self.blockSignals(True)
root = self.invisibleRootItem()
for row in range(root.rowCount()):
root.t... | [
"def",
"setTopLevelItems",
"(",
"self",
",",
"items",
")",
":",
"self",
".",
"blockSignals",
"(",
"True",
")",
"root",
"=",
"self",
".",
"invisibleRootItem",
"(",
")",
"for",
"row",
"in",
"range",
"(",
"root",
".",
"rowCount",
"(",
")",
")",
":",
"ro... | Sets the root item for this model to the inputed item.
:param item | <XNavigationItem> | [
"Sets",
"the",
"root",
"item",
"for",
"this",
"model",
"to",
"the",
"inputed",
"item",
".",
":",
"param",
"item",
"|",
"<XNavigationItem",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L160-L175 | train | Sets the root items for this model to the inputed items. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationCompleter.pathFromIndex | def pathFromIndex( self, index ):
"""
Returns the full path from the inputed index on.
:param index | <QModelIndex>
:return <str>
"""
item = self.model().itemFromIndex(index)
return self.model().itemPath(item) | python | def pathFromIndex( self, index ):
"""
Returns the full path from the inputed index on.
:param index | <QModelIndex>
:return <str>
"""
item = self.model().itemFromIndex(index)
return self.model().itemPath(item) | [
"def",
"pathFromIndex",
"(",
"self",
",",
"index",
")",
":",
"item",
"=",
"self",
".",
"model",
"(",
")",
".",
"itemFromIndex",
"(",
"index",
")",
"return",
"self",
".",
"model",
"(",
")",
".",
"itemPath",
"(",
"item",
")"
] | Returns the full path from the inputed index on.
:param index | <QModelIndex>
:return <str> | [
"Returns",
"the",
"full",
"path",
"from",
"the",
"inputed",
"index",
"on",
".",
":",
"param",
"index",
"|",
"<QModelIndex",
">",
":",
"return",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L185-L194 | train | Returns the full path from the inputed index on. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationCompleter.splitPath | def splitPath( self, path ):
"""
Splits the path into its components.
:param path | <str>
:return [<str>, ..]
"""
sep = self.model().separator()
splt = nativestring(path).lstrip(sep).split(sep)
if ( splt and not splt[-1]... | python | def splitPath( self, path ):
"""
Splits the path into its components.
:param path | <str>
:return [<str>, ..]
"""
sep = self.model().separator()
splt = nativestring(path).lstrip(sep).split(sep)
if ( splt and not splt[-1]... | [
"def",
"splitPath",
"(",
"self",
",",
"path",
")",
":",
"sep",
"=",
"self",
".",
"model",
"(",
")",
".",
"separator",
"(",
")",
"splt",
"=",
"nativestring",
"(",
"path",
")",
".",
"lstrip",
"(",
"sep",
")",
".",
"split",
"(",
"sep",
")",
"if",
... | Splits the path into its components.
:param path | <str>
:return [<str>, ..] | [
"Splits",
"the",
"path",
"into",
"its",
"components",
".",
":",
"param",
"path",
"|",
"<str",
">",
":",
"return",
"[",
"<str",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L196-L210 | train | Splits the path into its components. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationEdit.acceptEdit | def acceptEdit( self ):
"""
Accepts the current text and rebuilds the parts widget.
"""
if ( self._partsWidget.isVisible() ):
return False
use_completion = self.completer().popup().isVisible()
completion = self.completer().currentCompleti... | python | def acceptEdit( self ):
"""
Accepts the current text and rebuilds the parts widget.
"""
if ( self._partsWidget.isVisible() ):
return False
use_completion = self.completer().popup().isVisible()
completion = self.completer().currentCompleti... | [
"def",
"acceptEdit",
"(",
"self",
")",
":",
"if",
"(",
"self",
".",
"_partsWidget",
".",
"isVisible",
"(",
")",
")",
":",
"return",
"False",
"use_completion",
"=",
"self",
".",
"completer",
"(",
")",
".",
"popup",
"(",
")",
".",
"isVisible",
"(",
")"... | Accepts the current text and rebuilds the parts widget. | [
"Accepts",
"the",
"current",
"text",
"and",
"rebuilds",
"the",
"parts",
"widget",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L298-L317 | train | Accepts the current text and rebuilds the parts widget. Returns True if the text is accepted False otherwise. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationEdit.cancelEdit | def cancelEdit( self ):
"""
Rejects the current edit and shows the parts widget.
"""
if ( self._partsWidget.isVisible() ):
return False
self._completerTree.hide()
self.completer().popup().hide()
self.setText(self._origina... | python | def cancelEdit( self ):
"""
Rejects the current edit and shows the parts widget.
"""
if ( self._partsWidget.isVisible() ):
return False
self._completerTree.hide()
self.completer().popup().hide()
self.setText(self._origina... | [
"def",
"cancelEdit",
"(",
"self",
")",
":",
"if",
"(",
"self",
".",
"_partsWidget",
".",
"isVisible",
"(",
")",
")",
":",
"return",
"False",
"self",
".",
"_completerTree",
".",
"hide",
"(",
")",
"self",
".",
"completer",
"(",
")",
".",
"popup",
"(",
... | Rejects the current edit and shows the parts widget. | [
"Rejects",
"the",
"current",
"edit",
"and",
"shows",
"the",
"parts",
"widget",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L319-L331 | train | Cancels the current edit and shows the parts widget. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationEdit.currentItem | def currentItem( self ):
"""
Returns the current navigation item from the current path.
:return <XNavigationItem> || None
"""
model = self.navigationModel()
if ( not model ):
return None
return model.itemByPath(self.text()) | python | def currentItem( self ):
"""
Returns the current navigation item from the current path.
:return <XNavigationItem> || None
"""
model = self.navigationModel()
if ( not model ):
return None
return model.itemByPath(self.text()) | [
"def",
"currentItem",
"(",
"self",
")",
":",
"model",
"=",
"self",
".",
"navigationModel",
"(",
")",
"if",
"(",
"not",
"model",
")",
":",
"return",
"None",
"return",
"model",
".",
"itemByPath",
"(",
"self",
".",
"text",
"(",
")",
")"
] | Returns the current navigation item from the current path.
:return <XNavigationItem> || None | [
"Returns",
"the",
"current",
"navigation",
"item",
"from",
"the",
"current",
"path",
".",
":",
"return",
"<XNavigationItem",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L333-L343 | train | Returns the current item from the current path. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationEdit.eventFilter | def eventFilter( self, object, event ):
"""
Filters the events for the inputed object through this edit.
:param object | <QObject>
event | <QEvent>
:return <bool> | consumed
"""
if ( event.type() == event.KeyPress ):
... | python | def eventFilter( self, object, event ):
"""
Filters the events for the inputed object through this edit.
:param object | <QObject>
event | <QEvent>
:return <bool> | consumed
"""
if ( event.type() == event.KeyPress ):
... | [
"def",
"eventFilter",
"(",
"self",
",",
"object",
",",
"event",
")",
":",
"if",
"(",
"event",
".",
"type",
"(",
")",
"==",
"event",
".",
"KeyPress",
")",
":",
"if",
"(",
"event",
".",
"key",
"(",
")",
"==",
"Qt",
".",
"Key_Escape",
")",
":",
"s... | Filters the events for the inputed object through this edit.
:param object | <QObject>
event | <QEvent>
:return <bool> | consumed | [
"Filters",
"the",
"events",
"for",
"the",
"inputed",
"object",
"through",
"this",
"edit",
".",
":",
"param",
"object",
"|",
"<QObject",
">",
"event",
"|",
"<QEvent",
">",
":",
"return",
"<bool",
">",
"|",
"consumed"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L345-L381 | train | Filters the events for the inputed object through this edit. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationEdit.focusOutEvent | def focusOutEvent( self, event ):
"""
Overloads the focus out event to cancel editing when the widget loses
focus.
:param event | <QFocusEvent>
"""
super(XNavigationEdit, self).focusOutEvent(event)
self.cancelEdit() | python | def focusOutEvent( self, event ):
"""
Overloads the focus out event to cancel editing when the widget loses
focus.
:param event | <QFocusEvent>
"""
super(XNavigationEdit, self).focusOutEvent(event)
self.cancelEdit() | [
"def",
"focusOutEvent",
"(",
"self",
",",
"event",
")",
":",
"super",
"(",
"XNavigationEdit",
",",
"self",
")",
".",
"focusOutEvent",
"(",
"event",
")",
"self",
".",
"cancelEdit",
"(",
")"
] | Overloads the focus out event to cancel editing when the widget loses
focus.
:param event | <QFocusEvent> | [
"Overloads",
"the",
"focus",
"out",
"event",
"to",
"cancel",
"editing",
"when",
"the",
"widget",
"loses",
"focus",
".",
":",
"param",
"event",
"|",
"<QFocusEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L383-L392 | train | Cancel editing when the focus out event is pressed. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationEdit.handleButtonClick | def handleButtonClick( self, button ):
"""
Handle the event when a user clicks on one of the part buttons.
:param button | <QToolButton>
"""
path = button.property('path')
is_completer = button.property('is_completer')
# popup ... | python | def handleButtonClick( self, button ):
"""
Handle the event when a user clicks on one of the part buttons.
:param button | <QToolButton>
"""
path = button.property('path')
is_completer = button.property('is_completer')
# popup ... | [
"def",
"handleButtonClick",
"(",
"self",
",",
"button",
")",
":",
"path",
"=",
"button",
".",
"property",
"(",
"'path'",
")",
"is_completer",
"=",
"button",
".",
"property",
"(",
"'is_completer'",
")",
"# popup a completion menu",
"if",
"(",
"unwrapVariant",
"... | Handle the event when a user clicks on one of the part buttons.
:param button | <QToolButton> | [
"Handle",
"the",
"event",
"when",
"a",
"user",
"clicks",
"on",
"one",
"of",
"the",
"part",
"buttons",
".",
":",
"param",
"button",
"|",
"<QToolButton",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L394-L444 | train | Handles the event when a user clicks on one of the part buttons. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationEdit.keyPressEvent | def keyPressEvent( self, event ):
"""
Overloads the key press event to listen for escape calls to cancel the
parts editing.
:param event | <QKeyPressEvent>
"""
if ( self.scrollWidget().isHidden() ):
if ( event.key() == Qt.Key_Escape ):
... | python | def keyPressEvent( self, event ):
"""
Overloads the key press event to listen for escape calls to cancel the
parts editing.
:param event | <QKeyPressEvent>
"""
if ( self.scrollWidget().isHidden() ):
if ( event.key() == Qt.Key_Escape ):
... | [
"def",
"keyPressEvent",
"(",
"self",
",",
"event",
")",
":",
"if",
"(",
"self",
".",
"scrollWidget",
"(",
")",
".",
"isHidden",
"(",
")",
")",
":",
"if",
"(",
"event",
".",
"key",
"(",
")",
"==",
"Qt",
".",
"Key_Escape",
")",
":",
"self",
".",
... | Overloads the key press event to listen for escape calls to cancel the
parts editing.
:param event | <QKeyPressEvent> | [
"Overloads",
"the",
"key",
"press",
"event",
"to",
"listen",
"for",
"escape",
"calls",
"to",
"cancel",
"the",
"parts",
"editing",
".",
":",
"param",
"event",
"|",
"<QKeyPressEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L446-L466 | train | Handles the key press event for the current item. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationEdit.mouseDoubleClickEvent | def mouseDoubleClickEvent( self, event ):
"""
Overloads the system to enable editing when a user double clicks.
:param event | <QMouseEvent>
"""
super(XNavigationEdit, self).mouseDoubleClickEvent(event)
self.startEdit() | python | def mouseDoubleClickEvent( self, event ):
"""
Overloads the system to enable editing when a user double clicks.
:param event | <QMouseEvent>
"""
super(XNavigationEdit, self).mouseDoubleClickEvent(event)
self.startEdit() | [
"def",
"mouseDoubleClickEvent",
"(",
"self",
",",
"event",
")",
":",
"super",
"(",
"XNavigationEdit",
",",
"self",
")",
".",
"mouseDoubleClickEvent",
"(",
"event",
")",
"self",
".",
"startEdit",
"(",
")"
] | Overloads the system to enable editing when a user double clicks.
:param event | <QMouseEvent> | [
"Overloads",
"the",
"system",
"to",
"enable",
"editing",
"when",
"a",
"user",
"double",
"clicks",
".",
":",
"param",
"event",
"|",
"<QMouseEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L468-L476 | train | Enables editing when a user double clicks on the navigation. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationEdit.navigateToIndex | def navigateToIndex( self, index ):
"""
Navigates to the inputed action's path.
:param action | <QAction>
"""
self._completerTree.hide()
item = self._navigationModel.itemFromIndex(index)
self.setText(self._navigationModel.itemPath(item)) | python | def navigateToIndex( self, index ):
"""
Navigates to the inputed action's path.
:param action | <QAction>
"""
self._completerTree.hide()
item = self._navigationModel.itemFromIndex(index)
self.setText(self._navigationModel.itemPath(item)) | [
"def",
"navigateToIndex",
"(",
"self",
",",
"index",
")",
":",
"self",
".",
"_completerTree",
".",
"hide",
"(",
")",
"item",
"=",
"self",
".",
"_navigationModel",
".",
"itemFromIndex",
"(",
"index",
")",
"self",
".",
"setText",
"(",
"self",
".",
"_naviga... | Navigates to the inputed action's path.
:param action | <QAction> | [
"Navigates",
"to",
"the",
"inputed",
"action",
"s",
"path",
".",
":",
"param",
"action",
"|",
"<QAction",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L486-L494 | train | Navigates to the inputed action s path. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationEdit.parts | def parts( self ):
"""
Returns the parts that are used for this system.
:return [<str>, ..]
"""
path = nativestring(self.text()).strip(self.separator())
if ( not path ):
return []
return path.split(self.separator()) | python | def parts( self ):
"""
Returns the parts that are used for this system.
:return [<str>, ..]
"""
path = nativestring(self.text()).strip(self.separator())
if ( not path ):
return []
return path.split(self.separator()) | [
"def",
"parts",
"(",
"self",
")",
":",
"path",
"=",
"nativestring",
"(",
"self",
".",
"text",
"(",
")",
")",
".",
"strip",
"(",
"self",
".",
"separator",
"(",
")",
")",
"if",
"(",
"not",
"path",
")",
":",
"return",
"[",
"]",
"return",
"path",
"... | Returns the parts that are used for this system.
:return [<str>, ..] | [
"Returns",
"the",
"parts",
"that",
"are",
"used",
"for",
"this",
"system",
".",
":",
"return",
"[",
"<str",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L496-L505 | train | Returns the parts that are used for this system. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationEdit.startEdit | def startEdit( self ):
"""
Rebuilds the pathing based on the parts.
"""
self._originalText = self.text()
self.scrollWidget().hide()
self.setFocus()
self.selectAll() | python | def startEdit( self ):
"""
Rebuilds the pathing based on the parts.
"""
self._originalText = self.text()
self.scrollWidget().hide()
self.setFocus()
self.selectAll() | [
"def",
"startEdit",
"(",
"self",
")",
":",
"self",
".",
"_originalText",
"=",
"self",
".",
"text",
"(",
")",
"self",
".",
"scrollWidget",
"(",
")",
".",
"hide",
"(",
")",
"self",
".",
"setFocus",
"(",
")",
"self",
".",
"selectAll",
"(",
")"
] | Rebuilds the pathing based on the parts. | [
"Rebuilds",
"the",
"pathing",
"based",
"on",
"the",
"parts",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L515-L522 | train | Rebuilds the pathing based on the parts of the text and selects the parts. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationEdit.rebuild | def rebuild( self ):
"""
Rebuilds the parts widget with the latest text.
"""
navitem = self.currentItem()
if ( navitem ):
navitem.initialize()
self.setUpdatesEnabled(False)
self.scrollWidget().show()
self._originalText = ''
... | python | def rebuild( self ):
"""
Rebuilds the parts widget with the latest text.
"""
navitem = self.currentItem()
if ( navitem ):
navitem.initialize()
self.setUpdatesEnabled(False)
self.scrollWidget().show()
self._originalText = ''
... | [
"def",
"rebuild",
"(",
"self",
")",
":",
"navitem",
"=",
"self",
".",
"currentItem",
"(",
")",
"if",
"(",
"navitem",
")",
":",
"navitem",
".",
"initialize",
"(",
")",
"self",
".",
"setUpdatesEnabled",
"(",
"False",
")",
"self",
".",
"scrollWidget",
"("... | Rebuilds the parts widget with the latest text. | [
"Rebuilds",
"the",
"parts",
"widget",
"with",
"the",
"latest",
"text",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L524-L606 | train | Rebuilds the parts widget with the latest text. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationEdit.resizeEvent | def resizeEvent( self, event ):
"""
Resizes the current widget and its parts widget.
:param event | <QResizeEvent>
"""
super(XNavigationEdit, self).resizeEvent(event)
w = self.width()
h = self.height()
self._scrollWidget.res... | python | def resizeEvent( self, event ):
"""
Resizes the current widget and its parts widget.
:param event | <QResizeEvent>
"""
super(XNavigationEdit, self).resizeEvent(event)
w = self.width()
h = self.height()
self._scrollWidget.res... | [
"def",
"resizeEvent",
"(",
"self",
",",
"event",
")",
":",
"super",
"(",
"XNavigationEdit",
",",
"self",
")",
".",
"resizeEvent",
"(",
"event",
")",
"w",
"=",
"self",
".",
"width",
"(",
")",
"h",
"=",
"self",
".",
"height",
"(",
")",
"self",
".",
... | Resizes the current widget and its parts widget.
:param event | <QResizeEvent> | [
"Resizes",
"the",
"current",
"widget",
"and",
"its",
"parts",
"widget",
".",
":",
"param",
"event",
"|",
"<QResizeEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L608-L622 | train | Resizes the current widget and its parts widget. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationEdit.scrollParts | def scrollParts( self, amount ):
"""
Scrolls the parts to offset the scrolling amount.
:param amount | <int>
"""
change = self._scrollAmount - amount
self._partsWidget.scroll(change, 0)
self._scrollAmount = amount | python | def scrollParts( self, amount ):
"""
Scrolls the parts to offset the scrolling amount.
:param amount | <int>
"""
change = self._scrollAmount - amount
self._partsWidget.scroll(change, 0)
self._scrollAmount = amount | [
"def",
"scrollParts",
"(",
"self",
",",
"amount",
")",
":",
"change",
"=",
"self",
".",
"_scrollAmount",
"-",
"amount",
"self",
".",
"_partsWidget",
".",
"scroll",
"(",
"change",
",",
"0",
")",
"self",
".",
"_scrollAmount",
"=",
"amount"
] | Scrolls the parts to offset the scrolling amount.
:param amount | <int> | [
"Scrolls",
"the",
"parts",
"to",
"offset",
"the",
"scrolling",
"amount",
".",
":",
"param",
"amount",
"|",
"<int",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L624-L632 | train | Scrolls the parts to the specified amount. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationEdit.setTopLevelItems | def setTopLevelItems( self, items ):
"""
Initializes the navigation system to start with the inputed root \
item.
:param item | <XNavigationItem>
"""
if ( not self._navigationModel ):
self.setNavigationModel(XNavigationModel(self))
... | python | def setTopLevelItems( self, items ):
"""
Initializes the navigation system to start with the inputed root \
item.
:param item | <XNavigationItem>
"""
if ( not self._navigationModel ):
self.setNavigationModel(XNavigationModel(self))
... | [
"def",
"setTopLevelItems",
"(",
"self",
",",
"items",
")",
":",
"if",
"(",
"not",
"self",
".",
"_navigationModel",
")",
":",
"self",
".",
"setNavigationModel",
"(",
"XNavigationModel",
"(",
"self",
")",
")",
"self",
".",
"_navigationModel",
".",
"setTopLevel... | Initializes the navigation system to start with the inputed root \
item.
:param item | <XNavigationItem> | [
"Initializes",
"the",
"navigation",
"system",
"to",
"start",
"with",
"the",
"inputed",
"root",
"\\",
"item",
".",
":",
"param",
"item",
"|",
"<XNavigationItem",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L650-L660 | train | Sets the top level items of the navigation system. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationEdit.setNavigationModel | def setNavigationModel( self, model ):
"""
Sets the navigation model for this edit.
:param model | <XNavigationModel>
"""
self._navigationModel = model
self._completerTree.setModel(model)
if ( model ):
model.setSeparator(self.sep... | python | def setNavigationModel( self, model ):
"""
Sets the navigation model for this edit.
:param model | <XNavigationModel>
"""
self._navigationModel = model
self._completerTree.setModel(model)
if ( model ):
model.setSeparator(self.sep... | [
"def",
"setNavigationModel",
"(",
"self",
",",
"model",
")",
":",
"self",
".",
"_navigationModel",
"=",
"model",
"self",
".",
"_completerTree",
".",
"setModel",
"(",
"model",
")",
"if",
"(",
"model",
")",
":",
"model",
".",
"setSeparator",
"(",
"self",
"... | Sets the navigation model for this edit.
:param model | <XNavigationModel> | [
"Sets",
"the",
"navigation",
"model",
"for",
"this",
"edit",
".",
":",
"param",
"model",
"|",
"<XNavigationModel",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L662-L679 | train | Sets the navigation model for this edit. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationEdit.setParts | def setParts( self, parts ):
"""
Sets the path for this edit widget by providing the parts to the path.
:param parts | [<str>, ..]
"""
self.setText(self.separator().join(map(str, parts))) | python | def setParts( self, parts ):
"""
Sets the path for this edit widget by providing the parts to the path.
:param parts | [<str>, ..]
"""
self.setText(self.separator().join(map(str, parts))) | [
"def",
"setParts",
"(",
"self",
",",
"parts",
")",
":",
"self",
".",
"setText",
"(",
"self",
".",
"separator",
"(",
")",
".",
"join",
"(",
"map",
"(",
"str",
",",
"parts",
")",
")",
")"
] | Sets the path for this edit widget by providing the parts to the path.
:param parts | [<str>, ..] | [
"Sets",
"the",
"path",
"for",
"this",
"edit",
"widget",
"by",
"providing",
"the",
"parts",
"to",
"the",
"path",
".",
":",
"param",
"parts",
"|",
"[",
"<str",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L681-L687 | train | Sets the path for this edit widget by providing the parts to the path. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationEdit.setSeparator | def setSeparator( self, separator ):
"""
Sets the separator to the inputed character.
:param separator | <str>
"""
self._separator = separator
if ( self._navigationModel ):
self._navigationModel.setSeparator(separator)
self.rebuild() | python | def setSeparator( self, separator ):
"""
Sets the separator to the inputed character.
:param separator | <str>
"""
self._separator = separator
if ( self._navigationModel ):
self._navigationModel.setSeparator(separator)
self.rebuild() | [
"def",
"setSeparator",
"(",
"self",
",",
"separator",
")",
":",
"self",
".",
"_separator",
"=",
"separator",
"if",
"(",
"self",
".",
"_navigationModel",
")",
":",
"self",
".",
"_navigationModel",
".",
"setSeparator",
"(",
"separator",
")",
"self",
".",
"re... | Sets the separator to the inputed character.
:param separator | <str> | [
"Sets",
"the",
"separator",
"to",
"the",
"inputed",
"character",
".",
":",
"param",
"separator",
"|",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L689-L698 | train | Sets the separator to the inputed character. |
bitesofcode/projexui | projexui/widgets/xnavigationedit.py | XNavigationEdit.setText | def setText( self, text ):
"""
Sets the text for this edit to the inputed text.
:param text | <str>
"""
super(XNavigationEdit, self).setText(text)
self.scrollWidget().show()
if ( text == '' or self._originalText != text ):
self.r... | python | def setText( self, text ):
"""
Sets the text for this edit to the inputed text.
:param text | <str>
"""
super(XNavigationEdit, self).setText(text)
self.scrollWidget().show()
if ( text == '' or self._originalText != text ):
self.r... | [
"def",
"setText",
"(",
"self",
",",
"text",
")",
":",
"super",
"(",
"XNavigationEdit",
",",
"self",
")",
".",
"setText",
"(",
"text",
")",
"self",
".",
"scrollWidget",
"(",
")",
".",
"show",
"(",
")",
"if",
"(",
"text",
"==",
"''",
"or",
"self",
... | Sets the text for this edit to the inputed text.
:param text | <str> | [
"Sets",
"the",
"text",
"for",
"this",
"edit",
"to",
"the",
"inputed",
"text",
".",
":",
"param",
"text",
"|",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnavigationedit.py#L700-L710 | train | Sets the text for this edit to the inputed text. |
core/uricore | uricore/core.py | ResourceIdentifier.query | def query(self):
"""Return a new instance of query_cls."""
if not hasattr(self, '_decoded_query'):
self._decoded_query = list(urls._url_decode_impl(
self.querystr.split('&'), 'utf-8', False, True, 'strict'))
return self.query_cls(self._decoded_query) | python | def query(self):
"""Return a new instance of query_cls."""
if not hasattr(self, '_decoded_query'):
self._decoded_query = list(urls._url_decode_impl(
self.querystr.split('&'), 'utf-8', False, True, 'strict'))
return self.query_cls(self._decoded_query) | [
"def",
"query",
"(",
"self",
")",
":",
"if",
"not",
"hasattr",
"(",
"self",
",",
"'_decoded_query'",
")",
":",
"self",
".",
"_decoded_query",
"=",
"list",
"(",
"urls",
".",
"_url_decode_impl",
"(",
"self",
".",
"querystr",
".",
"split",
"(",
"'&'",
")"... | Return a new instance of query_cls. | [
"Return",
"a",
"new",
"instance",
"of",
"query_cls",
"."
] | dc5ef4be7bd93da4c39e5c1cbd1ae4f3ad3f1f2a | https://github.com/core/uricore/blob/dc5ef4be7bd93da4c39e5c1cbd1ae4f3ad3f1f2a/uricore/core.py#L110-L116 | train | Return a new instance of query_cls. |
pmuller/versions | versions/repositories.py | Repository.get | def get(self, requirement):
"""Find packages matching ``requirement``.
:param requirement: Requirement to match against repository packages.
:type requirement: `str` or :class:`.Requirement`
:returns: :func:`list` of matching :class:`.Package` objects.
"""
if isinstance... | python | def get(self, requirement):
"""Find packages matching ``requirement``.
:param requirement: Requirement to match against repository packages.
:type requirement: `str` or :class:`.Requirement`
:returns: :func:`list` of matching :class:`.Package` objects.
"""
if isinstance... | [
"def",
"get",
"(",
"self",
",",
"requirement",
")",
":",
"if",
"isinstance",
"(",
"requirement",
",",
"basestring",
")",
":",
"requirement",
"=",
"Requirement",
".",
"parse",
"(",
"requirement",
")",
"return",
"sorted",
"(",
"p",
"for",
"p",
"in",
"self"... | Find packages matching ``requirement``.
:param requirement: Requirement to match against repository packages.
:type requirement: `str` or :class:`.Requirement`
:returns: :func:`list` of matching :class:`.Package` objects. | [
"Find",
"packages",
"matching",
"requirement",
"."
] | 951bc3fd99b6a675190f11ee0752af1d7ff5b440 | https://github.com/pmuller/versions/blob/951bc3fd99b6a675190f11ee0752af1d7ff5b440/versions/repositories.py#L16-L27 | train | Find packages matching requirement. |
pmuller/versions | versions/repositories.py | Pool.get | def get(self, requirement):
"""Find packages matching ``requirement``.
:param requirement: Requirement to get from all underlying \
repositories.
:type requirement: `str` or :class:`.Requirement`
:returns: :func:`list` of matching :class:`.Package` objects.
"""
... | python | def get(self, requirement):
"""Find packages matching ``requirement``.
:param requirement: Requirement to get from all underlying \
repositories.
:type requirement: `str` or :class:`.Requirement`
:returns: :func:`list` of matching :class:`.Package` objects.
"""
... | [
"def",
"get",
"(",
"self",
",",
"requirement",
")",
":",
"if",
"isinstance",
"(",
"requirement",
",",
"basestring",
")",
":",
"requirement",
"=",
"Requirement",
".",
"parse",
"(",
"requirement",
")",
"packages",
"=",
"set",
"(",
")",
"for",
"repository",
... | Find packages matching ``requirement``.
:param requirement: Requirement to get from all underlying \
repositories.
:type requirement: `str` or :class:`.Requirement`
:returns: :func:`list` of matching :class:`.Package` objects. | [
"Find",
"packages",
"matching",
"requirement",
"."
] | 951bc3fd99b6a675190f11ee0752af1d7ff5b440 | https://github.com/pmuller/versions/blob/951bc3fd99b6a675190f11ee0752af1d7ff5b440/versions/repositories.py#L44-L58 | train | Find packages matching requirement. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.