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/xtreewidget/xtreewidget.py | XTreeWidget.emitSortingChanged | def emitSortingChanged( self, index ):
"""
Emits the sorting changed signal if the user clicks on a sorting
column.
:param index | <int>
"""
if not self.signalsBlocked() and self.isSortingEnabled():
self.sortingChanged.emit(index, self.he... | python | def emitSortingChanged( self, index ):
"""
Emits the sorting changed signal if the user clicks on a sorting
column.
:param index | <int>
"""
if not self.signalsBlocked() and self.isSortingEnabled():
self.sortingChanged.emit(index, self.he... | [
"def",
"emitSortingChanged",
"(",
"self",
",",
"index",
")",
":",
"if",
"not",
"self",
".",
"signalsBlocked",
"(",
")",
"and",
"self",
".",
"isSortingEnabled",
"(",
")",
":",
"self",
".",
"sortingChanged",
".",
"emit",
"(",
"index",
",",
"self",
".",
"... | Emits the sorting changed signal if the user clicks on a sorting
column.
:param index | <int> | [
"Emits",
"the",
"sorting",
"changed",
"signal",
"if",
"the",
"user",
"clicks",
"on",
"a",
"sorting",
"column",
".",
":",
"param",
"index",
"|",
"<int",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L698-L706 | train | Emits the sorting changed signal if the user clicks on a sorting
column. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.export | def export(self, filename, exporter=None):
"""
Exports the data from this tree to the given filename.
:param filename | <str>
"""
filename = nativestring(filename)
if exporter is None:
ext = os.path.splitext(filename)[1]
expo... | python | def export(self, filename, exporter=None):
"""
Exports the data from this tree to the given filename.
:param filename | <str>
"""
filename = nativestring(filename)
if exporter is None:
ext = os.path.splitext(filename)[1]
expo... | [
"def",
"export",
"(",
"self",
",",
"filename",
",",
"exporter",
"=",
"None",
")",
":",
"filename",
"=",
"nativestring",
"(",
"filename",
")",
"if",
"exporter",
"is",
"None",
":",
"ext",
"=",
"os",
".",
"path",
".",
"splitext",
"(",
"filename",
")",
"... | Exports the data from this tree to the given filename.
:param filename | <str> | [
"Exports",
"the",
"data",
"from",
"this",
"tree",
"to",
"the",
"given",
"filename",
".",
":",
"param",
"filename",
"|",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L708-L722 | train | Exports the data from this tree to the given file. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.exportAs | def exportAs(self, action):
"""
Prompts the user to export the information for this tree based on the
available exporters.
"""
plugin = self.exporter(unwrapVariant(action.data()))
if not plugin:
return False
ftypes = '{0} (*{1});;All ... | python | def exportAs(self, action):
"""
Prompts the user to export the information for this tree based on the
available exporters.
"""
plugin = self.exporter(unwrapVariant(action.data()))
if not plugin:
return False
ftypes = '{0} (*{1});;All ... | [
"def",
"exportAs",
"(",
"self",
",",
"action",
")",
":",
"plugin",
"=",
"self",
".",
"exporter",
"(",
"unwrapVariant",
"(",
"action",
".",
"data",
"(",
")",
")",
")",
"if",
"not",
"plugin",
":",
"return",
"False",
"ftypes",
"=",
"'{0} (*{1});;All Files (... | Prompts the user to export the information for this tree based on the
available exporters. | [
"Prompts",
"the",
"user",
"to",
"export",
"the",
"information",
"for",
"this",
"tree",
"based",
"on",
"the",
"available",
"exporters",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L740-L761 | train | Prompts the user to export the information for this tree based on the available exporters. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.viewportEvent | def viewportEvent( self, event ):
"""
Displays the help event for the given index.
:param event | <QHelpEvent>
view | <QAbstractItemView>
option | <QStyleOptionViewItem>
index | <QModelIndex>
... | python | def viewportEvent( self, event ):
"""
Displays the help event for the given index.
:param event | <QHelpEvent>
view | <QAbstractItemView>
option | <QStyleOptionViewItem>
index | <QModelIndex>
... | [
"def",
"viewportEvent",
"(",
"self",
",",
"event",
")",
":",
"# intercept tooltips to use the XPopupWidget when desired\r",
"if",
"event",
".",
"type",
"(",
")",
"==",
"event",
".",
"ToolTip",
"and",
"self",
".",
"usePopupToolTip",
"(",
")",
":",
"index",
"=",
... | Displays the help event for the given index.
:param event | <QHelpEvent>
view | <QAbstractItemView>
option | <QStyleOptionViewItem>
index | <QModelIndex>
:return <bool> | [
"Displays",
"the",
"help",
"event",
"for",
"the",
"given",
"index",
".",
":",
"param",
"event",
"|",
"<QHelpEvent",
">",
"view",
"|",
"<QAbstractItemView",
">",
"option",
"|",
"<QStyleOptionViewItem",
">",
"index",
"|",
"<QModelIndex",
">",
":",
"return",
"<... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L787-L821 | train | Handles the viewport event. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.findNextItem | def findNextItem(self, item):
"""
Returns the next item in the tree.
:param item | <QtGui.QTreeWidgetItem>
:return <QtGui.QTreeWidgetItem>
"""
if not item:
return None
if item.childCount():
re... | python | def findNextItem(self, item):
"""
Returns the next item in the tree.
:param item | <QtGui.QTreeWidgetItem>
:return <QtGui.QTreeWidgetItem>
"""
if not item:
return None
if item.childCount():
re... | [
"def",
"findNextItem",
"(",
"self",
",",
"item",
")",
":",
"if",
"not",
"item",
":",
"return",
"None",
"if",
"item",
".",
"childCount",
"(",
")",
":",
"return",
"item",
".",
"child",
"(",
"0",
")",
"while",
"item",
".",
"parent",
"(",
")",
":",
"... | Returns the next item in the tree.
:param item | <QtGui.QTreeWidgetItem>
:return <QtGui.QTreeWidgetItem> | [
"Returns",
"the",
"next",
"item",
"in",
"the",
"tree",
".",
":",
"param",
"item",
"|",
"<QtGui",
".",
"QTreeWidgetItem",
">",
":",
"return",
"<QtGui",
".",
"QTreeWidgetItem",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L823-L846 | train | Returns the next item in the tree. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.findPreviousItem | def findPreviousItem(self, item):
"""
Returns the previous item in the tree.
:param item | <QtGui.QTreeWidgetItem>
:return <QtGui.QTreeWidgetItem> || None
"""
if not item:
return None
while item.parent():
... | python | def findPreviousItem(self, item):
"""
Returns the previous item in the tree.
:param item | <QtGui.QTreeWidgetItem>
:return <QtGui.QTreeWidgetItem> || None
"""
if not item:
return None
while item.parent():
... | [
"def",
"findPreviousItem",
"(",
"self",
",",
"item",
")",
":",
"if",
"not",
"item",
":",
"return",
"None",
"while",
"item",
".",
"parent",
"(",
")",
":",
"index",
"=",
"item",
".",
"parent",
"(",
")",
".",
"indexOfChild",
"(",
"item",
")",
"if",
"i... | Returns the previous item in the tree.
:param item | <QtGui.QTreeWidgetItem>
:return <QtGui.QTreeWidgetItem> || None | [
"Returns",
"the",
"previous",
"item",
"in",
"the",
"tree",
".",
":",
"param",
"item",
"|",
"<QtGui",
".",
"QTreeWidgetItem",
">",
":",
"return",
"<QtGui",
".",
"QTreeWidgetItem",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L848-L876 | train | Returns the previous item in the tree. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.filterItems | def filterItems(self,
terms,
autoExpand=True,
caseSensitive=False):
"""
Filters the items in this tree based on the inputed text.
:param terms | <str> || {<str> column: [<str> opt, ..]}
... | python | def filterItems(self,
terms,
autoExpand=True,
caseSensitive=False):
"""
Filters the items in this tree based on the inputed text.
:param terms | <str> || {<str> column: [<str> opt, ..]}
... | [
"def",
"filterItems",
"(",
"self",
",",
"terms",
",",
"autoExpand",
"=",
"True",
",",
"caseSensitive",
"=",
"False",
")",
":",
"# create a dictionary of options\r",
"if",
"type",
"(",
"terms",
")",
"!=",
"dict",
":",
"terms",
"=",
"{",
"'*'",
":",
"natives... | Filters the items in this tree based on the inputed text.
:param terms | <str> || {<str> column: [<str> opt, ..]}
autoExpand | <bool>
caseSensitive | <bool> | [
"Filters",
"the",
"items",
"in",
"this",
"tree",
"based",
"on",
"the",
"inputed",
"text",
".",
":",
"param",
"terms",
"|",
"<str",
">",
"||",
"{",
"<str",
">",
"column",
":",
"[",
"<str",
">",
"opt",
"..",
"]",
"}",
"autoExpand",
"|",
"<bool",
">",... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L887-L942 | train | Filter the items in this tree based on the inputed text. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.gridPen | def gridPen(self):
"""
Returns the pen that will be used when drawing the grid lines.
:return <QtGui.QPen>
"""
delegate = self.itemDelegate()
if isinstance(delegate, XTreeWidgetDelegate):
return delegate.gridPen()
return QtGui.QPe... | python | def gridPen(self):
"""
Returns the pen that will be used when drawing the grid lines.
:return <QtGui.QPen>
"""
delegate = self.itemDelegate()
if isinstance(delegate, XTreeWidgetDelegate):
return delegate.gridPen()
return QtGui.QPe... | [
"def",
"gridPen",
"(",
"self",
")",
":",
"delegate",
"=",
"self",
".",
"itemDelegate",
"(",
")",
"if",
"isinstance",
"(",
"delegate",
",",
"XTreeWidgetDelegate",
")",
":",
"return",
"delegate",
".",
"gridPen",
"(",
")",
"return",
"QtGui",
".",
"QPen",
"(... | Returns the pen that will be used when drawing the grid lines.
:return <QtGui.QPen> | [
"Returns",
"the",
"pen",
"that",
"will",
"be",
"used",
"when",
"drawing",
"the",
"grid",
"lines",
".",
":",
"return",
"<QtGui",
".",
"QPen",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L944-L953 | train | Returns the pen that will be used when drawing the grid lines. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.extendsTree | def extendsTree( self ):
"""
Returns whether or not the grid lines should extend through the tree \
area or not.
:return <bool>
"""
delegate = self.itemDelegate()
if ( isinstance(delegate, XTreeWidgetDelegate) ):
return delegate.exten... | python | def extendsTree( self ):
"""
Returns whether or not the grid lines should extend through the tree \
area or not.
:return <bool>
"""
delegate = self.itemDelegate()
if ( isinstance(delegate, XTreeWidgetDelegate) ):
return delegate.exten... | [
"def",
"extendsTree",
"(",
"self",
")",
":",
"delegate",
"=",
"self",
".",
"itemDelegate",
"(",
")",
"if",
"(",
"isinstance",
"(",
"delegate",
",",
"XTreeWidgetDelegate",
")",
")",
":",
"return",
"delegate",
".",
"extendsTree",
"(",
")",
"return",
"False"
... | Returns whether or not the grid lines should extend through the tree \
area or not.
:return <bool> | [
"Returns",
"whether",
"or",
"not",
"the",
"grid",
"lines",
"should",
"extend",
"through",
"the",
"tree",
"\\",
"area",
"or",
"not",
".",
":",
"return",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L955-L965 | train | Returns whether or not the grid lines should extend through the tree area or not. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.headerHideColumn | def headerHideColumn( self ):
"""
Hides the current column set by the header index.
"""
self.setColumnHidden(self._headerIndex, True)
# ensure we at least have 1 column visible
found = False
for col in range(self.columnCount()):
if ( ... | python | def headerHideColumn( self ):
"""
Hides the current column set by the header index.
"""
self.setColumnHidden(self._headerIndex, True)
# ensure we at least have 1 column visible
found = False
for col in range(self.columnCount()):
if ( ... | [
"def",
"headerHideColumn",
"(",
"self",
")",
":",
"self",
".",
"setColumnHidden",
"(",
"self",
".",
"_headerIndex",
",",
"True",
")",
"# ensure we at least have 1 column visible\r",
"found",
"=",
"False",
"for",
"col",
"in",
"range",
"(",
"self",
".",
"columnCou... | Hides the current column set by the header index. | [
"Hides",
"the",
"current",
"column",
"set",
"by",
"the",
"header",
"index",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L967-L981 | train | Hides the current column set by the header index. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.headerSortAscending | def headerSortAscending( self ):
"""
Sorts the column at the current header index by ascending order.
"""
self.setSortingEnabled(True)
self.sortByColumn(self._headerIndex, QtCore.Qt.AscendingOrder) | python | def headerSortAscending( self ):
"""
Sorts the column at the current header index by ascending order.
"""
self.setSortingEnabled(True)
self.sortByColumn(self._headerIndex, QtCore.Qt.AscendingOrder) | [
"def",
"headerSortAscending",
"(",
"self",
")",
":",
"self",
".",
"setSortingEnabled",
"(",
"True",
")",
"self",
".",
"sortByColumn",
"(",
"self",
".",
"_headerIndex",
",",
"QtCore",
".",
"Qt",
".",
"AscendingOrder",
")"
] | Sorts the column at the current header index by ascending order. | [
"Sorts",
"the",
"column",
"at",
"the",
"current",
"header",
"index",
"by",
"ascending",
"order",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1000-L1005 | train | Sort the column at the current header index by ascending order. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.headerSortDescending | def headerSortDescending( self ):
"""
Sorts the column at the current header index by descending order.
"""
self.setSortingEnabled(True)
self.sortByColumn(self._headerIndex, QtCore.Qt.DescendingOrder) | python | def headerSortDescending( self ):
"""
Sorts the column at the current header index by descending order.
"""
self.setSortingEnabled(True)
self.sortByColumn(self._headerIndex, QtCore.Qt.DescendingOrder) | [
"def",
"headerSortDescending",
"(",
"self",
")",
":",
"self",
".",
"setSortingEnabled",
"(",
"True",
")",
"self",
".",
"sortByColumn",
"(",
"self",
".",
"_headerIndex",
",",
"QtCore",
".",
"Qt",
".",
"DescendingOrder",
")"
] | Sorts the column at the current header index by descending order. | [
"Sorts",
"the",
"column",
"at",
"the",
"current",
"header",
"index",
"by",
"descending",
"order",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1007-L1012 | train | Sort the column at the current header index by descending order. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.hiddenColumns | def hiddenColumns( self ):
"""
Returns a list of the hidden columns for this tree.
:return [<str>, ..]
"""
output = []
columns = self.columns()
for c, column in enumerate(columns):
if ( not self.isColumnHidden(c) ):
... | python | def hiddenColumns( self ):
"""
Returns a list of the hidden columns for this tree.
:return [<str>, ..]
"""
output = []
columns = self.columns()
for c, column in enumerate(columns):
if ( not self.isColumnHidden(c) ):
... | [
"def",
"hiddenColumns",
"(",
"self",
")",
":",
"output",
"=",
"[",
"]",
"columns",
"=",
"self",
".",
"columns",
"(",
")",
"for",
"c",
",",
"column",
"in",
"enumerate",
"(",
"columns",
")",
":",
"if",
"(",
"not",
"self",
".",
"isColumnHidden",
"(",
... | Returns a list of the hidden columns for this tree.
:return [<str>, ..] | [
"Returns",
"a",
"list",
"of",
"the",
"hidden",
"columns",
"for",
"this",
"tree",
".",
":",
"return",
"[",
"<str",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1014-L1026 | train | Returns a list of the hidden columns for this tree. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.highlightByAlternate | def highlightByAlternate(self):
"""
Sets the palette highlighting for this tree widget to use a darker
version of the alternate color vs. the standard highlighting.
"""
palette = QtGui.QApplication.palette()
palette.setColor(palette.HighlightedText, palette.color(pa... | python | def highlightByAlternate(self):
"""
Sets the palette highlighting for this tree widget to use a darker
version of the alternate color vs. the standard highlighting.
"""
palette = QtGui.QApplication.palette()
palette.setColor(palette.HighlightedText, palette.color(pa... | [
"def",
"highlightByAlternate",
"(",
"self",
")",
":",
"palette",
"=",
"QtGui",
".",
"QApplication",
".",
"palette",
"(",
")",
"palette",
".",
"setColor",
"(",
"palette",
".",
"HighlightedText",
",",
"palette",
".",
"color",
"(",
"palette",
".",
"Text",
")"... | Sets the palette highlighting for this tree widget to use a darker
version of the alternate color vs. the standard highlighting. | [
"Sets",
"the",
"palette",
"highlighting",
"for",
"this",
"tree",
"widget",
"to",
"use",
"a",
"darker",
"version",
"of",
"the",
"alternate",
"color",
"vs",
".",
"the",
"standard",
"highlighting",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1028-L1038 | train | Sets the palette highlighting for this tree widget to use a darkerer version of the alternate color vs. the standard highlighting. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.hoveredItem | def hoveredItem(self):
"""
Returns the currently hovered item.
:return <QtGui.QTreeWidgetItem> || None
"""
out = None
if ( self._hoveredItem is not None ):
out = self._hoveredItem()
if out is None:
... | python | def hoveredItem(self):
"""
Returns the currently hovered item.
:return <QtGui.QTreeWidgetItem> || None
"""
out = None
if ( self._hoveredItem is not None ):
out = self._hoveredItem()
if out is None:
... | [
"def",
"hoveredItem",
"(",
"self",
")",
":",
"out",
"=",
"None",
"if",
"(",
"self",
".",
"_hoveredItem",
"is",
"not",
"None",
")",
":",
"out",
"=",
"self",
".",
"_hoveredItem",
"(",
")",
"if",
"out",
"is",
"None",
":",
"self",
".",
"_hoveredItem",
... | Returns the currently hovered item.
:return <QtGui.QTreeWidgetItem> || None | [
"Returns",
"the",
"currently",
"hovered",
"item",
".",
":",
"return",
"<QtGui",
".",
"QTreeWidgetItem",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1090-L1103 | train | Returns the currently hovered item or None if no item is currently hovered. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.leaveEvent | def leaveEvent( self, event ):
"""
Dismisses the hovered item when the tree is exited.
:param event | <QEvent>
"""
hitem = self.hoveredItem()
hcol = self.hoveredColumn()
if ( hitem != None ):
self._hoveredItem = None... | python | def leaveEvent( self, event ):
"""
Dismisses the hovered item when the tree is exited.
:param event | <QEvent>
"""
hitem = self.hoveredItem()
hcol = self.hoveredColumn()
if ( hitem != None ):
self._hoveredItem = None... | [
"def",
"leaveEvent",
"(",
"self",
",",
"event",
")",
":",
"hitem",
"=",
"self",
".",
"hoveredItem",
"(",
")",
"hcol",
"=",
"self",
".",
"hoveredColumn",
"(",
")",
"if",
"(",
"hitem",
"!=",
"None",
")",
":",
"self",
".",
"_hoveredItem",
"=",
"None",
... | Dismisses the hovered item when the tree is exited.
:param event | <QEvent> | [
"Dismisses",
"the",
"hovered",
"item",
"when",
"the",
"tree",
"is",
"exited",
".",
":",
"param",
"event",
"|",
"<QEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1141-L1158 | train | Dismisses the hovered item when the tree is exited. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.lockToColumn | def lockToColumn(self, index):
"""
Sets the column that the tree view will lock to. If None is supplied,
then locking will be removed.
:param index | <int> || None
"""
self._lockColumn = index
if index is None:
self.__... | python | def lockToColumn(self, index):
"""
Sets the column that the tree view will lock to. If None is supplied,
then locking will be removed.
:param index | <int> || None
"""
self._lockColumn = index
if index is None:
self.__... | [
"def",
"lockToColumn",
"(",
"self",
",",
"index",
")",
":",
"self",
".",
"_lockColumn",
"=",
"index",
"if",
"index",
"is",
"None",
":",
"self",
".",
"__destroyLockedView",
"(",
")",
"return",
"else",
":",
"if",
"not",
"self",
".",
"_lockedView",
":",
"... | Sets the column that the tree view will lock to. If None is supplied,
then locking will be removed.
:param index | <int> || None | [
"Sets",
"the",
"column",
"that",
"the",
"tree",
"view",
"will",
"lock",
"to",
".",
"If",
"None",
"is",
"supplied",
"then",
"locking",
"will",
"be",
"removed",
".",
":",
"param",
"index",
"|",
"<int",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1160-L1211 | train | Locks the tree view to the specified column. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.mimeData | def mimeData(self, items):
"""
Returns the mime data for dragging for this instance.
:param items | [<QtGui.QTreeWidgetItem>, ..]
"""
func = self.dataCollector()
if func:
return func(self, items)
data = super(XTreeWidge... | python | def mimeData(self, items):
"""
Returns the mime data for dragging for this instance.
:param items | [<QtGui.QTreeWidgetItem>, ..]
"""
func = self.dataCollector()
if func:
return func(self, items)
data = super(XTreeWidge... | [
"def",
"mimeData",
"(",
"self",
",",
"items",
")",
":",
"func",
"=",
"self",
".",
"dataCollector",
"(",
")",
"if",
"func",
":",
"return",
"func",
"(",
"self",
",",
"items",
")",
"data",
"=",
"super",
"(",
"XTreeWidget",
",",
"self",
")",
".",
"mime... | Returns the mime data for dragging for this instance.
:param items | [<QtGui.QTreeWidgetItem>, ..] | [
"Returns",
"the",
"mime",
"data",
"for",
"dragging",
"for",
"this",
"instance",
".",
":",
"param",
"items",
"|",
"[",
"<QtGui",
".",
"QTreeWidgetItem",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1222-L1254 | train | Returns the mime data for dragging for this instance. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.mouseDoubleClickEvent | def mouseDoubleClickEvent(self, event):
"""
Overloads when a mouse press occurs. If in editable mode, and the
click occurs on a selected index, then the editor will be created
and no selection change will occur.
:param event | <QMousePressEvent>
"""
... | python | def mouseDoubleClickEvent(self, event):
"""
Overloads when a mouse press occurs. If in editable mode, and the
click occurs on a selected index, then the editor will be created
and no selection change will occur.
:param event | <QMousePressEvent>
"""
... | [
"def",
"mouseDoubleClickEvent",
"(",
"self",
",",
"event",
")",
":",
"item",
"=",
"self",
".",
"itemAt",
"(",
"event",
".",
"pos",
"(",
")",
")",
"column",
"=",
"self",
".",
"columnAt",
"(",
"event",
".",
"pos",
"(",
")",
".",
"x",
"(",
")",
")",... | Overloads when a mouse press occurs. If in editable mode, and the
click occurs on a selected index, then the editor will be created
and no selection change will occur.
:param event | <QMousePressEvent> | [
"Overloads",
"when",
"a",
"mouse",
"press",
"occurs",
".",
"If",
"in",
"editable",
"mode",
"and",
"the",
"click",
"occurs",
"on",
"a",
"selected",
"index",
"then",
"the",
"editor",
"will",
"be",
"created",
"and",
"no",
"selection",
"change",
"will",
"occur... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1263-L1283 | train | Overloads when a mouse click occurs on a selected item. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.mousePressEvent | def mousePressEvent(self, event):
"""
Overloads when a mouse press occurs. If in editable mode, and the
click occurs on a selected index, then the editor will be created
and no selection change will occur.
:param event | <QMousePressEvent>
"""
item ... | python | def mousePressEvent(self, event):
"""
Overloads when a mouse press occurs. If in editable mode, and the
click occurs on a selected index, then the editor will be created
and no selection change will occur.
:param event | <QMousePressEvent>
"""
item ... | [
"def",
"mousePressEvent",
"(",
"self",
",",
"event",
")",
":",
"item",
"=",
"self",
".",
"itemAt",
"(",
"event",
".",
"pos",
"(",
")",
")",
"column",
"=",
"self",
".",
"columnAt",
"(",
"event",
".",
"pos",
"(",
")",
".",
"x",
"(",
")",
")",
"mi... | Overloads when a mouse press occurs. If in editable mode, and the
click occurs on a selected index, then the editor will be created
and no selection change will occur.
:param event | <QMousePressEvent> | [
"Overloads",
"when",
"a",
"mouse",
"press",
"occurs",
".",
"If",
"in",
"editable",
"mode",
"and",
"the",
"click",
"occurs",
"on",
"a",
"selected",
"index",
"then",
"the",
"editor",
"will",
"be",
"created",
"and",
"no",
"selection",
"change",
"will",
"occur... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1285-L1320 | train | Overloads when a mouse press occurs on a tree item or a selection change occurs. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.mouseMoveEvent | def mouseMoveEvent(self, event):
"""
Tracks when an item is hovered and exited.
:param event | <QMoustEvent>
"""
if self.hoverMode() != XTreeWidget.HoverMode.NoHover:
item = self.itemAt(event.pos())
col = self.columnAt(event.pos().x())
... | python | def mouseMoveEvent(self, event):
"""
Tracks when an item is hovered and exited.
:param event | <QMoustEvent>
"""
if self.hoverMode() != XTreeWidget.HoverMode.NoHover:
item = self.itemAt(event.pos())
col = self.columnAt(event.pos().x())
... | [
"def",
"mouseMoveEvent",
"(",
"self",
",",
"event",
")",
":",
"if",
"self",
".",
"hoverMode",
"(",
")",
"!=",
"XTreeWidget",
".",
"HoverMode",
".",
"NoHover",
":",
"item",
"=",
"self",
".",
"itemAt",
"(",
"event",
".",
"pos",
"(",
")",
")",
"col",
... | Tracks when an item is hovered and exited.
:param event | <QMoustEvent> | [
"Tracks",
"when",
"an",
"item",
"is",
"hovered",
"and",
"exited",
".",
":",
"param",
"event",
"|",
"<QMoustEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1322-L1351 | train | Handles the mouse move event. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.moveCursor | def moveCursor(self, cursorAction, modifiers):
"""
Returns a QModelIndex object pointing to the next object in the
view, based on the given cursorAction and keyboard modifiers
specified by modifiers.
:param modifiers | <QtCore.Qt.KeyboardModifiers>
... | python | def moveCursor(self, cursorAction, modifiers):
"""
Returns a QModelIndex object pointing to the next object in the
view, based on the given cursorAction and keyboard modifiers
specified by modifiers.
:param modifiers | <QtCore.Qt.KeyboardModifiers>
... | [
"def",
"moveCursor",
"(",
"self",
",",
"cursorAction",
",",
"modifiers",
")",
":",
"# moves to the next index\r",
"if",
"cursorAction",
"not",
"in",
"(",
"self",
".",
"MoveNext",
",",
"self",
".",
"MoveRight",
",",
"self",
".",
"MovePrevious",
",",
"self",
"... | Returns a QModelIndex object pointing to the next object in the
view, based on the given cursorAction and keyboard modifiers
specified by modifiers.
:param modifiers | <QtCore.Qt.KeyboardModifiers> | [
"Returns",
"a",
"QModelIndex",
"object",
"pointing",
"to",
"the",
"next",
"object",
"in",
"the",
"view",
"based",
"on",
"the",
"given",
"cursorAction",
"and",
"keyboard",
"modifiers",
"specified",
"by",
"modifiers",
".",
":",
"param",
"modifiers",
"|",
"<QtCor... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1365-L1415 | train | Returns a new index pointing to the next object in the view based on the given cursorAction and modifiers. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.resizeColumnToContents | def resizeColumnToContents(self, column):
"""
Resizes the inputed column to the given contents.
:param column | <int>
"""
self.header().blockSignals(True)
self.setUpdatesEnabled(False)
super(XTreeWidget, self).resizeColumnToContents... | python | def resizeColumnToContents(self, column):
"""
Resizes the inputed column to the given contents.
:param column | <int>
"""
self.header().blockSignals(True)
self.setUpdatesEnabled(False)
super(XTreeWidget, self).resizeColumnToContents... | [
"def",
"resizeColumnToContents",
"(",
"self",
",",
"column",
")",
":",
"self",
".",
"header",
"(",
")",
".",
"blockSignals",
"(",
"True",
")",
"self",
".",
"setUpdatesEnabled",
"(",
"False",
")",
"super",
"(",
"XTreeWidget",
",",
"self",
")",
".",
"resiz... | Resizes the inputed column to the given contents.
:param column | <int> | [
"Resizes",
"the",
"inputed",
"column",
"to",
"the",
"given",
"contents",
".",
":",
"param",
"column",
"|",
"<int",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1463-L1480 | train | Resizes the inputed column to the given contents. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.restoreXml | def restoreXml(self, xml):
"""
Restores properties for this tree widget from the inputed XML.
:param xml | <xml.etree.ElementTree.Element>
:return <bool> success
"""
if xml is None:
return False
self.setUp... | python | def restoreXml(self, xml):
"""
Restores properties for this tree widget from the inputed XML.
:param xml | <xml.etree.ElementTree.Element>
:return <bool> success
"""
if xml is None:
return False
self.setUp... | [
"def",
"restoreXml",
"(",
"self",
",",
"xml",
")",
":",
"if",
"xml",
"is",
"None",
":",
"return",
"False",
"self",
".",
"setUpdatesEnabled",
"(",
"False",
")",
"self",
".",
"blockSignals",
"(",
"True",
")",
"# restore column data\r",
"header",
"=",
"self",... | Restores properties for this tree widget from the inputed XML.
:param xml | <xml.etree.ElementTree.Element>
:return <bool> success | [
"Restores",
"properties",
"for",
"this",
"tree",
"widget",
"from",
"the",
"inputed",
"XML",
".",
":",
"param",
"xml",
"|",
"<xml",
".",
"etree",
".",
"ElementTree",
".",
"Element",
">",
":",
"return",
"<bool",
">",
"success"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1482-L1536 | train | Restores properties for this tree widget from the inputed XML. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.restoreSettings | def restoreSettings(self, settings):
"""
Restores properties for this tree widget from the inputed XML.
:param xml | <xml.etree.ElementTree.Element>
:return <bool> success
"""
self.setUpdatesEnabled(False)
self.blockSignals(True... | python | def restoreSettings(self, settings):
"""
Restores properties for this tree widget from the inputed XML.
:param xml | <xml.etree.ElementTree.Element>
:return <bool> success
"""
self.setUpdatesEnabled(False)
self.blockSignals(True... | [
"def",
"restoreSettings",
"(",
"self",
",",
"settings",
")",
":",
"self",
".",
"setUpdatesEnabled",
"(",
"False",
")",
"self",
".",
"blockSignals",
"(",
"True",
")",
"# restore order data\r",
"headerState",
"=",
"unwrapVariant",
"(",
"settings",
".",
"value",
... | Restores properties for this tree widget from the inputed XML.
:param xml | <xml.etree.ElementTree.Element>
:return <bool> success | [
"Restores",
"properties",
"for",
"this",
"tree",
"widget",
"from",
"the",
"inputed",
"XML",
".",
":",
"param",
"xml",
"|",
"<xml",
".",
"etree",
".",
"ElementTree",
".",
"Element",
">",
":",
"return",
"<bool",
">",
"success"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1538-L1563 | train | Restores properties for this tree widget from the inputed XML. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.saveSettings | def saveSettings(self, settings):
"""
Saves the data for this tree to the inputed xml entry.
:param xml | <xml.etree.ElementTree.Element>
:return <bool> success
"""
# save order data
settings.setValue('headerState', wrapVariant(... | python | def saveSettings(self, settings):
"""
Saves the data for this tree to the inputed xml entry.
:param xml | <xml.etree.ElementTree.Element>
:return <bool> success
"""
# save order data
settings.setValue('headerState', wrapVariant(... | [
"def",
"saveSettings",
"(",
"self",
",",
"settings",
")",
":",
"# save order data\r",
"settings",
".",
"setValue",
"(",
"'headerState'",
",",
"wrapVariant",
"(",
"str",
"(",
"self",
".",
"header",
"(",
")",
".",
"saveState",
"(",
")",
".",
"toBase64",
"(",... | 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/xtreewidget/xtreewidget.py#L1565-L1577 | train | Saves the settings for this tree to the inputed xml entry. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.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 order data
... | 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 order data
... | [
"def",
"saveXml",
"(",
"self",
",",
"xml",
")",
":",
"if",
"xml",
"is",
"None",
":",
"return",
"False",
"# save order data\r",
"xml",
".",
"set",
"(",
"'headerState'",
",",
"str",
"(",
"self",
".",
"header",
"(",
")",
".",
"saveState",
"(",
")",
".",... | 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/xtreewidget/xtreewidget.py#L1579-L1596 | train | Saves the data for this tree to the inputed xml entry. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.setArrowStyle | def setArrowStyle( self, state ):
"""
Sets whether or not to use arrows for the grouping mechanism.
:param state | <bool>
"""
self._arrowStyle = state
if not state:
self.setStyleSheet('')
else:
right = reso... | python | def setArrowStyle( self, state ):
"""
Sets whether or not to use arrows for the grouping mechanism.
:param state | <bool>
"""
self._arrowStyle = state
if not state:
self.setStyleSheet('')
else:
right = reso... | [
"def",
"setArrowStyle",
"(",
"self",
",",
"state",
")",
":",
"self",
".",
"_arrowStyle",
"=",
"state",
"if",
"not",
"state",
":",
"self",
".",
"setStyleSheet",
"(",
"''",
")",
"else",
":",
"right",
"=",
"resources",
".",
"find",
"(",
"'img/treeview/trian... | Sets whether or not to use arrows for the grouping mechanism.
:param state | <bool> | [
"Sets",
"whether",
"or",
"not",
"to",
"use",
"arrows",
"for",
"the",
"grouping",
"mechanism",
".",
":",
"param",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1598-L1612 | train | Sets whether or not to use arrows for the grouping mechanism. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.setColumns | def setColumns(self, columns):
"""
Sets the column count and list of columns to the inputed column list.
:param columns | [<str>, ..]
"""
self.setColumnCount(len(columns))
self.setHeaderLabels(columns) | python | def setColumns(self, columns):
"""
Sets the column count and list of columns to the inputed column list.
:param columns | [<str>, ..]
"""
self.setColumnCount(len(columns))
self.setHeaderLabels(columns) | [
"def",
"setColumns",
"(",
"self",
",",
"columns",
")",
":",
"self",
".",
"setColumnCount",
"(",
"len",
"(",
"columns",
")",
")",
"self",
".",
"setHeaderLabels",
"(",
"columns",
")"
] | Sets the column count and list of columns to the inputed column list.
:param columns | [<str>, ..] | [
"Sets",
"the",
"column",
"count",
"and",
"list",
"of",
"columns",
"to",
"the",
"inputed",
"column",
"list",
".",
":",
"param",
"columns",
"|",
"[",
"<str",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1614-L1621 | train | Sets the column count and header labels of the table. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.setDataCollector | def setDataCollector( self, collector ):
"""
Sets the method that will be used to collect mime data for dragging \
items from this tree.
:warning The data collector is stored as a weak-reference, so using \
mutable methods will not be stored well. T... | python | def setDataCollector( self, collector ):
"""
Sets the method that will be used to collect mime data for dragging \
items from this tree.
:warning The data collector is stored as a weak-reference, so using \
mutable methods will not be stored well. T... | [
"def",
"setDataCollector",
"(",
"self",
",",
"collector",
")",
":",
"if",
"(",
"collector",
")",
":",
"self",
".",
"_dataCollectorRef",
"=",
"weakref",
".",
"ref",
"(",
"collector",
")",
"else",
":",
"self",
".",
"_dataCollectorRef",
"=",
"None"
] | Sets the method that will be used to collect mime data for dragging \
items from this tree.
:warning The data collector is stored as a weak-reference, so using \
mutable methods will not be stored well. Things like \
instancemethods will not hold... | [
"Sets",
"the",
"method",
"that",
"will",
"be",
"used",
"to",
"collect",
"mime",
"data",
"for",
"dragging",
"\\",
"items",
"from",
"this",
"tree",
".",
":",
"warning",
"The",
"data",
"collector",
"is",
"stored",
"as",
"a",
"weak",
"-",
"reference",
"so",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1632-L1648 | train | Sets the method that will be used to collect mime data for dragging items from this tree. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.setDragDropFilter | def setDragDropFilter( self, ddFilter ):
"""
Sets the drag drop filter for this widget.
:warning The dragdropfilter is stored as a weak-reference, so using \
mutable methods will not be stored well. Things like \
instancemethods will not... | python | def setDragDropFilter( self, ddFilter ):
"""
Sets the drag drop filter for this widget.
:warning The dragdropfilter is stored as a weak-reference, so using \
mutable methods will not be stored well. Things like \
instancemethods will not... | [
"def",
"setDragDropFilter",
"(",
"self",
",",
"ddFilter",
")",
":",
"if",
"ddFilter",
":",
"self",
".",
"_dragDropFilterRef",
"=",
"weakref",
".",
"ref",
"(",
"ddFilter",
")",
"else",
":",
"self",
".",
"_dragDropFilterRef",
"=",
"None"
] | Sets the drag drop filter for this widget.
:warning The dragdropfilter is stored as a weak-reference, so using \
mutable methods will not be stored well. Things like \
instancemethods will not hold their pointer after they \
leave the... | [
"Sets",
"the",
"drag",
"drop",
"filter",
"for",
"this",
"widget",
".",
":",
"warning",
"The",
"dragdropfilter",
"is",
"stored",
"as",
"a",
"weak",
"-",
"reference",
"so",
"using",
"\\",
"mutable",
"methods",
"will",
"not",
"be",
"stored",
"well",
".",
"T... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1674-L1689 | train | Sets the drag drop filter for this widget. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.setEditable | def setEditable( self, state ):
"""
Sets the editable state for this instance.
:param state | <bool>
"""
self._editable = state
if not state:
self.setEditTriggers(QtGui.QTreeWidget.NoEditTriggers)
else:
tri... | python | def setEditable( self, state ):
"""
Sets the editable state for this instance.
:param state | <bool>
"""
self._editable = state
if not state:
self.setEditTriggers(QtGui.QTreeWidget.NoEditTriggers)
else:
tri... | [
"def",
"setEditable",
"(",
"self",
",",
"state",
")",
":",
"self",
".",
"_editable",
"=",
"state",
"if",
"not",
"state",
":",
"self",
".",
"setEditTriggers",
"(",
"QtGui",
".",
"QTreeWidget",
".",
"NoEditTriggers",
")",
"else",
":",
"triggers",
"=",
"QtG... | Sets the editable state for this instance.
:param state | <bool> | [
"Sets",
"the",
"editable",
"state",
"for",
"this",
"instance",
".",
":",
"param",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1691-L1707 | train | Sets the editable state for this instance. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.setExtendsTree | def setExtendsTree( self, state ):
"""
Set whether or not this delegate should render its row line through \
the tree area.
:return <state>
"""
delegate = self.itemDelegate()
if ( isinstance(delegate, XTreeWidgetDelegate) ):
deleg... | python | def setExtendsTree( self, state ):
"""
Set whether or not this delegate should render its row line through \
the tree area.
:return <state>
"""
delegate = self.itemDelegate()
if ( isinstance(delegate, XTreeWidgetDelegate) ):
deleg... | [
"def",
"setExtendsTree",
"(",
"self",
",",
"state",
")",
":",
"delegate",
"=",
"self",
".",
"itemDelegate",
"(",
")",
"if",
"(",
"isinstance",
"(",
"delegate",
",",
"XTreeWidgetDelegate",
")",
")",
":",
"delegate",
".",
"setExtendsTree",
"(",
"state",
")"
... | Set whether or not this delegate should render its row line through \
the tree area.
:return <state> | [
"Set",
"whether",
"or",
"not",
"this",
"delegate",
"should",
"render",
"its",
"row",
"line",
"through",
"\\",
"the",
"tree",
"area",
".",
":",
"return",
"<state",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1709-L1718 | train | Sets whether or not this delegate should render its row line through the tree area. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.setGridPen | def setGridPen( self, gridPen ):
"""
Sets the pen that will be used when drawing the grid lines.
:param gridPen | <QtGui.QPen> || <QtGui.QColor>
"""
delegate = self.itemDelegate()
if ( isinstance(delegate, XTreeWidgetDelegate) ):
delegate... | python | def setGridPen( self, gridPen ):
"""
Sets the pen that will be used when drawing the grid lines.
:param gridPen | <QtGui.QPen> || <QtGui.QColor>
"""
delegate = self.itemDelegate()
if ( isinstance(delegate, XTreeWidgetDelegate) ):
delegate... | [
"def",
"setGridPen",
"(",
"self",
",",
"gridPen",
")",
":",
"delegate",
"=",
"self",
".",
"itemDelegate",
"(",
")",
"if",
"(",
"isinstance",
"(",
"delegate",
",",
"XTreeWidgetDelegate",
")",
")",
":",
"delegate",
".",
"setGridPen",
"(",
"gridPen",
")"
] | Sets the pen that will be used when drawing the grid lines.
:param gridPen | <QtGui.QPen> || <QtGui.QColor> | [
"Sets",
"the",
"pen",
"that",
"will",
"be",
"used",
"when",
"drawing",
"the",
"grid",
"lines",
".",
":",
"param",
"gridPen",
"|",
"<QtGui",
".",
"QPen",
">",
"||",
"<QtGui",
".",
"QColor",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1728-L1736 | train | Sets the pen that will be used when drawing the grid lines. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.setColumnHidden | def setColumnHidden( self, column, state ):
"""
Sets the hidden state for the inputed column.
:param column | <int>
state | <bool>
"""
super(XTreeWidget, self).setColumnHidden(column, state)
if ( not self.signalsBlocked... | python | def setColumnHidden( self, column, state ):
"""
Sets the hidden state for the inputed column.
:param column | <int>
state | <bool>
"""
super(XTreeWidget, self).setColumnHidden(column, state)
if ( not self.signalsBlocked... | [
"def",
"setColumnHidden",
"(",
"self",
",",
"column",
",",
"state",
")",
":",
"super",
"(",
"XTreeWidget",
",",
"self",
")",
".",
"setColumnHidden",
"(",
"column",
",",
"state",
")",
"if",
"(",
"not",
"self",
".",
"signalsBlocked",
"(",
")",
")",
":",
... | Sets the hidden state for the inputed column.
:param column | <int>
state | <bool> | [
"Sets",
"the",
"hidden",
"state",
"for",
"the",
"inputed",
"column",
".",
":",
"param",
"column",
"|",
"<int",
">",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1738-L1749 | train | Sets the hidden state for the inputed column. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.setHiddenColumns | def setHiddenColumns(self, hidden):
"""
Sets the columns that should be hidden based on the inputed list of \
names.
:param columns | [<str>, ..]
"""
colnames = self.columns()
for c, column in enumerate(colnames):
self.setColumnH... | python | def setHiddenColumns(self, hidden):
"""
Sets the columns that should be hidden based on the inputed list of \
names.
:param columns | [<str>, ..]
"""
colnames = self.columns()
for c, column in enumerate(colnames):
self.setColumnH... | [
"def",
"setHiddenColumns",
"(",
"self",
",",
"hidden",
")",
":",
"colnames",
"=",
"self",
".",
"columns",
"(",
")",
"for",
"c",
",",
"column",
"in",
"enumerate",
"(",
"colnames",
")",
":",
"self",
".",
"setColumnHidden",
"(",
"c",
",",
"column",
"in",
... | Sets the columns that should be hidden based on the inputed list of \
names.
:param columns | [<str>, ..] | [
"Sets",
"the",
"columns",
"that",
"should",
"be",
"hidden",
"based",
"on",
"the",
"inputed",
"list",
"of",
"\\",
"names",
".",
":",
"param",
"columns",
"|",
"[",
"<str",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1783-L1792 | train | Sets the columns that should be hidden based on the inputed list of names. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.setShowGrid | def setShowGrid( self, state ):
"""
Sets whether or not this delegate should draw its grid lines.
:param state | <bool>
"""
delegate = self.itemDelegate()
if ( isinstance(delegate, XTreeWidgetDelegate) ):
delegate.setShowGrid(state) | python | def setShowGrid( self, state ):
"""
Sets whether or not this delegate should draw its grid lines.
:param state | <bool>
"""
delegate = self.itemDelegate()
if ( isinstance(delegate, XTreeWidgetDelegate) ):
delegate.setShowGrid(state) | [
"def",
"setShowGrid",
"(",
"self",
",",
"state",
")",
":",
"delegate",
"=",
"self",
".",
"itemDelegate",
"(",
")",
"if",
"(",
"isinstance",
"(",
"delegate",
",",
"XTreeWidgetDelegate",
")",
")",
":",
"delegate",
".",
"setShowGrid",
"(",
"state",
")"
] | Sets whether or not this delegate should draw its grid lines.
:param state | <bool> | [
"Sets",
"whether",
"or",
"not",
"this",
"delegate",
"should",
"draw",
"its",
"grid",
"lines",
".",
":",
"param",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1824-L1832 | train | Sets whether or not this item should draw its grid lines. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.setShowGridColumns | def setShowGridColumns( self, state ):
"""
Sets whether or not columns should be rendered when drawing the grid.
:param state | <bool>
"""
delegate = self.itemDelegate()
if ( isinstance(delegate, XTreeWidgetDelegate) ):
delegate.setShowGr... | python | def setShowGridColumns( self, state ):
"""
Sets whether or not columns should be rendered when drawing the grid.
:param state | <bool>
"""
delegate = self.itemDelegate()
if ( isinstance(delegate, XTreeWidgetDelegate) ):
delegate.setShowGr... | [
"def",
"setShowGridColumns",
"(",
"self",
",",
"state",
")",
":",
"delegate",
"=",
"self",
".",
"itemDelegate",
"(",
")",
"if",
"(",
"isinstance",
"(",
"delegate",
",",
"XTreeWidgetDelegate",
")",
")",
":",
"delegate",
".",
"setShowGridColumns",
"(",
"state"... | Sets whether or not columns should be rendered when drawing the grid.
:param state | <bool> | [
"Sets",
"whether",
"or",
"not",
"columns",
"should",
"be",
"rendered",
"when",
"drawing",
"the",
"grid",
".",
":",
"param",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1834-L1842 | train | Sets whether or not columns should be rendered when drawing the grid. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.setShowGridRows | def setShowGridRows( self, state ):
"""
Sets whether or not the grid rows should be rendered when drawing the \
grid.
:param state | <bool>
"""
delegate = self.itemDelegate()
if ( isinstance(delegate, XTreeWidgetDelegate) ):
dele... | python | def setShowGridRows( self, state ):
"""
Sets whether or not the grid rows should be rendered when drawing the \
grid.
:param state | <bool>
"""
delegate = self.itemDelegate()
if ( isinstance(delegate, XTreeWidgetDelegate) ):
dele... | [
"def",
"setShowGridRows",
"(",
"self",
",",
"state",
")",
":",
"delegate",
"=",
"self",
".",
"itemDelegate",
"(",
")",
"if",
"(",
"isinstance",
"(",
"delegate",
",",
"XTreeWidgetDelegate",
")",
")",
":",
"delegate",
".",
"setShowGridRows",
"(",
"state",
")... | Sets whether or not the grid rows should be rendered when drawing the \
grid.
:param state | <bool> | [
"Sets",
"whether",
"or",
"not",
"the",
"grid",
"rows",
"should",
"be",
"rendered",
"when",
"drawing",
"the",
"\\",
"grid",
".",
":",
"param",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1844-L1853 | train | Sets whether or not the grid rows should be rendered when drawing the grid. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.setShowRichText | def setShowRichText( self, state ):
"""
Sets whether or not the delegate should render rich text information \
as HTML when drawing the contents of the item.
:param state | <bool>
"""
delegate = self.itemDelegate()
if isinstance(delegate, XTr... | python | def setShowRichText( self, state ):
"""
Sets whether or not the delegate should render rich text information \
as HTML when drawing the contents of the item.
:param state | <bool>
"""
delegate = self.itemDelegate()
if isinstance(delegate, XTr... | [
"def",
"setShowRichText",
"(",
"self",
",",
"state",
")",
":",
"delegate",
"=",
"self",
".",
"itemDelegate",
"(",
")",
"if",
"isinstance",
"(",
"delegate",
",",
"XTreeWidgetDelegate",
")",
":",
"delegate",
".",
"setShowRichText",
"(",
"state",
")"
] | Sets whether or not the delegate should render rich text information \
as HTML when drawing the contents of the item.
:param state | <bool> | [
"Sets",
"whether",
"or",
"not",
"the",
"delegate",
"should",
"render",
"rich",
"text",
"information",
"\\",
"as",
"HTML",
"when",
"drawing",
"the",
"contents",
"of",
"the",
"item",
".",
":",
"param",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1864-L1873 | train | Sets whether or not the delegate should render rich text information as HTML when drawing the contents of the item. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.setVisibleColumns | def setVisibleColumns(self, visible):
"""
Sets the list of visible columns for this widget. This method will
take any column in this tree's list NOT found within the inputed column
list and hide them.
:param columns | [<str>, ..]
"""
colname... | python | def setVisibleColumns(self, visible):
"""
Sets the list of visible columns for this widget. This method will
take any column in this tree's list NOT found within the inputed column
list and hide them.
:param columns | [<str>, ..]
"""
colname... | [
"def",
"setVisibleColumns",
"(",
"self",
",",
"visible",
")",
":",
"colnames",
"=",
"self",
".",
"columns",
"(",
")",
"for",
"c",
",",
"column",
"in",
"enumerate",
"(",
"colnames",
")",
":",
"self",
".",
"setColumnHidden",
"(",
"c",
",",
"column",
"not... | Sets the list of visible columns for this widget. This method will
take any column in this tree's list NOT found within the inputed column
list and hide them.
:param columns | [<str>, ..] | [
"Sets",
"the",
"list",
"of",
"visible",
"columns",
"for",
"this",
"widget",
".",
"This",
"method",
"will",
"take",
"any",
"column",
"in",
"this",
"tree",
"s",
"list",
"NOT",
"found",
"within",
"the",
"inputed",
"column",
"list",
"and",
"hide",
"them",
".... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1875-L1885 | train | Sets the list of visible columns for this widget. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.showGrid | def showGrid( self ):
"""
Returns whether or not this delegate should draw its grid lines.
:return <bool>
"""
delegate = self.itemDelegate()
if ( isinstance(delegate, XTreeWidgetDelegate) ):
return delegate.showGrid()
return False | python | def showGrid( self ):
"""
Returns whether or not this delegate should draw its grid lines.
:return <bool>
"""
delegate = self.itemDelegate()
if ( isinstance(delegate, XTreeWidgetDelegate) ):
return delegate.showGrid()
return False | [
"def",
"showGrid",
"(",
"self",
")",
":",
"delegate",
"=",
"self",
".",
"itemDelegate",
"(",
")",
"if",
"(",
"isinstance",
"(",
"delegate",
",",
"XTreeWidgetDelegate",
")",
")",
":",
"return",
"delegate",
".",
"showGrid",
"(",
")",
"return",
"False"
] | Returns whether or not this delegate should draw its grid lines.
:return <bool> | [
"Returns",
"whether",
"or",
"not",
"this",
"delegate",
"should",
"draw",
"its",
"grid",
"lines",
".",
":",
"return",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1904-L1913 | train | Returns whether or not this item should draw its grid lines. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.showGridRows | def showGridRows( self ):
"""
Returns whether or not this delegate should draw rows when rendering \
the grid.
:return <bool>
"""
delegate = self.itemDelegate()
if ( isinstance(delegate, XTreeWidgetDelegate) ):
return delegate.sho... | python | def showGridRows( self ):
"""
Returns whether or not this delegate should draw rows when rendering \
the grid.
:return <bool>
"""
delegate = self.itemDelegate()
if ( isinstance(delegate, XTreeWidgetDelegate) ):
return delegate.sho... | [
"def",
"showGridRows",
"(",
"self",
")",
":",
"delegate",
"=",
"self",
".",
"itemDelegate",
"(",
")",
"if",
"(",
"isinstance",
"(",
"delegate",
",",
"XTreeWidgetDelegate",
")",
")",
":",
"return",
"delegate",
".",
"showGridRows",
"(",
")",
"return",
"None"... | Returns whether or not this delegate should draw rows when rendering \
the grid.
:return <bool> | [
"Returns",
"whether",
"or",
"not",
"this",
"delegate",
"should",
"draw",
"rows",
"when",
"rendering",
"\\",
"the",
"grid",
".",
":",
"return",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1927-L1937 | train | Returns whether or not this delegate should draw rows when rendering the grid. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.showHeaderMenu | def showHeaderMenu( self, pos):
"""
Displays the header menu for this tree widget.
:param pos | <QtCore.QPoint> || None
"""
header = self.header()
index = header.logicalIndexAt(pos)
self._headerIndex = index
# show a pre-s... | python | def showHeaderMenu( self, pos):
"""
Displays the header menu for this tree widget.
:param pos | <QtCore.QPoint> || None
"""
header = self.header()
index = header.logicalIndexAt(pos)
self._headerIndex = index
# show a pre-s... | [
"def",
"showHeaderMenu",
"(",
"self",
",",
"pos",
")",
":",
"header",
"=",
"self",
".",
"header",
"(",
")",
"index",
"=",
"header",
".",
"logicalIndexAt",
"(",
"pos",
")",
"self",
".",
"_headerIndex",
"=",
"index",
"# show a pre-set menu\r",
"if",
"self",
... | Displays the header menu for this tree widget.
:param pos | <QtCore.QPoint> || None | [
"Displays",
"the",
"header",
"menu",
"for",
"this",
"tree",
"widget",
".",
":",
"param",
"pos",
"|",
"<QtCore",
".",
"QPoint",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1939-L1962 | train | Shows the header menu at the given position. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.showRichText | def showRichText( self ):
"""
Returns whether or not the tree is holding richtext information and \
should render HTML when drawing the data.
:return <bool>
"""
delegate = self.itemDelegate()
if ( isinstance(delegate, XTreeWidgetDelegate) ):
... | python | def showRichText( self ):
"""
Returns whether or not the tree is holding richtext information and \
should render HTML when drawing the data.
:return <bool>
"""
delegate = self.itemDelegate()
if ( isinstance(delegate, XTreeWidgetDelegate) ):
... | [
"def",
"showRichText",
"(",
"self",
")",
":",
"delegate",
"=",
"self",
".",
"itemDelegate",
"(",
")",
"if",
"(",
"isinstance",
"(",
"delegate",
",",
"XTreeWidgetDelegate",
")",
")",
":",
"return",
"delegate",
".",
"showRichText",
"(",
")",
"return",
"None"... | Returns whether or not the tree is holding richtext information and \
should render HTML when drawing the data.
:return <bool> | [
"Returns",
"whether",
"or",
"not",
"the",
"tree",
"is",
"holding",
"richtext",
"information",
"and",
"\\",
"should",
"render",
"HTML",
"when",
"drawing",
"the",
"data",
".",
":",
"return",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1973-L1983 | train | Returns whether or not the tree is holding richtext information and should render HTML when drawing the data. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.smartResizeColumnsToContents | def smartResizeColumnsToContents( self ):
"""
Resizes the columns to the contents based on the user preferences.
"""
self.blockSignals(True)
self.setUpdatesEnabled(False)
header = self.header()
header.blockSignals(True)
columns ... | python | def smartResizeColumnsToContents( self ):
"""
Resizes the columns to the contents based on the user preferences.
"""
self.blockSignals(True)
self.setUpdatesEnabled(False)
header = self.header()
header.blockSignals(True)
columns ... | [
"def",
"smartResizeColumnsToContents",
"(",
"self",
")",
":",
"self",
".",
"blockSignals",
"(",
"True",
")",
"self",
".",
"setUpdatesEnabled",
"(",
"False",
")",
"header",
"=",
"self",
".",
"header",
"(",
")",
"header",
".",
"blockSignals",
"(",
"True",
")... | Resizes the columns to the contents based on the user preferences. | [
"Resizes",
"the",
"columns",
"to",
"the",
"contents",
"based",
"on",
"the",
"user",
"preferences",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L1985-L2007 | train | Resizes the columns to the contents based on the user preferences. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.sortByColumn | def sortByColumn(self, column, order=QtCore.Qt.AscendingOrder):
"""
Overloads the default sortByColumn to record the order for later \
reference.
:param column | <int>
order | <QtCore.Qt.SortOrder>
"""
super(XTreeWidget, self).so... | python | def sortByColumn(self, column, order=QtCore.Qt.AscendingOrder):
"""
Overloads the default sortByColumn to record the order for later \
reference.
:param column | <int>
order | <QtCore.Qt.SortOrder>
"""
super(XTreeWidget, self).so... | [
"def",
"sortByColumn",
"(",
"self",
",",
"column",
",",
"order",
"=",
"QtCore",
".",
"Qt",
".",
"AscendingOrder",
")",
":",
"super",
"(",
"XTreeWidget",
",",
"self",
")",
".",
"sortByColumn",
"(",
"column",
",",
"order",
")",
"self",
".",
"_sortOrder",
... | Overloads the default sortByColumn to record the order for later \
reference.
:param column | <int>
order | <QtCore.Qt.SortOrder> | [
"Overloads",
"the",
"default",
"sortByColumn",
"to",
"record",
"the",
"order",
"for",
"later",
"\\",
"reference",
".",
":",
"param",
"column",
"|",
"<int",
">",
"order",
"|",
"<QtCore",
".",
"Qt",
".",
"SortOrder",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L2009-L2018 | train | Sort the tree by the given column. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.sortByColumnName | def sortByColumnName(self, name, order=QtCore.Qt.AscendingOrder):
"""
Sorts the tree by the inputed column name's index and the given order.
:param name | <str>
order | <QtCore.Qt.SortOrder>
"""
self.setSortingEnabled(True)
s... | python | def sortByColumnName(self, name, order=QtCore.Qt.AscendingOrder):
"""
Sorts the tree by the inputed column name's index and the given order.
:param name | <str>
order | <QtCore.Qt.SortOrder>
"""
self.setSortingEnabled(True)
s... | [
"def",
"sortByColumnName",
"(",
"self",
",",
"name",
",",
"order",
"=",
"QtCore",
".",
"Qt",
".",
"AscendingOrder",
")",
":",
"self",
".",
"setSortingEnabled",
"(",
"True",
")",
"self",
".",
"sortByColumn",
"(",
"self",
".",
"column",
"(",
"name",
")",
... | Sorts the tree by the inputed column name's index and the given order.
:param name | <str>
order | <QtCore.Qt.SortOrder> | [
"Sorts",
"the",
"tree",
"by",
"the",
"inputed",
"column",
"name",
"s",
"index",
"and",
"the",
"given",
"order",
".",
":",
"param",
"name",
"|",
"<str",
">",
"order",
"|",
"<QtCore",
".",
"Qt",
".",
"SortOrder",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L2020-L2028 | train | Sort the tree by the inputed column name. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.startDrag | def startDrag( self, supportedActions ):
"""
Starts a new drag event for this tree widget. Overloading from the
default QTreeWidget class to define a better pixmap option when
dragging many items.
:param supportedActions | <QtCore.Qt.DragActions>
"""... | python | def startDrag( self, supportedActions ):
"""
Starts a new drag event for this tree widget. Overloading from the
default QTreeWidget class to define a better pixmap option when
dragging many items.
:param supportedActions | <QtCore.Qt.DragActions>
"""... | [
"def",
"startDrag",
"(",
"self",
",",
"supportedActions",
")",
":",
"if",
"(",
"not",
"self",
".",
"useDragPixmaps",
"(",
")",
")",
":",
"return",
"super",
"(",
"XTreeWidget",
",",
"self",
")",
".",
"startDrag",
"(",
"supportedActions",
")",
"filt",
"=",... | Starts a new drag event for this tree widget. Overloading from the
default QTreeWidget class to define a better pixmap option when
dragging many items.
:param supportedActions | <QtCore.Qt.DragActions> | [
"Starts",
"a",
"new",
"drag",
"event",
"for",
"this",
"tree",
"widget",
".",
"Overloading",
"from",
"the",
"default",
"QTreeWidget",
"class",
"to",
"define",
"a",
"better",
"pixmap",
"option",
"when",
"dragging",
"many",
"items",
".",
":",
"param",
"supporte... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L2038-L2068 | train | Starts a new drag event for this tree widget. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.toggleColumnByAction | def toggleColumnByAction( self, action ):
"""
Toggles whether or not the column at the inputed action's name should \
be hidden.
`
:param action | <QAction>
"""
if ( action.text() == 'Show All' ):
self.blockSignals(True)
self.... | python | def toggleColumnByAction( self, action ):
"""
Toggles whether or not the column at the inputed action's name should \
be hidden.
`
:param action | <QAction>
"""
if ( action.text() == 'Show All' ):
self.blockSignals(True)
self.... | [
"def",
"toggleColumnByAction",
"(",
"self",
",",
"action",
")",
":",
"if",
"(",
"action",
".",
"text",
"(",
")",
"==",
"'Show All'",
")",
":",
"self",
".",
"blockSignals",
"(",
"True",
")",
"self",
".",
"setUpdatesEnabled",
"(",
"False",
")",
"for",
"c... | Toggles whether or not the column at the inputed action's name should \
be hidden.
`
:param action | <QAction> | [
"Toggles",
"whether",
"or",
"not",
"the",
"column",
"at",
"the",
"inputed",
"action",
"s",
"name",
"should",
"\\",
"be",
"hidden",
".",
":",
"param",
"action",
"|",
"<QAction",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L2070-L2117 | train | Toggles whether or not the column at the inputed action s name should be hidden. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.topLevelItems | def topLevelItems(self):
"""
Returns the list of top level nodes for this tree.
:return [<QtGui.QTreeWidgetItem>, ..]
"""
try:
for i in xrange(self.topLevelItemCount()):
yield self.topLevelItem(i)
except RuntimeError:
... | python | def topLevelItems(self):
"""
Returns the list of top level nodes for this tree.
:return [<QtGui.QTreeWidgetItem>, ..]
"""
try:
for i in xrange(self.topLevelItemCount()):
yield self.topLevelItem(i)
except RuntimeError:
... | [
"def",
"topLevelItems",
"(",
"self",
")",
":",
"try",
":",
"for",
"i",
"in",
"xrange",
"(",
"self",
".",
"topLevelItemCount",
"(",
")",
")",
":",
"yield",
"self",
".",
"topLevelItem",
"(",
"i",
")",
"except",
"RuntimeError",
":",
"# can be raised when iter... | Returns the list of top level nodes for this tree.
:return [<QtGui.QTreeWidgetItem>, ..] | [
"Returns",
"the",
"list",
"of",
"top",
"level",
"nodes",
"for",
"this",
"tree",
".",
":",
"return",
"[",
"<QtGui",
".",
"QTreeWidgetItem",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L2119-L2130 | train | Returns the list of top level items for this tree. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.traverseItems | def traverseItems(self,
mode=TraverseMode.DepthFirst,
parent=None):
"""
Generates a tree iterator that will traverse the items of this tree
in either a depth-first or breadth-first fashion.
:param mode | <XTreeWidget.Traver... | python | def traverseItems(self,
mode=TraverseMode.DepthFirst,
parent=None):
"""
Generates a tree iterator that will traverse the items of this tree
in either a depth-first or breadth-first fashion.
:param mode | <XTreeWidget.Traver... | [
"def",
"traverseItems",
"(",
"self",
",",
"mode",
"=",
"TraverseMode",
".",
"DepthFirst",
",",
"parent",
"=",
"None",
")",
":",
"try",
":",
"if",
"parent",
":",
"count",
"=",
"parent",
".",
"childCount",
"(",
")",
"func",
"=",
"parent",
".",
"child",
... | Generates a tree iterator that will traverse the items of this tree
in either a depth-first or breadth-first fashion.
:param mode | <XTreeWidget.TraverseMode>
recurse | <bool>
:return <generator> | [
"Generates",
"a",
"tree",
"iterator",
"that",
"will",
"traverse",
"the",
"items",
"of",
"this",
"tree",
"in",
"either",
"a",
"depth",
"-",
"first",
"or",
"breadth",
"-",
"first",
"fashion",
".",
":",
"param",
"mode",
"|",
"<XTreeWidget",
".",
"TraverseMode... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L2132-L2172 | train | Returns an iterator that yields the items of this tree in depth - first or breadth - first fashion. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.visibleColumns | def visibleColumns(self):
"""
Returns a list of the visible column names for this widget.
:return [<str>, ..]
"""
return [self.columnOf(c) for c in range(self.columnCount()) \
if not self.isColumnHidden(c)] | python | def visibleColumns(self):
"""
Returns a list of the visible column names for this widget.
:return [<str>, ..]
"""
return [self.columnOf(c) for c in range(self.columnCount()) \
if not self.isColumnHidden(c)] | [
"def",
"visibleColumns",
"(",
"self",
")",
":",
"return",
"[",
"self",
".",
"columnOf",
"(",
"c",
")",
"for",
"c",
"in",
"range",
"(",
"self",
".",
"columnCount",
"(",
")",
")",
"if",
"not",
"self",
".",
"isColumnHidden",
"(",
"c",
")",
"]"
] | Returns a list of the visible column names for this widget.
:return [<str>, ..] | [
"Returns",
"a",
"list",
"of",
"the",
"visible",
"column",
"names",
"for",
"this",
"widget",
".",
":",
"return",
"[",
"<str",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L2191-L2198 | train | Returns a list of the visible column names for this widget. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidget.py | XTreeWidget.visualRect | def visualRect(self, index):
"""
Returns the visual rectangle for the inputed index.
:param index | <QModelIndex>
:return <QtCore.QRect>
"""
rect = super(XTreeWidget, self).visualRect(index)
item = self.itemFromIndex(index)
... | python | def visualRect(self, index):
"""
Returns the visual rectangle for the inputed index.
:param index | <QModelIndex>
:return <QtCore.QRect>
"""
rect = super(XTreeWidget, self).visualRect(index)
item = self.itemFromIndex(index)
... | [
"def",
"visualRect",
"(",
"self",
",",
"index",
")",
":",
"rect",
"=",
"super",
"(",
"XTreeWidget",
",",
"self",
")",
".",
"visualRect",
"(",
"index",
")",
"item",
"=",
"self",
".",
"itemFromIndex",
"(",
"index",
")",
"if",
"not",
"rect",
".",
"isNul... | Returns the visual rectangle for the inputed index.
:param index | <QModelIndex>
:return <QtCore.QRect> | [
"Returns",
"the",
"visual",
"rectangle",
"for",
"the",
"inputed",
"index",
".",
":",
"param",
"index",
"|",
"<QModelIndex",
">",
":",
"return",
"<QtCore",
".",
"QRect",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidget.py#L2208-L2223 | train | Returns the visual rectangle for the inputed index. |
viatoriche/microservices | microservices/queues/runners.py | gevent_run | def gevent_run(app, monkey_patch=True, start=True, debug=False,
**kwargs): # pragma: no cover
"""Run your app in gevent.spawn, run simple loop if start == True
:param app: queues.Microservice instance
:param monkey_patch: boolean, use gevent.monkey.patch_all() for patching standard modules,... | python | def gevent_run(app, monkey_patch=True, start=True, debug=False,
**kwargs): # pragma: no cover
"""Run your app in gevent.spawn, run simple loop if start == True
:param app: queues.Microservice instance
:param monkey_patch: boolean, use gevent.monkey.patch_all() for patching standard modules,... | [
"def",
"gevent_run",
"(",
"app",
",",
"monkey_patch",
"=",
"True",
",",
"start",
"=",
"True",
",",
"debug",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
":",
"# pragma: no cover",
"if",
"monkey_patch",
":",
"from",
"gevent",
"import",
"monkey",
"monkey",
... | Run your app in gevent.spawn, run simple loop if start == True
:param app: queues.Microservice instance
:param monkey_patch: boolean, use gevent.monkey.patch_all() for patching standard modules, default: True
:param start: boolean, if True, server will be start (simple loop)
:param kwargs: other params... | [
"Run",
"your",
"app",
"in",
"gevent",
".",
"spawn",
"run",
"simple",
"loop",
"if",
"start",
"==",
"True"
] | 3510563edd15dc6131b8a948d6062856cd904ac7 | https://github.com/viatoriche/microservices/blob/3510563edd15dc6131b8a948d6062856cd904ac7/microservices/queues/runners.py#L1-L22 | train | Run your app in gevent. spawn |
bitesofcode/projexui | projexui/widgets/xtablewidget.py | XTableWidget.column | def column( self, name ):
"""
Returns the index of the column at the given name.
:param name | <str>
:return <int> (-1 if not found)
"""
columns = self.columns()
if ( name in columns ):
return columns.index(name)
... | python | def column( self, name ):
"""
Returns the index of the column at the given name.
:param name | <str>
:return <int> (-1 if not found)
"""
columns = self.columns()
if ( name in columns ):
return columns.index(name)
... | [
"def",
"column",
"(",
"self",
",",
"name",
")",
":",
"columns",
"=",
"self",
".",
"columns",
"(",
")",
"if",
"(",
"name",
"in",
"columns",
")",
":",
"return",
"columns",
".",
"index",
"(",
"name",
")",
"return",
"-",
"1"
] | Returns the index of the column at the given name.
:param name | <str>
:return <int> (-1 if not found) | [
"Returns",
"the",
"index",
"of",
"the",
"column",
"at",
"the",
"given",
"name",
".",
":",
"param",
"name",
"|",
"<str",
">",
":",
"return",
"<int",
">",
"(",
"-",
"1",
"if",
"not",
"found",
")"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtablewidget.py#L43-L54 | train | Returns the index of the column with the given name. |
bitesofcode/projexui | projexui/widgets/xtablewidget.py | XTableWidget.columnNameAt | def columnNameAt( self, index ):
"""
Returns the name of the column at the inputed index.
:param index | <int>
:return <str>
"""
columns = self.columns()
if ( 0 <= index and index < len(columns) ):
return columns[index]
... | python | def columnNameAt( self, index ):
"""
Returns the name of the column at the inputed index.
:param index | <int>
:return <str>
"""
columns = self.columns()
if ( 0 <= index and index < len(columns) ):
return columns[index]
... | [
"def",
"columnNameAt",
"(",
"self",
",",
"index",
")",
":",
"columns",
"=",
"self",
".",
"columns",
"(",
")",
"if",
"(",
"0",
"<=",
"index",
"and",
"index",
"<",
"len",
"(",
"columns",
")",
")",
":",
"return",
"columns",
"[",
"index",
"]",
"return"... | Returns the name of the column at the inputed index.
:param index | <int>
:return <str> | [
"Returns",
"the",
"name",
"of",
"the",
"column",
"at",
"the",
"inputed",
"index",
".",
":",
"param",
"index",
"|",
"<int",
">",
":",
"return",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtablewidget.py#L56-L67 | train | Returns the name of the column at the inputed index. |
bitesofcode/projexui | projexui/widgets/xtablewidget.py | XTableWidget.columns | def columns( self ):
"""
Returns the list of column names for this table widget's columns.
:return [<str>, ..]
"""
output = []
for c in range(self.columnCount()):
hitem = self.horizontalHeaderItem(c)
text = nativestring(hitem.tex... | python | def columns( self ):
"""
Returns the list of column names for this table widget's columns.
:return [<str>, ..]
"""
output = []
for c in range(self.columnCount()):
hitem = self.horizontalHeaderItem(c)
text = nativestring(hitem.tex... | [
"def",
"columns",
"(",
"self",
")",
":",
"output",
"=",
"[",
"]",
"for",
"c",
"in",
"range",
"(",
"self",
".",
"columnCount",
"(",
")",
")",
":",
"hitem",
"=",
"self",
".",
"horizontalHeaderItem",
"(",
"c",
")",
"text",
"=",
"nativestring",
"(",
"h... | Returns the list of column names for this table widget's columns.
:return [<str>, ..] | [
"Returns",
"the",
"list",
"of",
"column",
"names",
"for",
"this",
"table",
"widget",
"s",
"columns",
".",
":",
"return",
"[",
"<str",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtablewidget.py#L69-L82 | train | Returns the list of column names for this table widget s columns. |
bitesofcode/projexui | projexui/widgets/xtablewidget.py | XTableWidget.dataCollector | def dataCollector( self ):
"""
Returns a method or function that will be used to collect mime data \
for a list of tablewidgetitems. If set, the method should accept a \
single argument for a list of items and then return a QMimeData \
instance.
:usage |fro... | python | def dataCollector( self ):
"""
Returns a method or function that will be used to collect mime data \
for a list of tablewidgetitems. If set, the method should accept a \
single argument for a list of items and then return a QMimeData \
instance.
:usage |fro... | [
"def",
"dataCollector",
"(",
"self",
")",
":",
"func",
"=",
"None",
"if",
"(",
"self",
".",
"_dataCollectorRef",
")",
":",
"func",
"=",
"self",
".",
"_dataCollectorRef",
"(",
")",
"if",
"(",
"not",
"func",
")",
":",
"self",
".",
"_dataCollectorRef",
"=... | Returns a method or function that will be used to collect mime data \
for a list of tablewidgetitems. If set, the method should accept a \
single argument for a list of items and then return a QMimeData \
instance.
:usage |from projexui.qt.QtCore import QMimeData, QWidget
... | [
"Returns",
"a",
"method",
"or",
"function",
"that",
"will",
"be",
"used",
"to",
"collect",
"mime",
"data",
"\\",
"for",
"a",
"list",
"of",
"tablewidgetitems",
".",
"If",
"set",
"the",
"method",
"should",
"accept",
"a",
"\\",
"single",
"argument",
"for",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtablewidget.py#L84-L116 | train | Returns a method or function that will be used to collect mime data for a list of items. |
bitesofcode/projexui | projexui/widgets/xtablewidget.py | XTableWidget.dragEnterEvent | def dragEnterEvent( self, event ):
"""
Processes the drag drop event using the filter set by the \
setDragDropFilter
:param event | <QDragEvent>
"""
filt = self.dragDropFilter()
if ( filt and filt(self, event) ):
return
... | python | def dragEnterEvent( self, event ):
"""
Processes the drag drop event using the filter set by the \
setDragDropFilter
:param event | <QDragEvent>
"""
filt = self.dragDropFilter()
if ( filt and filt(self, event) ):
return
... | [
"def",
"dragEnterEvent",
"(",
"self",
",",
"event",
")",
":",
"filt",
"=",
"self",
".",
"dragDropFilter",
"(",
")",
"if",
"(",
"filt",
"and",
"filt",
"(",
"self",
",",
"event",
")",
")",
":",
"return",
"super",
"(",
"XTableWidget",
",",
"self",
")",
... | Processes the drag drop event using the filter set by the \
setDragDropFilter
:param event | <QDragEvent> | [
"Processes",
"the",
"drag",
"drop",
"event",
"using",
"the",
"filter",
"set",
"by",
"the",
"\\",
"setDragDropFilter",
":",
"param",
"event",
"|",
"<QDragEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtablewidget.py#L118-L129 | train | Processes the drag drop event using the filter set by the dragDropFilter
returns True if the event was handled by the filter set by the setDragDropFilter
otherwise returns False |
bitesofcode/projexui | projexui/widgets/xtablewidget.py | XTableWidget.dragMoveEvent | def dragMoveEvent( self, event ):
"""
Processes the drag drop event using the filter set by the \
setDragDropFilter
:param event | <QDragEvent>
"""
filt = self.dragDropFilter()
if ( filt and filt(self, event) ):
return
... | python | def dragMoveEvent( self, event ):
"""
Processes the drag drop event using the filter set by the \
setDragDropFilter
:param event | <QDragEvent>
"""
filt = self.dragDropFilter()
if ( filt and filt(self, event) ):
return
... | [
"def",
"dragMoveEvent",
"(",
"self",
",",
"event",
")",
":",
"filt",
"=",
"self",
".",
"dragDropFilter",
"(",
")",
"if",
"(",
"filt",
"and",
"filt",
"(",
"self",
",",
"event",
")",
")",
":",
"return",
"super",
"(",
"XTableWidget",
",",
"self",
")",
... | Processes the drag drop event using the filter set by the \
setDragDropFilter
:param event | <QDragEvent> | [
"Processes",
"the",
"drag",
"drop",
"event",
"using",
"the",
"filter",
"set",
"by",
"the",
"\\",
"setDragDropFilter",
":",
"param",
"event",
"|",
"<QDragEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtablewidget.py#L131-L142 | train | Processes the drag drop event using the filter set by the dragDropFilterProperty method. |
bitesofcode/projexui | projexui/widgets/xtablewidget.py | XTableWidget.dropEvent | def dropEvent( self, event ):
"""
Processes the drag drop event using the filter set by the \
setDragDropFilter
:param event | <QDropEvent>
"""
filt = self.dragDropFilter()
if ( filt and not filt(self, event) ):
return
su... | python | def dropEvent( self, event ):
"""
Processes the drag drop event using the filter set by the \
setDragDropFilter
:param event | <QDropEvent>
"""
filt = self.dragDropFilter()
if ( filt and not filt(self, event) ):
return
su... | [
"def",
"dropEvent",
"(",
"self",
",",
"event",
")",
":",
"filt",
"=",
"self",
".",
"dragDropFilter",
"(",
")",
"if",
"(",
"filt",
"and",
"not",
"filt",
"(",
"self",
",",
"event",
")",
")",
":",
"return",
"super",
"(",
"XTableWidget",
",",
"self",
"... | Processes the drag drop event using the filter set by the \
setDragDropFilter
:param event | <QDropEvent> | [
"Processes",
"the",
"drag",
"drop",
"event",
"using",
"the",
"filter",
"set",
"by",
"the",
"\\",
"setDragDropFilter",
":",
"param",
"event",
"|",
"<QDropEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtablewidget.py#L175-L186 | train | Processes the drag drop event and returns the related object. |
bitesofcode/projexui | projexui/widgets/xtablewidget.py | XTableWidget.mimeData | def mimeData( self, items ):
"""
Returns the mime data for dragging for this instance.
:param items | [<QTableWidgetItem>, ..]
"""
func = self.dataCollector()
if ( func ):
return func(self, items)
return super(XTableWidget, s... | python | def mimeData( self, items ):
"""
Returns the mime data for dragging for this instance.
:param items | [<QTableWidgetItem>, ..]
"""
func = self.dataCollector()
if ( func ):
return func(self, items)
return super(XTableWidget, s... | [
"def",
"mimeData",
"(",
"self",
",",
"items",
")",
":",
"func",
"=",
"self",
".",
"dataCollector",
"(",
")",
"if",
"(",
"func",
")",
":",
"return",
"func",
"(",
"self",
",",
"items",
")",
"return",
"super",
"(",
"XTableWidget",
",",
"self",
")",
".... | Returns the mime data for dragging for this instance.
:param items | [<QTableWidgetItem>, ..] | [
"Returns",
"the",
"mime",
"data",
"for",
"dragging",
"for",
"this",
"instance",
".",
":",
"param",
"items",
"|",
"[",
"<QTableWidgetItem",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtablewidget.py#L188-L198 | train | Returns the mime data for dragging for this instance. |
bitesofcode/projexui | projexui/widgets/xtablewidget.py | XTableWidget.setColumns | def setColumns( self, columns ):
"""
Sets the column count and list of columns to the inputed column list.
:param columns | [<str>, ..]
"""
self.setColumnCount(len(columns))
self.setHorizontalHeaderLabels(columns) | python | def setColumns( self, columns ):
"""
Sets the column count and list of columns to the inputed column list.
:param columns | [<str>, ..]
"""
self.setColumnCount(len(columns))
self.setHorizontalHeaderLabels(columns) | [
"def",
"setColumns",
"(",
"self",
",",
"columns",
")",
":",
"self",
".",
"setColumnCount",
"(",
"len",
"(",
"columns",
")",
")",
"self",
".",
"setHorizontalHeaderLabels",
"(",
"columns",
")"
] | Sets the column count and list of columns to the inputed column list.
:param columns | [<str>, ..] | [
"Sets",
"the",
"column",
"count",
"and",
"list",
"of",
"columns",
"to",
"the",
"inputed",
"column",
"list",
".",
":",
"param",
"columns",
"|",
"[",
"<str",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtablewidget.py#L200-L207 | train | Sets the column count and horizontal header labels for the given list of columns. |
viatoriche/microservices | microservices/utils/__init__.py | dict_update | def dict_update(d, u):
"""Recursive dict update
:param d: goal dict
:param u: updates for d
:return: new dict
"""
for k, v in six.iteritems(u):
if isinstance(v, collections.Mapping):
r = dict_update(d.get(k, {}), v)
d[k] = r
else:
d[k] = u[k]
... | python | def dict_update(d, u):
"""Recursive dict update
:param d: goal dict
:param u: updates for d
:return: new dict
"""
for k, v in six.iteritems(u):
if isinstance(v, collections.Mapping):
r = dict_update(d.get(k, {}), v)
d[k] = r
else:
d[k] = u[k]
... | [
"def",
"dict_update",
"(",
"d",
",",
"u",
")",
":",
"for",
"k",
",",
"v",
"in",
"six",
".",
"iteritems",
"(",
"u",
")",
":",
"if",
"isinstance",
"(",
"v",
",",
"collections",
".",
"Mapping",
")",
":",
"r",
"=",
"dict_update",
"(",
"d",
".",
"ge... | Recursive dict update
:param d: goal dict
:param u: updates for d
:return: new dict | [
"Recursive",
"dict",
"update"
] | 3510563edd15dc6131b8a948d6062856cd904ac7 | https://github.com/viatoriche/microservices/blob/3510563edd15dc6131b8a948d6062856cd904ac7/microservices/utils/__init__.py#L39-L52 | train | Recursive dict update of the dict d with the contents of u |
gamechanger/confluent_schema_registry_client | confluent_schema_registry_client/__init__.py | SchemaRegistryClient.get_schema | def get_schema(self, schema_id):
"""
Retrieves the schema with the given schema_id from the registry
and returns it as a `dict`.
"""
res = requests.get(self._url('/schemas/ids/{}', schema_id))
raise_if_failed(res)
return json.loads(res.json()['schema']) | python | def get_schema(self, schema_id):
"""
Retrieves the schema with the given schema_id from the registry
and returns it as a `dict`.
"""
res = requests.get(self._url('/schemas/ids/{}', schema_id))
raise_if_failed(res)
return json.loads(res.json()['schema']) | [
"def",
"get_schema",
"(",
"self",
",",
"schema_id",
")",
":",
"res",
"=",
"requests",
".",
"get",
"(",
"self",
".",
"_url",
"(",
"'/schemas/ids/{}'",
",",
"schema_id",
")",
")",
"raise_if_failed",
"(",
"res",
")",
"return",
"json",
".",
"loads",
"(",
"... | Retrieves the schema with the given schema_id from the registry
and returns it as a `dict`. | [
"Retrieves",
"the",
"schema",
"with",
"the",
"given",
"schema_id",
"from",
"the",
"registry",
"and",
"returns",
"it",
"as",
"a",
"dict",
"."
] | ac9196e366724eeb2f19f1a169fd2f9a0c8d68ae | https://github.com/gamechanger/confluent_schema_registry_client/blob/ac9196e366724eeb2f19f1a169fd2f9a0c8d68ae/confluent_schema_registry_client/__init__.py#L51-L58 | train | Retrieves the schema with the given schema_id from the registry
and returns it as a dict. |
gamechanger/confluent_schema_registry_client | confluent_schema_registry_client/__init__.py | SchemaRegistryClient.get_subjects | def get_subjects(self):
"""
Returns the list of subject names present in the schema registry.
"""
res = requests.get(self._url('/subjects'))
raise_if_failed(res)
return res.json() | python | def get_subjects(self):
"""
Returns the list of subject names present in the schema registry.
"""
res = requests.get(self._url('/subjects'))
raise_if_failed(res)
return res.json() | [
"def",
"get_subjects",
"(",
"self",
")",
":",
"res",
"=",
"requests",
".",
"get",
"(",
"self",
".",
"_url",
"(",
"'/subjects'",
")",
")",
"raise_if_failed",
"(",
"res",
")",
"return",
"res",
".",
"json",
"(",
")"
] | Returns the list of subject names present in the schema registry. | [
"Returns",
"the",
"list",
"of",
"subject",
"names",
"present",
"in",
"the",
"schema",
"registry",
"."
] | ac9196e366724eeb2f19f1a169fd2f9a0c8d68ae | https://github.com/gamechanger/confluent_schema_registry_client/blob/ac9196e366724eeb2f19f1a169fd2f9a0c8d68ae/confluent_schema_registry_client/__init__.py#L60-L66 | train | Returns the list of subject names present in the schema registry. |
gamechanger/confluent_schema_registry_client | confluent_schema_registry_client/__init__.py | SchemaRegistryClient.get_subject_version_ids | def get_subject_version_ids(self, subject):
"""
Return the list of schema version ids which have been registered
under the given subject.
"""
res = requests.get(self._url('/subjects/{}/versions', subject))
raise_if_failed(res)
return res.json() | python | def get_subject_version_ids(self, subject):
"""
Return the list of schema version ids which have been registered
under the given subject.
"""
res = requests.get(self._url('/subjects/{}/versions', subject))
raise_if_failed(res)
return res.json() | [
"def",
"get_subject_version_ids",
"(",
"self",
",",
"subject",
")",
":",
"res",
"=",
"requests",
".",
"get",
"(",
"self",
".",
"_url",
"(",
"'/subjects/{}/versions'",
",",
"subject",
")",
")",
"raise_if_failed",
"(",
"res",
")",
"return",
"res",
".",
"json... | Return the list of schema version ids which have been registered
under the given subject. | [
"Return",
"the",
"list",
"of",
"schema",
"version",
"ids",
"which",
"have",
"been",
"registered",
"under",
"the",
"given",
"subject",
"."
] | ac9196e366724eeb2f19f1a169fd2f9a0c8d68ae | https://github.com/gamechanger/confluent_schema_registry_client/blob/ac9196e366724eeb2f19f1a169fd2f9a0c8d68ae/confluent_schema_registry_client/__init__.py#L68-L75 | train | Get the list of schema version ids which have been registered under the given subject. |
gamechanger/confluent_schema_registry_client | confluent_schema_registry_client/__init__.py | SchemaRegistryClient.get_subject_version | def get_subject_version(self, subject, version_id):
"""
Retrieves the schema registered under the given subject with
the given version id. Returns the schema as a `dict`.
"""
res = requests.get(self._url('/subjects/{}/versions/{}', subject, version_id))
raise_if_failed(re... | python | def get_subject_version(self, subject, version_id):
"""
Retrieves the schema registered under the given subject with
the given version id. Returns the schema as a `dict`.
"""
res = requests.get(self._url('/subjects/{}/versions/{}', subject, version_id))
raise_if_failed(re... | [
"def",
"get_subject_version",
"(",
"self",
",",
"subject",
",",
"version_id",
")",
":",
"res",
"=",
"requests",
".",
"get",
"(",
"self",
".",
"_url",
"(",
"'/subjects/{}/versions/{}'",
",",
"subject",
",",
"version_id",
")",
")",
"raise_if_failed",
"(",
"res... | Retrieves the schema registered under the given subject with
the given version id. Returns the schema as a `dict`. | [
"Retrieves",
"the",
"schema",
"registered",
"under",
"the",
"given",
"subject",
"with",
"the",
"given",
"version",
"id",
".",
"Returns",
"the",
"schema",
"as",
"a",
"dict",
"."
] | ac9196e366724eeb2f19f1a169fd2f9a0c8d68ae | https://github.com/gamechanger/confluent_schema_registry_client/blob/ac9196e366724eeb2f19f1a169fd2f9a0c8d68ae/confluent_schema_registry_client/__init__.py#L77-L84 | train | Retrieves the schema registered under the given subject with
the given version id. Returns the schema as a dict. |
gamechanger/confluent_schema_registry_client | confluent_schema_registry_client/__init__.py | SchemaRegistryClient.register_subject_version | def register_subject_version(self, subject, schema):
"""
Registers the given schema (provided as a `dict`) to the given
subject. Returns the id allocated to the schema in the registry.
"""
data = json.dumps({'schema': json.dumps(schema)})
res = requests.post(self._url('/s... | python | def register_subject_version(self, subject, schema):
"""
Registers the given schema (provided as a `dict`) to the given
subject. Returns the id allocated to the schema in the registry.
"""
data = json.dumps({'schema': json.dumps(schema)})
res = requests.post(self._url('/s... | [
"def",
"register_subject_version",
"(",
"self",
",",
"subject",
",",
"schema",
")",
":",
"data",
"=",
"json",
".",
"dumps",
"(",
"{",
"'schema'",
":",
"json",
".",
"dumps",
"(",
"schema",
")",
"}",
")",
"res",
"=",
"requests",
".",
"post",
"(",
"self... | Registers the given schema (provided as a `dict`) to the given
subject. Returns the id allocated to the schema in the registry. | [
"Registers",
"the",
"given",
"schema",
"(",
"provided",
"as",
"a",
"dict",
")",
"to",
"the",
"given",
"subject",
".",
"Returns",
"the",
"id",
"allocated",
"to",
"the",
"schema",
"in",
"the",
"registry",
"."
] | ac9196e366724eeb2f19f1a169fd2f9a0c8d68ae | https://github.com/gamechanger/confluent_schema_registry_client/blob/ac9196e366724eeb2f19f1a169fd2f9a0c8d68ae/confluent_schema_registry_client/__init__.py#L93-L101 | train | Registers the given schema to the given subject. Returns the id allocated to the schema in the registry. |
gamechanger/confluent_schema_registry_client | confluent_schema_registry_client/__init__.py | SchemaRegistryClient.schema_is_registered_for_subject | def schema_is_registered_for_subject(self, subject, schema):
"""
Returns True if the given schema is already registered under the
given subject.
"""
data = json.dumps({'schema': json.dumps(schema)})
res = requests.post(self._url('/subjects/{}', subject), data=data, header... | python | def schema_is_registered_for_subject(self, subject, schema):
"""
Returns True if the given schema is already registered under the
given subject.
"""
data = json.dumps({'schema': json.dumps(schema)})
res = requests.post(self._url('/subjects/{}', subject), data=data, header... | [
"def",
"schema_is_registered_for_subject",
"(",
"self",
",",
"subject",
",",
"schema",
")",
":",
"data",
"=",
"json",
".",
"dumps",
"(",
"{",
"'schema'",
":",
"json",
".",
"dumps",
"(",
"schema",
")",
"}",
")",
"res",
"=",
"requests",
".",
"post",
"(",... | Returns True if the given schema is already registered under the
given subject. | [
"Returns",
"True",
"if",
"the",
"given",
"schema",
"is",
"already",
"registered",
"under",
"the",
"given",
"subject",
"."
] | ac9196e366724eeb2f19f1a169fd2f9a0c8d68ae | https://github.com/gamechanger/confluent_schema_registry_client/blob/ac9196e366724eeb2f19f1a169fd2f9a0c8d68ae/confluent_schema_registry_client/__init__.py#L115-L125 | train | Returns True if the given schema is already registered under the given subject. |
gamechanger/confluent_schema_registry_client | confluent_schema_registry_client/__init__.py | SchemaRegistryClient.get_global_compatibility_level | def get_global_compatibility_level(self):
"""
Gets the global compatibility level.
"""
res = requests.get(self._url('/config'), headers=HEADERS)
raise_if_failed(res)
return res.json()['compatibility'] | python | def get_global_compatibility_level(self):
"""
Gets the global compatibility level.
"""
res = requests.get(self._url('/config'), headers=HEADERS)
raise_if_failed(res)
return res.json()['compatibility'] | [
"def",
"get_global_compatibility_level",
"(",
"self",
")",
":",
"res",
"=",
"requests",
".",
"get",
"(",
"self",
".",
"_url",
"(",
"'/config'",
")",
",",
"headers",
"=",
"HEADERS",
")",
"raise_if_failed",
"(",
"res",
")",
"return",
"res",
".",
"json",
"(... | Gets the global compatibility level. | [
"Gets",
"the",
"global",
"compatibility",
"level",
"."
] | ac9196e366724eeb2f19f1a169fd2f9a0c8d68ae | https://github.com/gamechanger/confluent_schema_registry_client/blob/ac9196e366724eeb2f19f1a169fd2f9a0c8d68ae/confluent_schema_registry_client/__init__.py#L152-L158 | train | Gets the global compatibility level. |
gamechanger/confluent_schema_registry_client | confluent_schema_registry_client/__init__.py | SchemaRegistryClient.set_subject_compatibility_level | def set_subject_compatibility_level(self, subject, level):
"""
Sets the compatibility level for the given subject.
"""
res = requests.put(
self._url('/config/{}', subject),
data=json.dumps({'compatibility': level}),
headers=HEADERS)
raise_if_fa... | python | def set_subject_compatibility_level(self, subject, level):
"""
Sets the compatibility level for the given subject.
"""
res = requests.put(
self._url('/config/{}', subject),
data=json.dumps({'compatibility': level}),
headers=HEADERS)
raise_if_fa... | [
"def",
"set_subject_compatibility_level",
"(",
"self",
",",
"subject",
",",
"level",
")",
":",
"res",
"=",
"requests",
".",
"put",
"(",
"self",
".",
"_url",
"(",
"'/config/{}'",
",",
"subject",
")",
",",
"data",
"=",
"json",
".",
"dumps",
"(",
"{",
"'c... | Sets the compatibility level for the given subject. | [
"Sets",
"the",
"compatibility",
"level",
"for",
"the",
"given",
"subject",
"."
] | ac9196e366724eeb2f19f1a169fd2f9a0c8d68ae | https://github.com/gamechanger/confluent_schema_registry_client/blob/ac9196e366724eeb2f19f1a169fd2f9a0c8d68ae/confluent_schema_registry_client/__init__.py#L160-L168 | train | Sets the compatibility level for the given subject. |
gamechanger/confluent_schema_registry_client | confluent_schema_registry_client/__init__.py | SchemaRegistryClient.get_subject_compatibility_level | def get_subject_compatibility_level(self, subject):
"""
Gets the compatibility level for the given subject.
"""
res = requests.get(self._url('/config/{}', subject), headers=HEADERS)
raise_if_failed(res)
return res.json()['compatibility'] | python | def get_subject_compatibility_level(self, subject):
"""
Gets the compatibility level for the given subject.
"""
res = requests.get(self._url('/config/{}', subject), headers=HEADERS)
raise_if_failed(res)
return res.json()['compatibility'] | [
"def",
"get_subject_compatibility_level",
"(",
"self",
",",
"subject",
")",
":",
"res",
"=",
"requests",
".",
"get",
"(",
"self",
".",
"_url",
"(",
"'/config/{}'",
",",
"subject",
")",
",",
"headers",
"=",
"HEADERS",
")",
"raise_if_failed",
"(",
"res",
")"... | Gets the compatibility level for the given subject. | [
"Gets",
"the",
"compatibility",
"level",
"for",
"the",
"given",
"subject",
"."
] | ac9196e366724eeb2f19f1a169fd2f9a0c8d68ae | https://github.com/gamechanger/confluent_schema_registry_client/blob/ac9196e366724eeb2f19f1a169fd2f9a0c8d68ae/confluent_schema_registry_client/__init__.py#L170-L176 | train | Gets the compatibility level for the given subject. |
wrboyce/telegrambot | telegrambot/api/base.py | APIObject.from_api | def from_api(cls, api, **kwargs):
""" Parses a payload from the API, guided by `_api_attrs` """
if not cls._api_attrs:
raise NotImplementedError()
def resolve_attribute_type(attr_type):
# resolve arrays of types down to base type
while isinstance(attr_type, l... | python | def from_api(cls, api, **kwargs):
""" Parses a payload from the API, guided by `_api_attrs` """
if not cls._api_attrs:
raise NotImplementedError()
def resolve_attribute_type(attr_type):
# resolve arrays of types down to base type
while isinstance(attr_type, l... | [
"def",
"from_api",
"(",
"cls",
",",
"api",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"not",
"cls",
".",
"_api_attrs",
":",
"raise",
"NotImplementedError",
"(",
")",
"def",
"resolve_attribute_type",
"(",
"attr_type",
")",
":",
"# resolve arrays of types down to ... | Parses a payload from the API, guided by `_api_attrs` | [
"Parses",
"a",
"payload",
"from",
"the",
"API",
"guided",
"by",
"_api_attrs"
] | c35ce19886df4c306a2a19851cc1f63e3066d70d | https://github.com/wrboyce/telegrambot/blob/c35ce19886df4c306a2a19851cc1f63e3066d70d/telegrambot/api/base.py#L21-L76 | train | Parses a payload from the API and returns a new instance of the class cls. |
wrboyce/telegrambot | telegrambot/api/base.py | APIObject.api_method | def api_method(self):
""" Returns the api method to `send` the current API Object type """
if not self._api_method:
raise NotImplementedError()
return getattr(self.api, self._api_method) | python | def api_method(self):
""" Returns the api method to `send` the current API Object type """
if not self._api_method:
raise NotImplementedError()
return getattr(self.api, self._api_method) | [
"def",
"api_method",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"_api_method",
":",
"raise",
"NotImplementedError",
"(",
")",
"return",
"getattr",
"(",
"self",
".",
"api",
",",
"self",
".",
"_api_method",
")"
] | Returns the api method to `send` the current API Object type | [
"Returns",
"the",
"api",
"method",
"to",
"send",
"the",
"current",
"API",
"Object",
"type"
] | c35ce19886df4c306a2a19851cc1f63e3066d70d | https://github.com/wrboyce/telegrambot/blob/c35ce19886df4c306a2a19851cc1f63e3066d70d/telegrambot/api/base.py#L78-L82 | train | Returns the api method to send the current API Object type |
wrboyce/telegrambot | telegrambot/api/base.py | APIObject.api_payload | def api_payload(self):
""" Generates a payload ready for submission to the API, guided by `_api_payload` """
if not self._api_payload:
raise NotImplementedError()
payload = {}
for attr_name in self._api_payload:
value = getattr(self, attr_name, None)
i... | python | def api_payload(self):
""" Generates a payload ready for submission to the API, guided by `_api_payload` """
if not self._api_payload:
raise NotImplementedError()
payload = {}
for attr_name in self._api_payload:
value = getattr(self, attr_name, None)
i... | [
"def",
"api_payload",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"_api_payload",
":",
"raise",
"NotImplementedError",
"(",
")",
"payload",
"=",
"{",
"}",
"for",
"attr_name",
"in",
"self",
".",
"_api_payload",
":",
"value",
"=",
"getattr",
"(",
"sel... | Generates a payload ready for submission to the API, guided by `_api_payload` | [
"Generates",
"a",
"payload",
"ready",
"for",
"submission",
"to",
"the",
"API",
"guided",
"by",
"_api_payload"
] | c35ce19886df4c306a2a19851cc1f63e3066d70d | https://github.com/wrboyce/telegrambot/blob/c35ce19886df4c306a2a19851cc1f63e3066d70d/telegrambot/api/base.py#L84-L93 | train | Generates a dict ready for submission to the API. |
wrboyce/telegrambot | telegrambot/api/base.py | APIObject.send | def send(self, **kwargs):
""" Combines api_payload and api_method to submit the current object to the API """
payload = self.api_payload()
payload.update(**kwargs)
return self.api_method()(**payload) | python | def send(self, **kwargs):
""" Combines api_payload and api_method to submit the current object to the API """
payload = self.api_payload()
payload.update(**kwargs)
return self.api_method()(**payload) | [
"def",
"send",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"payload",
"=",
"self",
".",
"api_payload",
"(",
")",
"payload",
".",
"update",
"(",
"*",
"*",
"kwargs",
")",
"return",
"self",
".",
"api_method",
"(",
")",
"(",
"*",
"*",
"payload",
... | Combines api_payload and api_method to submit the current object to the API | [
"Combines",
"api_payload",
"and",
"api_method",
"to",
"submit",
"the",
"current",
"object",
"to",
"the",
"API"
] | c35ce19886df4c306a2a19851cc1f63e3066d70d | https://github.com/wrboyce/telegrambot/blob/c35ce19886df4c306a2a19851cc1f63e3066d70d/telegrambot/api/base.py#L95-L99 | train | Combines api_payload and api_method to submit the current object to the API |
bitesofcode/projexui | projexui/widgets/xchart/axes/xdatasetaxis.py | XDatasetAxis.calculateValues | def calculateValues(self):
"""
Overloads the calculate values method to calculate the values for
this axis based on the minimum and maximum values, and the number
of steps desired.
:return [<variant>, ..]
"""
chart = self.chart()
if n... | python | def calculateValues(self):
"""
Overloads the calculate values method to calculate the values for
this axis based on the minimum and maximum values, and the number
of steps desired.
:return [<variant>, ..]
"""
chart = self.chart()
if n... | [
"def",
"calculateValues",
"(",
"self",
")",
":",
"chart",
"=",
"self",
".",
"chart",
"(",
")",
"if",
"not",
"chart",
":",
"return",
"super",
"(",
"XDatasetAxis",
",",
"self",
")",
".",
"calculateValues",
"(",
")",
"else",
":",
"values",
"=",
"[",
"]"... | Overloads the calculate values method to calculate the values for
this axis based on the minimum and maximum values, and the number
of steps desired.
:return [<variant>, ..] | [
"Overloads",
"the",
"calculate",
"values",
"method",
"to",
"calculate",
"the",
"values",
"for",
"this",
"axis",
"based",
"on",
"the",
"minimum",
"and",
"maximum",
"values",
"and",
"the",
"number",
"of",
"steps",
"desired",
".",
":",
"return",
"[",
"<variant"... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchart/axes/xdatasetaxis.py#L20-L36 | train | Returns a list of values for the current axis. |
bitesofcode/projexui | projexui/widgets/xactiongroupwidget.py | XActionGroupWidget.addAction | def addAction( self, action ):
"""
Adds the inputed action to this widget's action group. This will auto-\
create a new group if no group is already defined.
:param action | <QAction> || <str>
:return <QAction>
"""
if not isinstance(act... | python | def addAction( self, action ):
"""
Adds the inputed action to this widget's action group. This will auto-\
create a new group if no group is already defined.
:param action | <QAction> || <str>
:return <QAction>
"""
if not isinstance(act... | [
"def",
"addAction",
"(",
"self",
",",
"action",
")",
":",
"if",
"not",
"isinstance",
"(",
"action",
",",
"QAction",
")",
":",
"action_name",
"=",
"nativestring",
"(",
"action",
")",
"action",
"=",
"QAction",
"(",
"action_name",
",",
"self",
")",
"action"... | Adds the inputed action to this widget's action group. This will auto-\
create a new group if no group is already defined.
:param action | <QAction> || <str>
:return <QAction> | [
"Adds",
"the",
"inputed",
"action",
"to",
"this",
"widget",
"s",
"action",
"group",
".",
"This",
"will",
"auto",
"-",
"\\",
"create",
"a",
"new",
"group",
"if",
"no",
"group",
"is",
"already",
"defined",
".",
":",
"param",
"action",
"|",
"<QAction",
">... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xactiongroupwidget.py#L110-L132 | train | Adds the inputed action to this widget s action group. |
bitesofcode/projexui | projexui/widgets/xactiongroupwidget.py | XActionGroupWidget.currentAction | def currentAction( self ):
"""
Returns the action that is currently checked in the system.
:return <QAction> || None
"""
if ( not self._actionGroup ):
return None
for act in self._actionGroup.actions():
if ( act.isChecked(... | python | def currentAction( self ):
"""
Returns the action that is currently checked in the system.
:return <QAction> || None
"""
if ( not self._actionGroup ):
return None
for act in self._actionGroup.actions():
if ( act.isChecked(... | [
"def",
"currentAction",
"(",
"self",
")",
":",
"if",
"(",
"not",
"self",
".",
"_actionGroup",
")",
":",
"return",
"None",
"for",
"act",
"in",
"self",
".",
"_actionGroup",
".",
"actions",
"(",
")",
":",
"if",
"(",
"act",
".",
"isChecked",
"(",
")",
... | Returns the action that is currently checked in the system.
:return <QAction> || None | [
"Returns",
"the",
"action",
"that",
"is",
"currently",
"checked",
"in",
"the",
"system",
".",
":",
"return",
"<QAction",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xactiongroupwidget.py#L150-L162 | train | Returns the current action that is currently checked in the system. |
bitesofcode/projexui | projexui/widgets/xactiongroupwidget.py | XActionGroupWidget.findAction | def findAction( self, text ):
"""
Looks up the action based on the inputed text.
:return <QAction> || None
"""
for action in self.actionGroup().actions():
if ( text in (action.objectName(), action.text()) ):
return action
return No... | python | def findAction( self, text ):
"""
Looks up the action based on the inputed text.
:return <QAction> || None
"""
for action in self.actionGroup().actions():
if ( text in (action.objectName(), action.text()) ):
return action
return No... | [
"def",
"findAction",
"(",
"self",
",",
"text",
")",
":",
"for",
"action",
"in",
"self",
".",
"actionGroup",
"(",
")",
".",
"actions",
"(",
")",
":",
"if",
"(",
"text",
"in",
"(",
"action",
".",
"objectName",
"(",
")",
",",
"action",
".",
"text",
... | Looks up the action based on the inputed text.
:return <QAction> || None | [
"Looks",
"up",
"the",
"action",
"based",
"on",
"the",
"inputed",
"text",
".",
":",
"return",
"<QAction",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xactiongroupwidget.py#L172-L181 | train | Searches the action group for the given text. |
bitesofcode/projexui | projexui/widgets/xactiongroupwidget.py | XActionGroupWidget.reset | def reset( self ):
"""
Resets the user interface buttons for this widget.
"""
# clear previous widgets
for btn in self.findChildren(QToolButton):
btn.close()
btn.setParent(None)
btn.deleteLater()
# determine coloring options
... | python | def reset( self ):
"""
Resets the user interface buttons for this widget.
"""
# clear previous widgets
for btn in self.findChildren(QToolButton):
btn.close()
btn.setParent(None)
btn.deleteLater()
# determine coloring options
... | [
"def",
"reset",
"(",
"self",
")",
":",
"# clear previous widgets",
"for",
"btn",
"in",
"self",
".",
"findChildren",
"(",
"QToolButton",
")",
":",
"btn",
".",
"close",
"(",
")",
"btn",
".",
"setParent",
"(",
"None",
")",
"btn",
".",
"deleteLater",
"(",
... | Resets the user interface buttons for this widget. | [
"Resets",
"the",
"user",
"interface",
"buttons",
"for",
"this",
"widget",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xactiongroupwidget.py#L191-L295 | train | Resets the user interface buttons for this widget. |
johnnoone/aioconsul | aioconsul/common/addr.py | parse_addr | def parse_addr(addr, *, proto=None, host=None):
"""Parses an address
Returns:
Address: the parsed address
"""
port = None
if isinstance(addr, Address):
return addr
elif isinstance(addr, str):
if addr.startswith('http://'):
proto, addr = 'http', addr[7:]
... | python | def parse_addr(addr, *, proto=None, host=None):
"""Parses an address
Returns:
Address: the parsed address
"""
port = None
if isinstance(addr, Address):
return addr
elif isinstance(addr, str):
if addr.startswith('http://'):
proto, addr = 'http', addr[7:]
... | [
"def",
"parse_addr",
"(",
"addr",
",",
"*",
",",
"proto",
"=",
"None",
",",
"host",
"=",
"None",
")",
":",
"port",
"=",
"None",
"if",
"isinstance",
"(",
"addr",
",",
"Address",
")",
":",
"return",
"addr",
"elif",
"isinstance",
"(",
"addr",
",",
"st... | Parses an address
Returns:
Address: the parsed address | [
"Parses",
"an",
"address"
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/common/addr.py#L12-L46 | train | Parses an address into a new Address object |
bitesofcode/projexui | projexui/widgets/xquerybuilderwidget/xquerylinewidget.py | XQueryLineWidget.applyRule | def applyRule( self ):
"""
Applies the rule from the builder system to this line edit.
"""
widget = self.queryBuilderWidget()
if ( not widget ):
return
rule = widget.findRule(self.uiTermDDL.currentText())
self.setCurrentRule(rule) | python | def applyRule( self ):
"""
Applies the rule from the builder system to this line edit.
"""
widget = self.queryBuilderWidget()
if ( not widget ):
return
rule = widget.findRule(self.uiTermDDL.currentText())
self.setCurrentRule(rule) | [
"def",
"applyRule",
"(",
"self",
")",
":",
"widget",
"=",
"self",
".",
"queryBuilderWidget",
"(",
")",
"if",
"(",
"not",
"widget",
")",
":",
"return",
"rule",
"=",
"widget",
".",
"findRule",
"(",
"self",
".",
"uiTermDDL",
".",
"currentText",
"(",
")",
... | Applies the rule from the builder system to this line edit. | [
"Applies",
"the",
"rule",
"from",
"the",
"builder",
"system",
"to",
"this",
"line",
"edit",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xquerybuilderwidget/xquerylinewidget.py#L53-L62 | train | Applies the rule from the builder system to this line edit. |
bitesofcode/projexui | projexui/widgets/xquerybuilderwidget/xquerylinewidget.py | XQueryLineWidget.query | def query( self ):
"""
Returns the query that will be used for the widget.
:return (<str> term, <str> operator, <str> value)
"""
widget = self.uiWidgetAREA.widget()
if ( widget and type(widget) != QWidget ):
value = nativestring(widget.text())
... | python | def query( self ):
"""
Returns the query that will be used for the widget.
:return (<str> term, <str> operator, <str> value)
"""
widget = self.uiWidgetAREA.widget()
if ( widget and type(widget) != QWidget ):
value = nativestring(widget.text())
... | [
"def",
"query",
"(",
"self",
")",
":",
"widget",
"=",
"self",
".",
"uiWidgetAREA",
".",
"widget",
"(",
")",
"if",
"(",
"widget",
"and",
"type",
"(",
"widget",
")",
"!=",
"QWidget",
")",
":",
"value",
"=",
"nativestring",
"(",
"widget",
".",
"text",
... | Returns the query that will be used for the widget.
:return (<str> term, <str> operator, <str> value) | [
"Returns",
"the",
"query",
"that",
"will",
"be",
"used",
"for",
"the",
"widget",
".",
":",
"return",
"(",
"<str",
">",
"term",
"<str",
">",
"operator",
"<str",
">",
"value",
")"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xquerybuilderwidget/xquerylinewidget.py#L137-L153 | train | Returns the query that will be used for the widget. |
bitesofcode/projexui | projexui/widgets/xquerybuilderwidget/xquerylinewidget.py | XQueryLineWidget.queryBuilderWidget | def queryBuilderWidget( self ):
"""
Returns the query builder widget instance that this widget is \
associated with.
:return <XQueryBuilderWidget>
"""
from projexui.widgets.xquerybuilderwidget import XQueryBuilderWidget
builder = self.parent(... | python | def queryBuilderWidget( self ):
"""
Returns the query builder widget instance that this widget is \
associated with.
:return <XQueryBuilderWidget>
"""
from projexui.widgets.xquerybuilderwidget import XQueryBuilderWidget
builder = self.parent(... | [
"def",
"queryBuilderWidget",
"(",
"self",
")",
":",
"from",
"projexui",
".",
"widgets",
".",
"xquerybuilderwidget",
"import",
"XQueryBuilderWidget",
"builder",
"=",
"self",
".",
"parent",
"(",
")",
"while",
"(",
"builder",
"and",
"not",
"isinstance",
"(",
"bui... | Returns the query builder widget instance that this widget is \
associated with.
:return <XQueryBuilderWidget> | [
"Returns",
"the",
"query",
"builder",
"widget",
"instance",
"that",
"this",
"widget",
"is",
"\\",
"associated",
"with",
".",
":",
"return",
"<XQueryBuilderWidget",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xquerybuilderwidget/xquerylinewidget.py#L155-L168 | train | Returns the query builder widget that this widget is associated with. |
bitesofcode/projexui | projexui/widgets/xquerybuilderwidget/xquerylinewidget.py | XQueryLineWidget.setCurrentRule | def setCurrentRule( self, rule ):
"""
Sets the current query rule for this widget, updating its widget \
editor if the types do not match.
:param rule | <QueryRule> || None
"""
curr_rule = self.currentRule()
if ( curr_rule == rule ):
retu... | python | def setCurrentRule( self, rule ):
"""
Sets the current query rule for this widget, updating its widget \
editor if the types do not match.
:param rule | <QueryRule> || None
"""
curr_rule = self.currentRule()
if ( curr_rule == rule ):
retu... | [
"def",
"setCurrentRule",
"(",
"self",
",",
"rule",
")",
":",
"curr_rule",
"=",
"self",
".",
"currentRule",
"(",
")",
"if",
"(",
"curr_rule",
"==",
"rule",
")",
":",
"return",
"self",
".",
"_currentRule",
"=",
"rule",
"curr_op",
"=",
"self",
".",
"uiOpe... | Sets the current query rule for this widget, updating its widget \
editor if the types do not match.
:param rule | <QueryRule> || None | [
"Sets",
"the",
"current",
"query",
"rule",
"for",
"this",
"widget",
"updating",
"its",
"widget",
"\\",
"editor",
"if",
"the",
"types",
"do",
"not",
"match",
".",
":",
"param",
"rule",
"|",
"<QueryRule",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xquerybuilderwidget/xquerylinewidget.py#L178-L202 | train | Sets the current query rule for this widget updating its editor if the types do not match. |
bitesofcode/projexui | projexui/widgets/xquerybuilderwidget/xquerylinewidget.py | XQueryLineWidget.setQuery | def setQuery( self, query ):
"""
Sets the query that is used for this widget to the inputed query.
:param query | (<str> term, <str> operator, <str> value)
:return <bool> | success
"""
if ( not (type(query) in (list, tuple) and len(query) == 3) ... | python | def setQuery( self, query ):
"""
Sets the query that is used for this widget to the inputed query.
:param query | (<str> term, <str> operator, <str> value)
:return <bool> | success
"""
if ( not (type(query) in (list, tuple) and len(query) == 3) ... | [
"def",
"setQuery",
"(",
"self",
",",
"query",
")",
":",
"if",
"(",
"not",
"(",
"type",
"(",
"query",
")",
"in",
"(",
"list",
",",
"tuple",
")",
"and",
"len",
"(",
"query",
")",
"==",
"3",
")",
")",
":",
"return",
"False",
"term",
",",
"op",
"... | Sets the query that is used for this widget to the inputed query.
:param query | (<str> term, <str> operator, <str> value)
:return <bool> | success | [
"Sets",
"the",
"query",
"that",
"is",
"used",
"for",
"this",
"widget",
"to",
"the",
"inputed",
"query",
".",
":",
"param",
"query",
"|",
"(",
"<str",
">",
"term",
"<str",
">",
"operator",
"<str",
">",
"value",
")",
":",
"return",
"<bool",
">",
"|",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xquerybuilderwidget/xquerylinewidget.py#L212-L237 | train | Sets the query that is used for this widget to the inputed query. |
bitesofcode/projexui | projexui/widgets/xquerybuilderwidget/xquerylinewidget.py | XQueryLineWidget.setTerms | def setTerms( self, terms ):
"""
Sets the term options for this widget.
:param terms | [<str>, ..]
"""
self.uiTermDDL.blockSignals(True)
term = self.uiTermDDL.currentText()
self.uiTermDDL.clear()
self.uiTermDDL.addItems(terms)
... | python | def setTerms( self, terms ):
"""
Sets the term options for this widget.
:param terms | [<str>, ..]
"""
self.uiTermDDL.blockSignals(True)
term = self.uiTermDDL.currentText()
self.uiTermDDL.clear()
self.uiTermDDL.addItems(terms)
... | [
"def",
"setTerms",
"(",
"self",
",",
"terms",
")",
":",
"self",
".",
"uiTermDDL",
".",
"blockSignals",
"(",
"True",
")",
"term",
"=",
"self",
".",
"uiTermDDL",
".",
"currentText",
"(",
")",
"self",
".",
"uiTermDDL",
".",
"clear",
"(",
")",
"self",
".... | Sets the term options for this widget.
:param terms | [<str>, ..] | [
"Sets",
"the",
"term",
"options",
"for",
"this",
"widget",
".",
":",
"param",
"terms",
"|",
"[",
"<str",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xquerybuilderwidget/xquerylinewidget.py#L263-L276 | train | Sets the term options for this widget. |
bitesofcode/projexui | projexui/widgets/xquerybuilderwidget/xquerylinewidget.py | XQueryLineWidget.updateEditor | def updateEditor( self ):
"""
Updates the editor based on the current selection.
"""
# assignt the rule operators to the choice list
rule = self.currentRule()
operator = self.currentOperator()
widget = self.uiWidgetAREA.widget()
edi... | python | def updateEditor( self ):
"""
Updates the editor based on the current selection.
"""
# assignt the rule operators to the choice list
rule = self.currentRule()
operator = self.currentOperator()
widget = self.uiWidgetAREA.widget()
edi... | [
"def",
"updateEditor",
"(",
"self",
")",
":",
"# assignt the rule operators to the choice list",
"rule",
"=",
"self",
".",
"currentRule",
"(",
")",
"operator",
"=",
"self",
".",
"currentOperator",
"(",
")",
"widget",
"=",
"self",
".",
"uiWidgetAREA",
".",
"widge... | Updates the editor based on the current selection. | [
"Updates",
"the",
"editor",
"based",
"on",
"the",
"current",
"selection",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xquerybuilderwidget/xquerylinewidget.py#L278-L323 | train | Updates the editor based on the current selection. |
bitesofcode/projexui | projexui/widgets/xorbschemabox.py | XOrbSchemaBox.currentSchema | def currentSchema( self ):
"""
Returns the schema found at the current index for this combo box.
:return <orb.TableSchema> || None
"""
index = self.currentIndex()
if ( 0 <= index and index < len(self._schemas) ):
return self._schemas[in... | python | def currentSchema( self ):
"""
Returns the schema found at the current index for this combo box.
:return <orb.TableSchema> || None
"""
index = self.currentIndex()
if ( 0 <= index and index < len(self._schemas) ):
return self._schemas[in... | [
"def",
"currentSchema",
"(",
"self",
")",
":",
"index",
"=",
"self",
".",
"currentIndex",
"(",
")",
"if",
"(",
"0",
"<=",
"index",
"and",
"index",
"<",
"len",
"(",
"self",
".",
"_schemas",
")",
")",
":",
"return",
"self",
".",
"_schemas",
"[",
"ind... | Returns the schema found at the current index for this combo box.
:return <orb.TableSchema> || None | [
"Returns",
"the",
"schema",
"found",
"at",
"the",
"current",
"index",
"for",
"this",
"combo",
"box",
".",
":",
"return",
"<orb",
".",
"TableSchema",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbschemabox.py#L48-L57 | train | Returns the schema that is currently in the combo box or None if no schema is found. |
bitesofcode/projexui | projexui/widgets/xorbschemabox.py | XOrbSchemaBox.emitCurrentChanged | def emitCurrentChanged( self ):
"""
Emits the current schema changed signal for this combobox, provided \
the signals aren't blocked.
"""
if ( not self.signalsBlocked() ):
schema = self.currentSchema()
self.currentSchemaChanged.emit(schema)
... | python | def emitCurrentChanged( self ):
"""
Emits the current schema changed signal for this combobox, provided \
the signals aren't blocked.
"""
if ( not self.signalsBlocked() ):
schema = self.currentSchema()
self.currentSchemaChanged.emit(schema)
... | [
"def",
"emitCurrentChanged",
"(",
"self",
")",
":",
"if",
"(",
"not",
"self",
".",
"signalsBlocked",
"(",
")",
")",
":",
"schema",
"=",
"self",
".",
"currentSchema",
"(",
")",
"self",
".",
"currentSchemaChanged",
".",
"emit",
"(",
"schema",
")",
"if",
... | Emits the current schema changed signal for this combobox, provided \
the signals aren't blocked. | [
"Emits",
"the",
"current",
"schema",
"changed",
"signal",
"for",
"this",
"combobox",
"provided",
"\\",
"the",
"signals",
"aren",
"t",
"blocked",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbschemabox.py#L59-L70 | train | Emits the current schema changed signal for this combobox provided \
the signals aren t blocked. |
bitesofcode/projexui | projexui/widgets/xorbschemabox.py | XOrbSchemaBox.refresh | def refresh( self ):
"""
Refreshs the current user interface to match the latest settings.
"""
schemas = self.schemas()
self.blockSignals(True)
self.clear()
self.addItems([schema.name() for schema in schemas])
self.blockSignals(False) | python | def refresh( self ):
"""
Refreshs the current user interface to match the latest settings.
"""
schemas = self.schemas()
self.blockSignals(True)
self.clear()
self.addItems([schema.name() for schema in schemas])
self.blockSignals(False) | [
"def",
"refresh",
"(",
"self",
")",
":",
"schemas",
"=",
"self",
".",
"schemas",
"(",
")",
"self",
".",
"blockSignals",
"(",
"True",
")",
"self",
".",
"clear",
"(",
")",
"self",
".",
"addItems",
"(",
"[",
"schema",
".",
"name",
"(",
")",
"for",
"... | Refreshs the current user interface to match the latest settings. | [
"Refreshs",
"the",
"current",
"user",
"interface",
"to",
"match",
"the",
"latest",
"settings",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbschemabox.py#L96-L104 | train | Refreshes the user interface to match the latest settings. |
bitesofcode/projexui | projexui/widgets/xorbschemabox.py | XOrbSchemaBox.setCurrentSchema | def setCurrentSchema( self, schema ):
"""
Sets the index for this combobox to the inputed schema instance.
:param schema <orb.TableSchema>
:return <bool> success
"""
if ( not schema in self._schemas ):
return False
... | python | def setCurrentSchema( self, schema ):
"""
Sets the index for this combobox to the inputed schema instance.
:param schema <orb.TableSchema>
:return <bool> success
"""
if ( not schema in self._schemas ):
return False
... | [
"def",
"setCurrentSchema",
"(",
"self",
",",
"schema",
")",
":",
"if",
"(",
"not",
"schema",
"in",
"self",
".",
"_schemas",
")",
":",
"return",
"False",
"index",
"=",
"self",
".",
"_schemas",
".",
"index",
"(",
"schema",
")",
"self",
".",
"setCurrentIn... | Sets the index for this combobox to the inputed schema instance.
:param schema <orb.TableSchema>
:return <bool> success | [
"Sets",
"the",
"index",
"for",
"this",
"combobox",
"to",
"the",
"inputed",
"schema",
"instance",
".",
":",
"param",
"schema",
"<orb",
".",
"TableSchema",
">",
":",
"return",
"<bool",
">",
"success"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbschemabox.py#L106-L119 | train | Sets the current index for this combobox to the inputed schema instance. |
bitesofcode/projexui | projexui/configs/xshortcutconfig/xshortcutwidget.py | XShortcutWidget.save | def save( self ):
"""
Saves the current settings for the actions in the list and exits the
widget.
"""
if ( not self.updateShortcut() ):
return False
for i in range(self.uiActionTREE.topLevelItemCount()):
item = self.uiActionTREE.topLe... | python | def save( self ):
"""
Saves the current settings for the actions in the list and exits the
widget.
"""
if ( not self.updateShortcut() ):
return False
for i in range(self.uiActionTREE.topLevelItemCount()):
item = self.uiActionTREE.topLe... | [
"def",
"save",
"(",
"self",
")",
":",
"if",
"(",
"not",
"self",
".",
"updateShortcut",
"(",
")",
")",
":",
"return",
"False",
"for",
"i",
"in",
"range",
"(",
"self",
".",
"uiActionTREE",
".",
"topLevelItemCount",
"(",
")",
")",
":",
"item",
"=",
"s... | Saves the current settings for the actions in the list and exits the
widget. | [
"Saves",
"the",
"current",
"settings",
"for",
"the",
"actions",
"in",
"the",
"list",
"and",
"exits",
"the",
"widget",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/configs/xshortcutconfig/xshortcutwidget.py#L119-L132 | train | Saves the current settings for the actions in the list and exits the
widget. |
bitesofcode/projexui | projexui/configs/xshortcutconfig/xshortcutwidget.py | XShortcutWidget.updateShortcut | def updateShortcut( self ):
"""
Saves the current shortuct settings to the current item.
:return <bool> success
"""
aitem = self.uiActionTREE.currentItem()
if ( not aitem ):
return True
scut = self.uiShortcutTXT.text()
if ... | python | def updateShortcut( self ):
"""
Saves the current shortuct settings to the current item.
:return <bool> success
"""
aitem = self.uiActionTREE.currentItem()
if ( not aitem ):
return True
scut = self.uiShortcutTXT.text()
if ... | [
"def",
"updateShortcut",
"(",
"self",
")",
":",
"aitem",
"=",
"self",
".",
"uiActionTREE",
".",
"currentItem",
"(",
")",
"if",
"(",
"not",
"aitem",
")",
":",
"return",
"True",
"scut",
"=",
"self",
".",
"uiShortcutTXT",
".",
"text",
"(",
")",
"if",
"(... | Saves the current shortuct settings to the current item.
:return <bool> success | [
"Saves",
"the",
"current",
"shortuct",
"settings",
"to",
"the",
"current",
"item",
".",
":",
"return",
"<bool",
">",
"success"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/configs/xshortcutconfig/xshortcutwidget.py#L164-L191 | train | Updates the current shortuct settings to the current item. |
bitesofcode/projexui | projexui/widgets/xpopupbutton.py | XPopupButton.setCentralWidget | def setCentralWidget(self, widget):
"""
Sets the central widget for this button.
:param widget | <QWidget>
"""
self.setEnabled(widget is not None)
self._popupWidget.setCentralWidget(widget) | python | def setCentralWidget(self, widget):
"""
Sets the central widget for this button.
:param widget | <QWidget>
"""
self.setEnabled(widget is not None)
self._popupWidget.setCentralWidget(widget) | [
"def",
"setCentralWidget",
"(",
"self",
",",
"widget",
")",
":",
"self",
".",
"setEnabled",
"(",
"widget",
"is",
"not",
"None",
")",
"self",
".",
"_popupWidget",
".",
"setCentralWidget",
"(",
"widget",
")"
] | Sets the central widget for this button.
:param widget | <QWidget> | [
"Sets",
"the",
"central",
"widget",
"for",
"this",
"button",
".",
":",
"param",
"widget",
"|",
"<QWidget",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupbutton.py#L95-L102 | train | Sets the central widget for this button. |
bitesofcode/projexui | projexui/widgets/xpopupbutton.py | XPopupButton.showPopup | def showPopup(self):
"""
Shows the popup for this button.
"""
as_dialog = QApplication.keyboardModifiers()
anchor = self.defaultAnchor()
if anchor:
self.popupWidget().setAnchor(anchor)
else:
anchor = self.popupWidget().an... | python | def showPopup(self):
"""
Shows the popup for this button.
"""
as_dialog = QApplication.keyboardModifiers()
anchor = self.defaultAnchor()
if anchor:
self.popupWidget().setAnchor(anchor)
else:
anchor = self.popupWidget().an... | [
"def",
"showPopup",
"(",
"self",
")",
":",
"as_dialog",
"=",
"QApplication",
".",
"keyboardModifiers",
"(",
")",
"anchor",
"=",
"self",
".",
"defaultAnchor",
"(",
")",
"if",
"anchor",
":",
"self",
".",
"popupWidget",
"(",
")",
".",
"setAnchor",
"(",
"anc... | Shows the popup for this button. | [
"Shows",
"the",
"popup",
"for",
"this",
"button",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupbutton.py#L128-L154 | train | Shows the popup for this button. |
bitesofcode/projexui | projexui/widgets/xpopupbutton.py | XPopupButton.togglePopup | def togglePopup(self):
"""
Toggles whether or not the popup is visible.
"""
if not self._popupWidget.isVisible():
self.showPopup()
elif self._popupWidget.currentMode() != self._popupWidget.Mode.Dialog:
self._popupWidget.close() | python | def togglePopup(self):
"""
Toggles whether or not the popup is visible.
"""
if not self._popupWidget.isVisible():
self.showPopup()
elif self._popupWidget.currentMode() != self._popupWidget.Mode.Dialog:
self._popupWidget.close() | [
"def",
"togglePopup",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"_popupWidget",
".",
"isVisible",
"(",
")",
":",
"self",
".",
"showPopup",
"(",
")",
"elif",
"self",
".",
"_popupWidget",
".",
"currentMode",
"(",
")",
"!=",
"self",
".",
"_popupWid... | Toggles whether or not the popup is visible. | [
"Toggles",
"whether",
"or",
"not",
"the",
"popup",
"is",
"visible",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xpopupbutton.py#L156-L163 | train | Toggles whether or not the popup is visible. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.