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/xorbbrowserwidget/xorbquerywidget.py | XOrbQueryWidget.eventFilter | def eventFilter( self, object, event ):
"""
Filters the object for particular events.
:param object | <QObject>
event | <QEvent>
:return <bool> | consumed
"""
if ( event.type() == event.KeyPress ):
if (... | python | def eventFilter( self, object, event ):
"""
Filters the object for particular events.
:param object | <QObject>
event | <QEvent>
:return <bool> | consumed
"""
if ( event.type() == event.KeyPress ):
if (... | [
"def",
"eventFilter",
"(",
"self",
",",
"object",
",",
"event",
")",
":",
"if",
"(",
"event",
".",
"type",
"(",
")",
"==",
"event",
".",
"KeyPress",
")",
":",
"if",
"(",
"event",
".",
"key",
"(",
")",
"in",
"(",
"Qt",
".",
"Key_Return",
",",
"Q... | Filters the object for particular events.
:param object | <QObject>
event | <QEvent>
:return <bool> | consumed | [
"Filters",
"the",
"object",
"for",
"particular",
"events",
".",
":",
"param",
"object",
"|",
"<QObject",
">",
"event",
"|",
"<QEvent",
">",
":",
"return",
"<bool",
">",
"|",
"consumed"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbbrowserwidget/xorbquerywidget.py#L551-L565 | train | Returns True if the object is in the list of events that are in the list of related objects. |
bitesofcode/projexui | projexui/widgets/xorbbrowserwidget/xorbquerywidget.py | XOrbQueryWidget.groupQuery | def groupQuery( self ):
"""
Groups the selected items together into a sub query
"""
items = self.uiQueryTREE.selectedItems()
if ( not len(items) > 2 ):
return
if ( isinstance(items[-1], XJoinItem) ):
items = items[:-1]
... | python | def groupQuery( self ):
"""
Groups the selected items together into a sub query
"""
items = self.uiQueryTREE.selectedItems()
if ( not len(items) > 2 ):
return
if ( isinstance(items[-1], XJoinItem) ):
items = items[:-1]
... | [
"def",
"groupQuery",
"(",
"self",
")",
":",
"items",
"=",
"self",
".",
"uiQueryTREE",
".",
"selectedItems",
"(",
")",
"if",
"(",
"not",
"len",
"(",
"items",
")",
">",
"2",
")",
":",
"return",
"if",
"(",
"isinstance",
"(",
"items",
"[",
"-",
"1",
... | Groups the selected items together into a sub query | [
"Groups",
"the",
"selected",
"items",
"together",
"into",
"a",
"sub",
"query"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbbrowserwidget/xorbquerywidget.py#L575-L607 | train | Groups the selected items together into a sub query |
bitesofcode/projexui | projexui/widgets/xorbbrowserwidget/xorbquerywidget.py | XOrbQueryWidget.query | def query( self ):
"""
Returns the query this widget is representing from the tree widget.
:return <Query> || <QueryCompound> || None
"""
# build a query if not searching all
q = Q()
operator = 'and'
for i in range(se... | python | def query( self ):
"""
Returns the query this widget is representing from the tree widget.
:return <Query> || <QueryCompound> || None
"""
# build a query if not searching all
q = Q()
operator = 'and'
for i in range(se... | [
"def",
"query",
"(",
"self",
")",
":",
"# build a query if not searching all\r",
"q",
"=",
"Q",
"(",
")",
"operator",
"=",
"'and'",
"for",
"i",
"in",
"range",
"(",
"self",
".",
"uiQueryTREE",
".",
"topLevelItemCount",
"(",
")",
")",
":",
"item",
"=",
"se... | Returns the query this widget is representing from the tree widget.
:return <Query> || <QueryCompound> || None | [
"Returns",
"the",
"query",
"this",
"widget",
"is",
"representing",
"from",
"the",
"tree",
"widget",
".",
":",
"return",
"<Query",
">",
"||",
"<QueryCompound",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbbrowserwidget/xorbquerywidget.py#L609-L629 | train | Returns the query this widget is representing from the tree widget. |
bitesofcode/projexui | projexui/widgets/xorbbrowserwidget/xorbquerywidget.py | XOrbQueryWidget.removeQuery | def removeQuery( self ):
"""
Removes the currently selected query.
"""
items = self.uiQueryTREE.selectedItems()
tree = self.uiQueryTREE
for item in items:
parent = item.parent()
if ( parent ):
parent.takeChild(parent.index... | python | def removeQuery( self ):
"""
Removes the currently selected query.
"""
items = self.uiQueryTREE.selectedItems()
tree = self.uiQueryTREE
for item in items:
parent = item.parent()
if ( parent ):
parent.takeChild(parent.index... | [
"def",
"removeQuery",
"(",
"self",
")",
":",
"items",
"=",
"self",
".",
"uiQueryTREE",
".",
"selectedItems",
"(",
")",
"tree",
"=",
"self",
".",
"uiQueryTREE",
"for",
"item",
"in",
"items",
":",
"parent",
"=",
"item",
".",
"parent",
"(",
")",
"if",
"... | Removes the currently selected query. | [
"Removes",
"the",
"currently",
"selected",
"query",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbbrowserwidget/xorbquerywidget.py#L631-L644 | train | Removes the currently selected query from the tree. |
bitesofcode/projexui | projexui/widgets/xorbbrowserwidget/xorbquerywidget.py | XOrbQueryWidget.setQuery | def setQuery( self, query ):
"""
Assigns the query for this widget, loading the query builder tree with
the pertinent information.
:param query | <Query> || <QueryCompound> || None
"""
tree = self.uiQueryTREE
tree.blockSignals(True)
... | python | def setQuery( self, query ):
"""
Assigns the query for this widget, loading the query builder tree with
the pertinent information.
:param query | <Query> || <QueryCompound> || None
"""
tree = self.uiQueryTREE
tree.blockSignals(True)
... | [
"def",
"setQuery",
"(",
"self",
",",
"query",
")",
":",
"tree",
"=",
"self",
".",
"uiQueryTREE",
"tree",
".",
"blockSignals",
"(",
"True",
")",
"tree",
".",
"setUpdatesEnabled",
"(",
"False",
")",
"tree",
".",
"clear",
"(",
")",
"# assign a top level query... | Assigns the query for this widget, loading the query builder tree with
the pertinent information.
:param query | <Query> || <QueryCompound> || None | [
"Assigns",
"the",
"query",
"for",
"this",
"widget",
"loading",
"the",
"query",
"builder",
"tree",
"with",
"the",
"pertinent",
"information",
".",
":",
"param",
"query",
"|",
"<Query",
">",
"||",
"<QueryCompound",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbbrowserwidget/xorbquerywidget.py#L672-L701 | train | Assigns the query for this widget loading the query builder tree with
the pertinent information information. |
bitesofcode/projexui | projexui/dialogs/xwizardbrowserdialog/xwizardbrowserdialog.py | XWizardBrowserDialog.currentPlugin | def currentPlugin( self ):
"""
Returns the currently selected plugin.
:return <XWizardPlugin> || None
"""
col = self.uiWizardTABLE.currentColumn()
row = self.uiWizardTABLE.currentRow()
item = self.uiWizardTABLE.currentItem()
widget ... | python | def currentPlugin( self ):
"""
Returns the currently selected plugin.
:return <XWizardPlugin> || None
"""
col = self.uiWizardTABLE.currentColumn()
row = self.uiWizardTABLE.currentRow()
item = self.uiWizardTABLE.currentItem()
widget ... | [
"def",
"currentPlugin",
"(",
"self",
")",
":",
"col",
"=",
"self",
".",
"uiWizardTABLE",
".",
"currentColumn",
"(",
")",
"row",
"=",
"self",
".",
"uiWizardTABLE",
".",
"currentRow",
"(",
")",
"item",
"=",
"self",
".",
"uiWizardTABLE",
".",
"currentItem",
... | Returns the currently selected plugin.
:return <XWizardPlugin> || None | [
"Returns",
"the",
"currently",
"selected",
"plugin",
".",
":",
"return",
"<XWizardPlugin",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/dialogs/xwizardbrowserdialog/xwizardbrowserdialog.py#L92-L106 | train | Returns the currently selected plugin. |
bitesofcode/projexui | projexui/dialogs/xwizardbrowserdialog/xwizardbrowserdialog.py | XWizardBrowserDialog.plugins | def plugins( self, typ = None, group = None ):
"""
Returns the plugins used for this dialog.
:param typ | <str> || None
group | <str> || None
:return [<XWizardPlugin>, ..]
"""
if ( typ is None ):
outpu... | python | def plugins( self, typ = None, group = None ):
"""
Returns the plugins used for this dialog.
:param typ | <str> || None
group | <str> || None
:return [<XWizardPlugin>, ..]
"""
if ( typ is None ):
outpu... | [
"def",
"plugins",
"(",
"self",
",",
"typ",
"=",
"None",
",",
"group",
"=",
"None",
")",
":",
"if",
"(",
"typ",
"is",
"None",
")",
":",
"output",
"=",
"[",
"]",
"for",
"wlang",
"in",
"self",
".",
"_plugins",
".",
"values",
"(",
")",
":",
"for",
... | Returns the plugins used for this dialog.
:param typ | <str> || None
group | <str> || None
:return [<XWizardPlugin>, ..] | [
"Returns",
"the",
"plugins",
"used",
"for",
"this",
"dialog",
".",
":",
"param",
"typ",
"|",
"<str",
">",
"||",
"None",
"group",
"|",
"<str",
">",
"||",
"None",
":",
"return",
"[",
"<XWizardPlugin",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/dialogs/xwizardbrowserdialog/xwizardbrowserdialog.py#L108-L131 | train | Returns the plugins used for this dialog. |
bitesofcode/projexui | projexui/dialogs/xwizardbrowserdialog/xwizardbrowserdialog.py | XWizardBrowserDialog.runWizard | def runWizard( self ):
"""
Runs the current wizard.
"""
plugin = self.currentPlugin()
if ( plugin and plugin.runWizard(self) ):
self.accept() | python | def runWizard( self ):
"""
Runs the current wizard.
"""
plugin = self.currentPlugin()
if ( plugin and plugin.runWizard(self) ):
self.accept() | [
"def",
"runWizard",
"(",
"self",
")",
":",
"plugin",
"=",
"self",
".",
"currentPlugin",
"(",
")",
"if",
"(",
"plugin",
"and",
"plugin",
".",
"runWizard",
"(",
"self",
")",
")",
":",
"self",
".",
"accept",
"(",
")"
] | Runs the current wizard. | [
"Runs",
"the",
"current",
"wizard",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/dialogs/xwizardbrowserdialog/xwizardbrowserdialog.py#L133-L139 | train | Runs the current wizard. |
bitesofcode/projexui | projexui/dialogs/xwizardbrowserdialog/xwizardbrowserdialog.py | XWizardBrowserDialog.setCurrentPlugin | def setCurrentPlugin( self, plugin ):
"""
Sets the current plugin item to the inputed plugin.
:param plugin | <XWizardPlugin> || None
"""
item = self.uiWizardTABLE.currentItem()
if ( not item ):
return None
return item.plugin... | python | def setCurrentPlugin( self, plugin ):
"""
Sets the current plugin item to the inputed plugin.
:param plugin | <XWizardPlugin> || None
"""
item = self.uiWizardTABLE.currentItem()
if ( not item ):
return None
return item.plugin... | [
"def",
"setCurrentPlugin",
"(",
"self",
",",
"plugin",
")",
":",
"item",
"=",
"self",
".",
"uiWizardTABLE",
".",
"currentItem",
"(",
")",
"if",
"(",
"not",
"item",
")",
":",
"return",
"None",
"return",
"item",
".",
"plugin",
"(",
")"
] | Sets the current plugin item to the inputed plugin.
:param plugin | <XWizardPlugin> || None | [
"Sets",
"the",
"current",
"plugin",
"item",
"to",
"the",
"inputed",
"plugin",
".",
":",
"param",
"plugin",
"|",
"<XWizardPlugin",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/dialogs/xwizardbrowserdialog/xwizardbrowserdialog.py#L141-L151 | train | Sets the current plugin item to the inputed plugin. |
bitesofcode/projexui | projexui/dialogs/xwizardbrowserdialog/xwizardbrowserdialog.py | XWizardBrowserDialog.setPlugins | def setPlugins( self, plugins ):
"""
Loads the plugins for the inputed dialog.
:param plugins | [<XWizardPlugin>, ..]
"""
langs = {}
icons = {}
for plugin in plugins:
wlang = plugin.wizardType()
wgrp = plugin.wi... | python | def setPlugins( self, plugins ):
"""
Loads the plugins for the inputed dialog.
:param plugins | [<XWizardPlugin>, ..]
"""
langs = {}
icons = {}
for plugin in plugins:
wlang = plugin.wizardType()
wgrp = plugin.wi... | [
"def",
"setPlugins",
"(",
"self",
",",
"plugins",
")",
":",
"langs",
"=",
"{",
"}",
"icons",
"=",
"{",
"}",
"for",
"plugin",
"in",
"plugins",
":",
"wlang",
"=",
"plugin",
".",
"wizardType",
"(",
")",
"wgrp",
"=",
"plugin",
".",
"wizardGroup",
"(",
... | Loads the plugins for the inputed dialog.
:param plugins | [<XWizardPlugin>, ..] | [
"Loads",
"the",
"plugins",
"for",
"the",
"inputed",
"dialog",
".",
":",
"param",
"plugins",
"|",
"[",
"<XWizardPlugin",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/dialogs/xwizardbrowserdialog/xwizardbrowserdialog.py#L153-L192 | train | Sets the plugins for the inputed dialog. |
bitesofcode/projexui | projexui/dialogs/xwizardbrowserdialog/xwizardbrowserdialog.py | XWizardBrowserDialog.setVisible | def setVisible( self, state ):
"""
Overloads the setVisible method for the dialog to resize the contents \
of the splitter properly.
:param state | <bool>
"""
super(XWizardBrowserDialog, self).setVisible(state)
if ( state ):
mwid... | python | def setVisible( self, state ):
"""
Overloads the setVisible method for the dialog to resize the contents \
of the splitter properly.
:param state | <bool>
"""
super(XWizardBrowserDialog, self).setVisible(state)
if ( state ):
mwid... | [
"def",
"setVisible",
"(",
"self",
",",
"state",
")",
":",
"super",
"(",
"XWizardBrowserDialog",
",",
"self",
")",
".",
"setVisible",
"(",
"state",
")",
"if",
"(",
"state",
")",
":",
"mwidth",
"=",
"self",
".",
"uiPluginTREE",
".",
"minimumWidth",
"(",
... | Overloads the setVisible method for the dialog to resize the contents \
of the splitter properly.
:param state | <bool> | [
"Overloads",
"the",
"setVisible",
"method",
"for",
"the",
"dialog",
"to",
"resize",
"the",
"contents",
"\\",
"of",
"the",
"splitter",
"properly",
".",
":",
"param",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/dialogs/xwizardbrowserdialog/xwizardbrowserdialog.py#L194-L206 | train | Overloads the setVisible method for the XWizardBrowserDialog to resize the contents of the splitter properly. |
bitesofcode/projexui | projexui/dialogs/xwizardbrowserdialog/xwizardbrowserdialog.py | XWizardBrowserDialog.showDescription | def showDescription( self ):
"""
Shows the description for the current plugin in the interface.
"""
plugin = self.currentPlugin()
if ( not plugin ):
self.uiDescriptionTXT.setText('')
else:
self.uiDescriptionTXT.setText(plugin.description()) | python | def showDescription( self ):
"""
Shows the description for the current plugin in the interface.
"""
plugin = self.currentPlugin()
if ( not plugin ):
self.uiDescriptionTXT.setText('')
else:
self.uiDescriptionTXT.setText(plugin.description()) | [
"def",
"showDescription",
"(",
"self",
")",
":",
"plugin",
"=",
"self",
".",
"currentPlugin",
"(",
")",
"if",
"(",
"not",
"plugin",
")",
":",
"self",
".",
"uiDescriptionTXT",
".",
"setText",
"(",
"''",
")",
"else",
":",
"self",
".",
"uiDescriptionTXT",
... | Shows the description for the current plugin in the interface. | [
"Shows",
"the",
"description",
"for",
"the",
"current",
"plugin",
"in",
"the",
"interface",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/dialogs/xwizardbrowserdialog/xwizardbrowserdialog.py#L208-L216 | train | Shows the description for the current interface. |
bitesofcode/projexui | projexui/dialogs/xwizardbrowserdialog/xwizardbrowserdialog.py | XWizardBrowserDialog.showWizards | def showWizards( self ):
"""
Show the wizards widget for the currently selected plugin.
"""
self.uiWizardTABLE.clear()
item = self.uiPluginTREE.currentItem()
if ( not (item and item.parent()) ):
plugins = []
else:
wlang = n... | python | def showWizards( self ):
"""
Show the wizards widget for the currently selected plugin.
"""
self.uiWizardTABLE.clear()
item = self.uiPluginTREE.currentItem()
if ( not (item and item.parent()) ):
plugins = []
else:
wlang = n... | [
"def",
"showWizards",
"(",
"self",
")",
":",
"self",
".",
"uiWizardTABLE",
".",
"clear",
"(",
")",
"item",
"=",
"self",
".",
"uiPluginTREE",
".",
"currentItem",
"(",
")",
"if",
"(",
"not",
"(",
"item",
"and",
"item",
".",
"parent",
"(",
")",
")",
"... | Show the wizards widget for the currently selected plugin. | [
"Show",
"the",
"wizards",
"widget",
"for",
"the",
"currently",
"selected",
"plugin",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/dialogs/xwizardbrowserdialog/xwizardbrowserdialog.py#L218-L268 | train | Show the wizards widget for the currently selected plugin. |
bitesofcode/projexui | projexui/dialogs/xwizardbrowserdialog/xwizardbrowserdialog.py | XWizardBrowserDialog.browse | def browse( plugins, parent = None, default = None ):
"""
Prompts the user to browse the wizards based on the inputed plugins \
allowing them to launch any particular wizard of choice.
:param plugins | [<XWizardPlugin>, ..]
parent | <QWidget>
... | python | def browse( plugins, parent = None, default = None ):
"""
Prompts the user to browse the wizards based on the inputed plugins \
allowing them to launch any particular wizard of choice.
:param plugins | [<XWizardPlugin>, ..]
parent | <QWidget>
... | [
"def",
"browse",
"(",
"plugins",
",",
"parent",
"=",
"None",
",",
"default",
"=",
"None",
")",
":",
"dlg",
"=",
"XWizardBrowserDialog",
"(",
"parent",
")",
"dlg",
".",
"setPlugins",
"(",
"plugins",
")",
"dlg",
".",
"setCurrentPlugin",
"(",
"default",
")"... | Prompts the user to browse the wizards based on the inputed plugins \
allowing them to launch any particular wizard of choice.
:param plugins | [<XWizardPlugin>, ..]
parent | <QWidget>
default | <XWizardPlugin> || None
:return ... | [
"Prompts",
"the",
"user",
"to",
"browse",
"the",
"wizards",
"based",
"on",
"the",
"inputed",
"plugins",
"\\",
"allowing",
"them",
"to",
"launch",
"any",
"particular",
"wizard",
"of",
"choice",
".",
":",
"param",
"plugins",
"|",
"[",
"<XWizardPlugin",
">",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/dialogs/xwizardbrowserdialog/xwizardbrowserdialog.py#L272-L288 | train | Prompts the user to browse the wizards based on the inputed plugins and returns True if the user is able to browse the wizards based on the inputed plugins. |
bitesofcode/projexui | projexui/xcolorset.py | XColorSet.color | def color( self, name, colorGroup = None ):
"""
Returns the color for the given name at the inputed group. If no \
group is specified, the first group in the list is used.
:param name | <str>
colorGroup | <str> || None
:retu... | python | def color( self, name, colorGroup = None ):
"""
Returns the color for the given name at the inputed group. If no \
group is specified, the first group in the list is used.
:param name | <str>
colorGroup | <str> || None
:retu... | [
"def",
"color",
"(",
"self",
",",
"name",
",",
"colorGroup",
"=",
"None",
")",
":",
"if",
"(",
"not",
"colorGroup",
"and",
"self",
".",
"_colorGroups",
")",
":",
"colorGroup",
"=",
"self",
".",
"_colorGroups",
"[",
"0",
"]",
"if",
"(",
"not",
"colorG... | Returns the color for the given name at the inputed group. If no \
group is specified, the first group in the list is used.
:param name | <str>
colorGroup | <str> || None
:return <QColor> | [
"Returns",
"the",
"color",
"for",
"the",
"given",
"name",
"at",
"the",
"inputed",
"group",
".",
"If",
"no",
"\\",
"group",
"is",
"specified",
"the",
"first",
"group",
"in",
"the",
"list",
"is",
"used",
".",
":",
"param",
"name",
"|",
"<str",
">",
"co... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xcolorset.py#L35-L51 | train | Returns the color for the given name at the given color group. |
bitesofcode/projexui | projexui/xcolorset.py | XColorSet.colors | def colors( self, name ):
"""
Returns all the colors in order for the inputed color name.
:return [<QColor>, ..]
"""
output = []
colors = self._colors.get(name, {})
for colorType in self._colorGroups:
output.append(colors.get(colorType, QC... | python | def colors( self, name ):
"""
Returns all the colors in order for the inputed color name.
:return [<QColor>, ..]
"""
output = []
colors = self._colors.get(name, {})
for colorType in self._colorGroups:
output.append(colors.get(colorType, QC... | [
"def",
"colors",
"(",
"self",
",",
"name",
")",
":",
"output",
"=",
"[",
"]",
"colors",
"=",
"self",
".",
"_colors",
".",
"get",
"(",
"name",
",",
"{",
"}",
")",
"for",
"colorType",
"in",
"self",
".",
"_colorGroups",
":",
"output",
".",
"append",
... | Returns all the colors in order for the inputed color name.
:return [<QColor>, ..] | [
"Returns",
"all",
"the",
"colors",
"in",
"order",
"for",
"the",
"inputed",
"color",
"name",
".",
":",
"return",
"[",
"<QColor",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xcolorset.py#L53-L63 | train | Returns all the colors for the inputed color name. |
bitesofcode/projexui | projexui/xcolorset.py | XColorSet.setColor | def setColor( self, name, color, colorGroup = None ):
"""
Sets the color for the inputed name in the given color group. If no \
specific color group is found then the color will be set for all \
color groups.
:param name | <str>
color ... | python | def setColor( self, name, color, colorGroup = None ):
"""
Sets the color for the inputed name in the given color group. If no \
specific color group is found then the color will be set for all \
color groups.
:param name | <str>
color ... | [
"def",
"setColor",
"(",
"self",
",",
"name",
",",
"color",
",",
"colorGroup",
"=",
"None",
")",
":",
"self",
".",
"_colors",
".",
"setdefault",
"(",
"str",
"(",
"name",
")",
",",
"{",
"}",
")",
"cmap",
"=",
"self",
".",
"_colors",
".",
"get",
"("... | Sets the color for the inputed name in the given color group. If no \
specific color group is found then the color will be set for all \
color groups.
:param name | <str>
color | <QColor>
colorGroup | <str> || None | [
"Sets",
"the",
"color",
"for",
"the",
"inputed",
"name",
"in",
"the",
"given",
"color",
"group",
".",
"If",
"no",
"\\",
"specific",
"color",
"group",
"is",
"found",
"then",
"the",
"color",
"will",
"be",
"set",
"for",
"all",
"\\",
"color",
"groups",
"."... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xcolorset.py#L89-L106 | train | Sets the color for the inputed name in the given color group. |
bitesofcode/projexui | projexui/xcolorset.py | XColorSet.toString | def toString( self ):
"""
Saves the color set information out to string format. The data is \
returned as xml data.
:return <str>
"""
# convert the element tree information
from xml.etree import ElementTree
xelem = ElementTree.Elemen... | python | def toString( self ):
"""
Saves the color set information out to string format. The data is \
returned as xml data.
:return <str>
"""
# convert the element tree information
from xml.etree import ElementTree
xelem = ElementTree.Elemen... | [
"def",
"toString",
"(",
"self",
")",
":",
"# convert the element tree information",
"from",
"xml",
".",
"etree",
"import",
"ElementTree",
"xelem",
"=",
"ElementTree",
".",
"Element",
"(",
"'colorset'",
")",
"xelem",
".",
"set",
"(",
"'name'",
",",
"self",
".",... | Saves the color set information out to string format. The data is \
returned as xml data.
:return <str> | [
"Saves",
"the",
"color",
"set",
"information",
"out",
"to",
"string",
"format",
".",
"The",
"data",
"is",
"\\",
"returned",
"as",
"xml",
"data",
".",
":",
"return",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xcolorset.py#L126-L153 | train | Returns the string representation of the color set. |
bitesofcode/projexui | projexui/xcolorset.py | XColorSet.fromString | def fromString( cls, strdata ):
"""
Restores a color set instance from the inputed string data.
:param strdata | <str>
"""
if ( not strdata ):
return None
from xml.etree import ElementTree
xelem = ElementTree.fromstr... | python | def fromString( cls, strdata ):
"""
Restores a color set instance from the inputed string data.
:param strdata | <str>
"""
if ( not strdata ):
return None
from xml.etree import ElementTree
xelem = ElementTree.fromstr... | [
"def",
"fromString",
"(",
"cls",
",",
"strdata",
")",
":",
"if",
"(",
"not",
"strdata",
")",
":",
"return",
"None",
"from",
"xml",
".",
"etree",
"import",
"ElementTree",
"xelem",
"=",
"ElementTree",
".",
"fromstring",
"(",
"str",
"(",
"strdata",
")",
"... | Restores a color set instance from the inputed string data.
:param strdata | <str> | [
"Restores",
"a",
"color",
"set",
"instance",
"from",
"the",
"inputed",
"string",
"data",
".",
":",
"param",
"strdata",
"|",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xcolorset.py#L156-L181 | train | Restores a color set instance from the inputed string data. |
bitesofcode/projexui | projexui/xcolorset.py | XColorSet.registerToDataTypes | def registerToDataTypes( cls ):
"""
Registers this class as a valid datatype for saving and loading via
the datatype system.
"""
from projexui.xdatatype import registerDataType
registerDataType(cls.__name__,
lambda pyvalue: pyvalue.toString(),
lam... | python | def registerToDataTypes( cls ):
"""
Registers this class as a valid datatype for saving and loading via
the datatype system.
"""
from projexui.xdatatype import registerDataType
registerDataType(cls.__name__,
lambda pyvalue: pyvalue.toString(),
lam... | [
"def",
"registerToDataTypes",
"(",
"cls",
")",
":",
"from",
"projexui",
".",
"xdatatype",
"import",
"registerDataType",
"registerDataType",
"(",
"cls",
".",
"__name__",
",",
"lambda",
"pyvalue",
":",
"pyvalue",
".",
"toString",
"(",
")",
",",
"lambda",
"qvaria... | Registers this class as a valid datatype for saving and loading via
the datatype system. | [
"Registers",
"this",
"class",
"as",
"a",
"valid",
"datatype",
"for",
"saving",
"and",
"loading",
"via",
"the",
"datatype",
"system",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xcolorset.py#L184-L192 | train | Registers this class as a valid datatype for saving and loading via
. |
bitesofcode/projexui | projexui/xcolorset.py | XPaletteColorSet.palette | def palette( self ):
"""
Converts the current color data to a QPalette.
:return <QPalette>
"""
palette = QPalette()
for colorGroup, qColorGroup in self.GroupMapping.items():
for colorRole, qColorRole in self.RoleMapping.items():
... | python | def palette( self ):
"""
Converts the current color data to a QPalette.
:return <QPalette>
"""
palette = QPalette()
for colorGroup, qColorGroup in self.GroupMapping.items():
for colorRole, qColorRole in self.RoleMapping.items():
... | [
"def",
"palette",
"(",
"self",
")",
":",
"palette",
"=",
"QPalette",
"(",
")",
"for",
"colorGroup",
",",
"qColorGroup",
"in",
"self",
".",
"GroupMapping",
".",
"items",
"(",
")",
":",
"for",
"colorRole",
",",
"qColorRole",
"in",
"self",
".",
"RoleMapping... | Converts the current color data to a QPalette.
:return <QPalette> | [
"Converts",
"the",
"current",
"color",
"data",
"to",
"a",
"QPalette",
".",
":",
"return",
"<QPalette",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xcolorset.py#L214-L229 | train | Converts the current color data to a QPalette. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanelItem.enterEvent | def enterEvent(self, event):
"""
Mark the hovered state as being true.
:param event | <QtCore.QEnterEvent>
"""
super(XViewPanelItem, self).enterEvent(event)
# store the hover state and mark for a repaint
self._hovered = True
self.update() | python | def enterEvent(self, event):
"""
Mark the hovered state as being true.
:param event | <QtCore.QEnterEvent>
"""
super(XViewPanelItem, self).enterEvent(event)
# store the hover state and mark for a repaint
self._hovered = True
self.update() | [
"def",
"enterEvent",
"(",
"self",
",",
"event",
")",
":",
"super",
"(",
"XViewPanelItem",
",",
"self",
")",
".",
"enterEvent",
"(",
"event",
")",
"# store the hover state and mark for a repaint",
"self",
".",
"_hovered",
"=",
"True",
"self",
".",
"update",
"("... | Mark the hovered state as being true.
:param event | <QtCore.QEnterEvent> | [
"Mark",
"the",
"hovered",
"state",
"as",
"being",
"true",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L134-L144 | train | Updates the hovered state and updates the panel item s size. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanelItem.leaveEvent | def leaveEvent(self, event):
"""
Mark the hovered state as being false.
:param event | <QtCore.QLeaveEvent>
"""
super(XViewPanelItem, self).leaveEvent(event)
# store the hover state and mark for a repaint
self._hovered = False
self.update() | python | def leaveEvent(self, event):
"""
Mark the hovered state as being false.
:param event | <QtCore.QLeaveEvent>
"""
super(XViewPanelItem, self).leaveEvent(event)
# store the hover state and mark for a repaint
self._hovered = False
self.update() | [
"def",
"leaveEvent",
"(",
"self",
",",
"event",
")",
":",
"super",
"(",
"XViewPanelItem",
",",
"self",
")",
".",
"leaveEvent",
"(",
"event",
")",
"# store the hover state and mark for a repaint",
"self",
".",
"_hovered",
"=",
"False",
"self",
".",
"update",
"(... | Mark the hovered state as being false.
:param event | <QtCore.QLeaveEvent> | [
"Mark",
"the",
"hovered",
"state",
"as",
"being",
"false",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L146-L156 | train | Overwrites the leave event to store the hovered state and updates the treeview. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanelItem.paintEvent | def paintEvent(self, event):
"""
Runs the paint event for this item.
"""
painter = QtGui.QPainter()
painter.begin(self)
try:
x = 0
y = 2
w = self.width() - 1
h = self.height() - 3
palette = self.palette()
... | python | def paintEvent(self, event):
"""
Runs the paint event for this item.
"""
painter = QtGui.QPainter()
painter.begin(self)
try:
x = 0
y = 2
w = self.width() - 1
h = self.height() - 3
palette = self.palette()
... | [
"def",
"paintEvent",
"(",
"self",
",",
"event",
")",
":",
"painter",
"=",
"QtGui",
".",
"QPainter",
"(",
")",
"painter",
".",
"begin",
"(",
"self",
")",
"try",
":",
"x",
"=",
"0",
"y",
"=",
"2",
"w",
"=",
"self",
".",
"width",
"(",
")",
"-",
... | Runs the paint event for this item. | [
"Runs",
"the",
"paint",
"event",
"for",
"this",
"item",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L169-L212 | train | Runs the paint event for this item. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanelItem.mousePressEvent | def mousePressEvent(self, event):
"""
Creates the mouse event for dragging or activating this tab.
:param event | <QtCore.QMousePressEvent>
"""
self._moveItemStarted = False
rect = QtCore.QRect(0, 0, 12, self.height())
# drag the tab off
if not self... | python | def mousePressEvent(self, event):
"""
Creates the mouse event for dragging or activating this tab.
:param event | <QtCore.QMousePressEvent>
"""
self._moveItemStarted = False
rect = QtCore.QRect(0, 0, 12, self.height())
# drag the tab off
if not self... | [
"def",
"mousePressEvent",
"(",
"self",
",",
"event",
")",
":",
"self",
".",
"_moveItemStarted",
"=",
"False",
"rect",
"=",
"QtCore",
".",
"QRect",
"(",
"0",
",",
"0",
",",
"12",
",",
"self",
".",
"height",
"(",
")",
")",
"# drag the tab off",
"if",
"... | Creates the mouse event for dragging or activating this tab.
:param event | <QtCore.QMousePressEvent> | [
"Creates",
"the",
"mouse",
"event",
"for",
"dragging",
"or",
"activating",
"this",
"tab",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L214-L251 | train | Creates the mouse event for dragging or activating this tab. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanelItem.setFixedHeight | def setFixedHeight(self, height):
"""
Sets the fixed height for this item to the inputed height amount.
:param height | <int>
"""
super(XViewPanelItem, self).setFixedHeight(height)
self._dragLabel.setFixedHeight(height)
self._titleLabel.setFixedHeight(heigh... | python | def setFixedHeight(self, height):
"""
Sets the fixed height for this item to the inputed height amount.
:param height | <int>
"""
super(XViewPanelItem, self).setFixedHeight(height)
self._dragLabel.setFixedHeight(height)
self._titleLabel.setFixedHeight(heigh... | [
"def",
"setFixedHeight",
"(",
"self",
",",
"height",
")",
":",
"super",
"(",
"XViewPanelItem",
",",
"self",
")",
".",
"setFixedHeight",
"(",
"height",
")",
"self",
".",
"_dragLabel",
".",
"setFixedHeight",
"(",
"height",
")",
"self",
".",
"_titleLabel",
".... | Sets the fixed height for this item to the inputed height amount.
:param height | <int> | [
"Sets",
"the",
"fixed",
"height",
"for",
"this",
"item",
"to",
"the",
"inputed",
"height",
"amount",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L274-L285 | train | Sets the fixed height for this item to the inputed height amount. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanelBar.addTab | def addTab(self, tab):
"""
Adds a new tab to this panel bar.
:param tab | <XViewPanelItem> || <str>
:return <int>
"""
if not isinstance(tab, XViewPanelItem):
tab = XViewPanelItem(tab, self)
tab.setFixedHeight(self.height())
inde... | python | def addTab(self, tab):
"""
Adds a new tab to this panel bar.
:param tab | <XViewPanelItem> || <str>
:return <int>
"""
if not isinstance(tab, XViewPanelItem):
tab = XViewPanelItem(tab, self)
tab.setFixedHeight(self.height())
inde... | [
"def",
"addTab",
"(",
"self",
",",
"tab",
")",
":",
"if",
"not",
"isinstance",
"(",
"tab",
",",
"XViewPanelItem",
")",
":",
"tab",
"=",
"XViewPanelItem",
"(",
"tab",
",",
"self",
")",
"tab",
".",
"setFixedHeight",
"(",
"self",
".",
"height",
"(",
")"... | Adds a new tab to this panel bar.
:param tab | <XViewPanelItem> || <str>
:return <int> | [
"Adds",
"a",
"new",
"tab",
"to",
"this",
"panel",
"bar",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L389-L405 | train | Adds a new tab to this panel bar. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanelBar.clear | def clear(self):
"""
Clears out all the items from this tab bar.
"""
self.blockSignals(True)
items = list(self.items())
for item in items:
item.close()
self.blockSignals(False)
self._currentIndex = -1
self.currentIndexChanged.emit(self... | python | def clear(self):
"""
Clears out all the items from this tab bar.
"""
self.blockSignals(True)
items = list(self.items())
for item in items:
item.close()
self.blockSignals(False)
self._currentIndex = -1
self.currentIndexChanged.emit(self... | [
"def",
"clear",
"(",
"self",
")",
":",
"self",
".",
"blockSignals",
"(",
"True",
")",
"items",
"=",
"list",
"(",
"self",
".",
"items",
"(",
")",
")",
"for",
"item",
"in",
"items",
":",
"item",
".",
"close",
"(",
")",
"self",
".",
"blockSignals",
... | Clears out all the items from this tab bar. | [
"Clears",
"out",
"all",
"the",
"items",
"from",
"this",
"tab",
"bar",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L407-L418 | train | Clears out all the items from this tab bar. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanelBar.closeTab | def closeTab(self, item):
"""
Requests a close for the inputed tab item.
:param item | <XViewPanelItem>
"""
index = self.indexOf(item)
if index != -1:
self.tabCloseRequested.emit(index) | python | def closeTab(self, item):
"""
Requests a close for the inputed tab item.
:param item | <XViewPanelItem>
"""
index = self.indexOf(item)
if index != -1:
self.tabCloseRequested.emit(index) | [
"def",
"closeTab",
"(",
"self",
",",
"item",
")",
":",
"index",
"=",
"self",
".",
"indexOf",
"(",
"item",
")",
"if",
"index",
"!=",
"-",
"1",
":",
"self",
".",
"tabCloseRequested",
".",
"emit",
"(",
"index",
")"
] | Requests a close for the inputed tab item.
:param item | <XViewPanelItem> | [
"Requests",
"a",
"close",
"for",
"the",
"inputed",
"tab",
"item",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L420-L428 | train | Requests a close for the inputed tab item. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanelBar.insertTab | def insertTab(self, index, tab):
"""
Adds a new tab to this panel bar.
:param tab | <XViewPanelItem> || <str>
:return <int>
"""
if not isinstance(tab, XViewPanelItem):
tab = XViewPanelItem(tab, self)
tab.setFixedHeight(self.height())
... | python | def insertTab(self, index, tab):
"""
Adds a new tab to this panel bar.
:param tab | <XViewPanelItem> || <str>
:return <int>
"""
if not isinstance(tab, XViewPanelItem):
tab = XViewPanelItem(tab, self)
tab.setFixedHeight(self.height())
... | [
"def",
"insertTab",
"(",
"self",
",",
"index",
",",
"tab",
")",
":",
"if",
"not",
"isinstance",
"(",
"tab",
",",
"XViewPanelItem",
")",
":",
"tab",
"=",
"XViewPanelItem",
"(",
"tab",
",",
"self",
")",
"tab",
".",
"setFixedHeight",
"(",
"self",
".",
"... | Adds a new tab to this panel bar.
:param tab | <XViewPanelItem> || <str>
:return <int> | [
"Adds",
"a",
"new",
"tab",
"to",
"this",
"panel",
"bar",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L468-L483 | train | Adds a new tab to this panel bar. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanelBar.items | def items(self):
"""
Returns a list of all the items associated with this panel.
:return [<XViewPanelItem>, ..]
"""
output = []
for i in xrange(self.layout().count()):
item = self.layout().itemAt(i)
try:
widget = item.widget()
... | python | def items(self):
"""
Returns a list of all the items associated with this panel.
:return [<XViewPanelItem>, ..]
"""
output = []
for i in xrange(self.layout().count()):
item = self.layout().itemAt(i)
try:
widget = item.widget()
... | [
"def",
"items",
"(",
"self",
")",
":",
"output",
"=",
"[",
"]",
"for",
"i",
"in",
"xrange",
"(",
"self",
".",
"layout",
"(",
")",
".",
"count",
"(",
")",
")",
":",
"item",
"=",
"self",
".",
"layout",
"(",
")",
".",
"itemAt",
"(",
"i",
")",
... | Returns a list of all the items associated with this panel.
:return [<XViewPanelItem>, ..] | [
"Returns",
"a",
"list",
"of",
"all",
"the",
"items",
"associated",
"with",
"this",
"panel",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L488-L506 | train | Returns a list of all the items associated with this panel. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanelBar.moveTab | def moveTab(self, fromIndex, toIndex):
"""
Moves the tab from the inputed index to the given index.
:param fromIndex | <int>
toIndex | <int>
"""
try:
item = self.layout().itemAt(fromIndex)
self.layout().insertItem(toIndex, item.... | python | def moveTab(self, fromIndex, toIndex):
"""
Moves the tab from the inputed index to the given index.
:param fromIndex | <int>
toIndex | <int>
"""
try:
item = self.layout().itemAt(fromIndex)
self.layout().insertItem(toIndex, item.... | [
"def",
"moveTab",
"(",
"self",
",",
"fromIndex",
",",
"toIndex",
")",
":",
"try",
":",
"item",
"=",
"self",
".",
"layout",
"(",
")",
".",
"itemAt",
"(",
"fromIndex",
")",
"self",
".",
"layout",
"(",
")",
".",
"insertItem",
"(",
"toIndex",
",",
"ite... | Moves the tab from the inputed index to the given index.
:param fromIndex | <int>
toIndex | <int> | [
"Moves",
"the",
"tab",
"from",
"the",
"inputed",
"index",
"to",
"the",
"given",
"index",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L508-L519 | train | Moves the tab from the inputed index to the given index. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanelBar.paintEvent | def paintEvent(self, event):
"""
Runs the paint event for this item.
"""
painter = QtGui.QPainter()
painter.begin(self)
try:
h = self.height() - 1
palette = self.palette()
clr = palette.color(palette.WindowText)
clr.setAlpha... | python | def paintEvent(self, event):
"""
Runs the paint event for this item.
"""
painter = QtGui.QPainter()
painter.begin(self)
try:
h = self.height() - 1
palette = self.palette()
clr = palette.color(palette.WindowText)
clr.setAlpha... | [
"def",
"paintEvent",
"(",
"self",
",",
"event",
")",
":",
"painter",
"=",
"QtGui",
".",
"QPainter",
"(",
")",
"painter",
".",
"begin",
"(",
"self",
")",
"try",
":",
"h",
"=",
"self",
".",
"height",
"(",
")",
"-",
"1",
"palette",
"=",
"self",
".",... | Runs the paint event for this item. | [
"Runs",
"the",
"paint",
"event",
"for",
"this",
"item",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L521-L544 | train | Runs the paint event for this item. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanelBar.removeTab | def removeTab(self, index):
"""
Removes the tab at the inputed index.
:param index | <int>
"""
curr_index = self.currentIndex()
items = list(self.items())
item = items[index]
item.close()
if index <= curr_index:
self._currentInde... | python | def removeTab(self, index):
"""
Removes the tab at the inputed index.
:param index | <int>
"""
curr_index = self.currentIndex()
items = list(self.items())
item = items[index]
item.close()
if index <= curr_index:
self._currentInde... | [
"def",
"removeTab",
"(",
"self",
",",
"index",
")",
":",
"curr_index",
"=",
"self",
".",
"currentIndex",
"(",
")",
"items",
"=",
"list",
"(",
"self",
".",
"items",
"(",
")",
")",
"item",
"=",
"items",
"[",
"index",
"]",
"item",
".",
"close",
"(",
... | Removes the tab at the inputed index.
:param index | <int> | [
"Removes",
"the",
"tab",
"at",
"the",
"inputed",
"index",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L546-L558 | train | Removes the tab at the inputed index. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanelBar.requestAddMenu | def requestAddMenu(self):
"""
Emits the add requested signal.
"""
point = QtCore.QPoint(self._addButton.width(), 0)
point = self._addButton.mapToGlobal(point)
self.addRequested.emit(point) | python | def requestAddMenu(self):
"""
Emits the add requested signal.
"""
point = QtCore.QPoint(self._addButton.width(), 0)
point = self._addButton.mapToGlobal(point)
self.addRequested.emit(point) | [
"def",
"requestAddMenu",
"(",
"self",
")",
":",
"point",
"=",
"QtCore",
".",
"QPoint",
"(",
"self",
".",
"_addButton",
".",
"width",
"(",
")",
",",
"0",
")",
"point",
"=",
"self",
".",
"_addButton",
".",
"mapToGlobal",
"(",
"point",
")",
"self",
".",... | Emits the add requested signal. | [
"Emits",
"the",
"add",
"requested",
"signal",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L560-L566 | train | Emits the add requested signal. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanelBar.requestOptionsMenu | def requestOptionsMenu(self):
"""
Emits the options request signal.
"""
point = QtCore.QPoint(0, self._optionsButton.height())
point = self._optionsButton.mapToGlobal(point)
self.optionsRequested.emit(point) | python | def requestOptionsMenu(self):
"""
Emits the options request signal.
"""
point = QtCore.QPoint(0, self._optionsButton.height())
point = self._optionsButton.mapToGlobal(point)
self.optionsRequested.emit(point) | [
"def",
"requestOptionsMenu",
"(",
"self",
")",
":",
"point",
"=",
"QtCore",
".",
"QPoint",
"(",
"0",
",",
"self",
".",
"_optionsButton",
".",
"height",
"(",
")",
")",
"point",
"=",
"self",
".",
"_optionsButton",
".",
"mapToGlobal",
"(",
"point",
")",
"... | Emits the options request signal. | [
"Emits",
"the",
"options",
"request",
"signal",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L568-L574 | train | Emits the options request signal. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanelBar.setCurrentIndex | def setCurrentIndex(self, index):
"""
Sets the current item to the item at the inputed index.
:param index | <int>
"""
if self._currentIndex == index:
return
self._currentIndex = index
self.currentIndexChanged.emit(index)
for i, item in... | python | def setCurrentIndex(self, index):
"""
Sets the current item to the item at the inputed index.
:param index | <int>
"""
if self._currentIndex == index:
return
self._currentIndex = index
self.currentIndexChanged.emit(index)
for i, item in... | [
"def",
"setCurrentIndex",
"(",
"self",
",",
"index",
")",
":",
"if",
"self",
".",
"_currentIndex",
"==",
"index",
":",
"return",
"self",
".",
"_currentIndex",
"=",
"index",
"self",
".",
"currentIndexChanged",
".",
"emit",
"(",
"index",
")",
"for",
"i",
"... | Sets the current item to the item at the inputed index.
:param index | <int> | [
"Sets",
"the",
"current",
"item",
"to",
"the",
"item",
"at",
"the",
"inputed",
"index",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L576-L590 | train | Sets the current item to the item at the inputed index. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanelBar.setFixedHeight | def setFixedHeight(self, height):
"""
Sets the fixed height for this bar to the inputed height.
:param height | <int>
"""
super(XViewPanelBar, self).setFixedHeight(height)
# update the layout
if self.layout():
for i in xrange(self.layout().count... | python | def setFixedHeight(self, height):
"""
Sets the fixed height for this bar to the inputed height.
:param height | <int>
"""
super(XViewPanelBar, self).setFixedHeight(height)
# update the layout
if self.layout():
for i in xrange(self.layout().count... | [
"def",
"setFixedHeight",
"(",
"self",
",",
"height",
")",
":",
"super",
"(",
"XViewPanelBar",
",",
"self",
")",
".",
"setFixedHeight",
"(",
"height",
")",
"# update the layout",
"if",
"self",
".",
"layout",
"(",
")",
":",
"for",
"i",
"in",
"xrange",
"(",... | Sets the fixed height for this bar to the inputed height.
:param height | <int> | [
"Sets",
"the",
"fixed",
"height",
"for",
"this",
"bar",
"to",
"the",
"inputed",
"height",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L610-L624 | train | Sets the fixed height for this bar to the inputed height. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanelBar.setTabText | def setTabText(self, index, text):
"""
Returns the text for the tab at the inputed index.
:param index | <int>
:return <str>
"""
try:
self.items()[index].setText(text)
except IndexError:
pass | python | def setTabText(self, index, text):
"""
Returns the text for the tab at the inputed index.
:param index | <int>
:return <str>
"""
try:
self.items()[index].setText(text)
except IndexError:
pass | [
"def",
"setTabText",
"(",
"self",
",",
"index",
",",
"text",
")",
":",
"try",
":",
"self",
".",
"items",
"(",
")",
"[",
"index",
"]",
".",
"setText",
"(",
"text",
")",
"except",
"IndexError",
":",
"pass"
] | Returns the text for the tab at the inputed index.
:param index | <int>
:return <str> | [
"Returns",
"the",
"text",
"for",
"the",
"tab",
"at",
"the",
"inputed",
"index",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L626-L637 | train | Sets the text for the tab at the inputed index. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanel.addTab | def addTab(self, view, title):
"""
Adds a new view tab to this panel.
:param view | <XView>
title | <str>
:return <bool> | success
"""
if not isinstance(view, XView):
return False
tab = self._tabBar.... | python | def addTab(self, view, title):
"""
Adds a new view tab to this panel.
:param view | <XView>
title | <str>
:return <bool> | success
"""
if not isinstance(view, XView):
return False
tab = self._tabBar.... | [
"def",
"addTab",
"(",
"self",
",",
"view",
",",
"title",
")",
":",
"if",
"not",
"isinstance",
"(",
"view",
",",
"XView",
")",
":",
"return",
"False",
"tab",
"=",
"self",
".",
"_tabBar",
".",
"addTab",
"(",
"title",
")",
"self",
".",
"addWidget",
"(... | Adds a new view tab to this panel.
:param view | <XView>
title | <str>
:return <bool> | success | [
"Adds",
"a",
"new",
"view",
"tab",
"to",
"this",
"panel",
".",
":",
"param",
"view",
"|",
"<XView",
">",
"title",
"|",
"<str",
">",
":",
"return",
"<bool",
">",
"|",
"success"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L836-L865 | train | Adds a new tab to the panel. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanel.addView | def addView(self, viewType):
"""
Adds a new view of the inputed view type.
:param viewType | <subclass of XView>
:return <XView> || None
"""
if not viewType:
return None
view = viewType.createInstance(self, self.view... | python | def addView(self, viewType):
"""
Adds a new view of the inputed view type.
:param viewType | <subclass of XView>
:return <XView> || None
"""
if not viewType:
return None
view = viewType.createInstance(self, self.view... | [
"def",
"addView",
"(",
"self",
",",
"viewType",
")",
":",
"if",
"not",
"viewType",
":",
"return",
"None",
"view",
"=",
"viewType",
".",
"createInstance",
"(",
"self",
",",
"self",
".",
"viewWidget",
"(",
")",
")",
"self",
".",
"addTab",
"(",
"view",
... | Adds a new view of the inputed view type.
:param viewType | <subclass of XView>
:return <XView> || None | [
"Adds",
"a",
"new",
"view",
"of",
"the",
"inputed",
"view",
"type",
".",
":",
"param",
"viewType",
"|",
"<subclass",
"of",
"XView",
">",
":",
"return",
"<XView",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L867-L880 | train | Adds a new view of the inputed view type to the current tab. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanel.adjustSizeConstraint | def adjustSizeConstraint(self):
"""
Adjusts the min/max size based on the current tab.
"""
widget = self.currentWidget()
if not widget:
return
offw = 4
offh = 4
#if self.tabBar().isVisible():
# offh += 20 # tab ... | python | def adjustSizeConstraint(self):
"""
Adjusts the min/max size based on the current tab.
"""
widget = self.currentWidget()
if not widget:
return
offw = 4
offh = 4
#if self.tabBar().isVisible():
# offh += 20 # tab ... | [
"def",
"adjustSizeConstraint",
"(",
"self",
")",
":",
"widget",
"=",
"self",
".",
"currentWidget",
"(",
")",
"if",
"not",
"widget",
":",
"return",
"offw",
"=",
"4",
"offh",
"=",
"4",
"#if self.tabBar().isVisible():",
"# offh += 20 # tab bar height",
"minw",
"... | Adjusts the min/max size based on the current tab. | [
"Adjusts",
"the",
"min",
"/",
"max",
"size",
"based",
"on",
"the",
"current",
"tab",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L882-L903 | train | Adjusts the min and max size based on the current tab. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanel.closeView | def closeView(self, view=None):
"""
Closes the inputed view.
:param view | <int> || <XView> || None
"""
if type(view) == int:
view = self.widget(view)
elif view == None:
view = self.currentView()
index = self.indexOf(... | python | def closeView(self, view=None):
"""
Closes the inputed view.
:param view | <int> || <XView> || None
"""
if type(view) == int:
view = self.widget(view)
elif view == None:
view = self.currentView()
index = self.indexOf(... | [
"def",
"closeView",
"(",
"self",
",",
"view",
"=",
"None",
")",
":",
"if",
"type",
"(",
"view",
")",
"==",
"int",
":",
"view",
"=",
"self",
".",
"widget",
"(",
"view",
")",
"elif",
"view",
"==",
"None",
":",
"view",
"=",
"self",
".",
"currentView... | Closes the inputed view.
:param view | <int> || <XView> || None | [
"Closes",
"the",
"inputed",
"view",
".",
":",
"param",
"view",
"|",
"<int",
">",
"||",
"<XView",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L911-L933 | train | Closes the inputed view. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanel.closePanel | def closePanel(self):
"""
Closes a full view panel.
"""
# make sure we can close all the widgets in the view first
for i in range(self.count()):
if not self.widget(i).canClose():
return False
container = self.parentWidget()
viewWidget ... | python | def closePanel(self):
"""
Closes a full view panel.
"""
# make sure we can close all the widgets in the view first
for i in range(self.count()):
if not self.widget(i).canClose():
return False
container = self.parentWidget()
viewWidget ... | [
"def",
"closePanel",
"(",
"self",
")",
":",
"# make sure we can close all the widgets in the view first",
"for",
"i",
"in",
"range",
"(",
"self",
".",
"count",
"(",
")",
")",
":",
"if",
"not",
"self",
".",
"widget",
"(",
"i",
")",
".",
"canClose",
"(",
")"... | Closes a full view panel. | [
"Closes",
"a",
"full",
"view",
"panel",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L935-L993 | train | Closes a full view panel. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanel.ensureVisible | def ensureVisible(self, viewType):
"""
Find and switch to the first tab of the specified view type. If the
type does not exist, add it.
:param viewType | <subclass of XView>
:return <XView> || None
"""
# make sure we're not trying to switch to the same ty... | python | def ensureVisible(self, viewType):
"""
Find and switch to the first tab of the specified view type. If the
type does not exist, add it.
:param viewType | <subclass of XView>
:return <XView> || None
"""
# make sure we're not trying to switch to the same ty... | [
"def",
"ensureVisible",
"(",
"self",
",",
"viewType",
")",
":",
"# make sure we're not trying to switch to the same type",
"view",
"=",
"self",
".",
"currentView",
"(",
")",
"if",
"type",
"(",
"view",
")",
"==",
"viewType",
":",
"return",
"view",
"self",
".",
... | Find and switch to the first tab of the specified view type. If the
type does not exist, add it.
:param viewType | <subclass of XView>
:return <XView> || None | [
"Find",
"and",
"switch",
"to",
"the",
"first",
"tab",
"of",
"the",
"specified",
"view",
"type",
".",
"If",
"the",
"type",
"does",
"not",
"exist",
"add",
"it",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L1121-L1150 | train | Checks if the current tab of the specified type exists and if not adds it. If it does not exist returns None. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanel.insertTab | def insertTab(self, index, widget, title):
"""
Inserts a new tab for this widget.
:param index | <int>
widget | <QtGui.QWidget>
title | <str>
"""
self.insertWidget(index, widget)
tab = self.tabBar().insertTab(index, title)
... | python | def insertTab(self, index, widget, title):
"""
Inserts a new tab for this widget.
:param index | <int>
widget | <QtGui.QWidget>
title | <str>
"""
self.insertWidget(index, widget)
tab = self.tabBar().insertTab(index, title)
... | [
"def",
"insertTab",
"(",
"self",
",",
"index",
",",
"widget",
",",
"title",
")",
":",
"self",
".",
"insertWidget",
"(",
"index",
",",
"widget",
")",
"tab",
"=",
"self",
".",
"tabBar",
"(",
")",
".",
"insertTab",
"(",
"index",
",",
"title",
")",
"ta... | Inserts a new tab for this widget.
:param index | <int>
widget | <QtGui.QWidget>
title | <str> | [
"Inserts",
"a",
"new",
"tab",
"for",
"this",
"widget",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L1225-L1235 | train | Inserts a new tab for this widget and sets the window title. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanel.markCurrentChanged | def markCurrentChanged(self):
"""
Marks that the current widget has changed.
"""
view = self.currentView()
if view:
view.setCurrent()
self.setFocus()
view.setFocus()
self._hintLabel.hide()
else:
self._hintLabel.s... | python | def markCurrentChanged(self):
"""
Marks that the current widget has changed.
"""
view = self.currentView()
if view:
view.setCurrent()
self.setFocus()
view.setFocus()
self._hintLabel.hide()
else:
self._hintLabel.s... | [
"def",
"markCurrentChanged",
"(",
"self",
")",
":",
"view",
"=",
"self",
".",
"currentView",
"(",
")",
"if",
"view",
":",
"view",
".",
"setCurrent",
"(",
")",
"self",
".",
"setFocus",
"(",
")",
"view",
".",
"setFocus",
"(",
")",
"self",
".",
"_hintLa... | Marks that the current widget has changed. | [
"Marks",
"that",
"the",
"current",
"widget",
"has",
"changed",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L1254-L1271 | train | Mark that the current widget has changed. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanel.paintEvent | def paintEvent(self, event):
"""
Runs the paint event for this item.
"""
painter = QtGui.QPainter()
painter.begin(self)
try:
palette = self.palette()
clr = palette.color(palette.WindowText)
clr.setAlpha(100)
painter.setPen(c... | python | def paintEvent(self, event):
"""
Runs the paint event for this item.
"""
painter = QtGui.QPainter()
painter.begin(self)
try:
palette = self.palette()
clr = palette.color(palette.WindowText)
clr.setAlpha(100)
painter.setPen(c... | [
"def",
"paintEvent",
"(",
"self",
",",
"event",
")",
":",
"painter",
"=",
"QtGui",
".",
"QPainter",
"(",
")",
"painter",
".",
"begin",
"(",
"self",
")",
"try",
":",
"palette",
"=",
"self",
".",
"palette",
"(",
")",
"clr",
"=",
"palette",
".",
"colo... | Runs the paint event for this item. | [
"Runs",
"the",
"paint",
"event",
"for",
"this",
"item",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L1273-L1299 | train | Runs the paint event for this item. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanel.refreshTitles | def refreshTitles(self):
"""
Refreshes the titles for each view within this tab panel.
"""
for index in range(self.count()):
widget = self.widget(index)
self.setTabText(index, widget.windowTitle()) | python | def refreshTitles(self):
"""
Refreshes the titles for each view within this tab panel.
"""
for index in range(self.count()):
widget = self.widget(index)
self.setTabText(index, widget.windowTitle()) | [
"def",
"refreshTitles",
"(",
"self",
")",
":",
"for",
"index",
"in",
"range",
"(",
"self",
".",
"count",
"(",
")",
")",
":",
"widget",
"=",
"self",
".",
"widget",
"(",
"index",
")",
"self",
".",
"setTabText",
"(",
"index",
",",
"widget",
".",
"wind... | Refreshes the titles for each view within this tab panel. | [
"Refreshes",
"the",
"titles",
"for",
"each",
"view",
"within",
"this",
"tab",
"panel",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L1301-L1307 | train | Refreshes the titles for each view within this tab panel. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanel.removeTab | def removeTab(self, index):
"""
Removes the view at the inputed index and disconnects it from the \
panel.
:param index | <int>
"""
view = self.widget(index)
if isinstance(view, XView):
try:
view.windowTitleChanged.disconn... | python | def removeTab(self, index):
"""
Removes the view at the inputed index and disconnects it from the \
panel.
:param index | <int>
"""
view = self.widget(index)
if isinstance(view, XView):
try:
view.windowTitleChanged.disconn... | [
"def",
"removeTab",
"(",
"self",
",",
"index",
")",
":",
"view",
"=",
"self",
".",
"widget",
"(",
"index",
")",
"if",
"isinstance",
"(",
"view",
",",
"XView",
")",
":",
"try",
":",
"view",
".",
"windowTitleChanged",
".",
"disconnect",
"(",
"self",
".... | Removes the view at the inputed index and disconnects it from the \
panel.
:param index | <int> | [
"Removes",
"the",
"view",
"at",
"the",
"inputed",
"index",
"and",
"disconnects",
"it",
"from",
"the",
"\\",
"panel",
".",
":",
"param",
"index",
"|",
"<int",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L1321-L1336 | train | Removes the view at the inputed index and disconnects it from the \ necmascript \ necmascript \ necmascript \ necmascript \ necmascript \ necmascript \ necmascript \ necmascript \ necmascript \ necmascript \ necmascript \ necmascript \ necmascript \ necmascript \ necmascript \ necmascript \ necm |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanel.setCurrentIndex | def setCurrentIndex(self, index):
"""
Sets the current index on self and on the tab bar to keep the two insync.
:param index | <int>
"""
super(XViewPanel, self).setCurrentIndex(index)
self.tabBar().setCurrentIndex(index) | python | def setCurrentIndex(self, index):
"""
Sets the current index on self and on the tab bar to keep the two insync.
:param index | <int>
"""
super(XViewPanel, self).setCurrentIndex(index)
self.tabBar().setCurrentIndex(index) | [
"def",
"setCurrentIndex",
"(",
"self",
",",
"index",
")",
":",
"super",
"(",
"XViewPanel",
",",
"self",
")",
".",
"setCurrentIndex",
"(",
"index",
")",
"self",
".",
"tabBar",
"(",
")",
".",
"setCurrentIndex",
"(",
"index",
")"
] | Sets the current index on self and on the tab bar to keep the two insync.
:param index | <int> | [
"Sets",
"the",
"current",
"index",
"on",
"self",
"and",
"on",
"the",
"tab",
"bar",
"to",
"keep",
"the",
"two",
"insync",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L1452-L1459 | train | Sets the current index on the tab bar and keep the two insync. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanel.setLocked | def setLocked(self, state, force=False):
"""
Sets the locked state for this panel to the inputed state.
:param state | <bool>
"""
if not force and state == self._locked:
return
self._locked = state
tabbar = self.tabBar()
... | python | def setLocked(self, state, force=False):
"""
Sets the locked state for this panel to the inputed state.
:param state | <bool>
"""
if not force and state == self._locked:
return
self._locked = state
tabbar = self.tabBar()
... | [
"def",
"setLocked",
"(",
"self",
",",
"state",
",",
"force",
"=",
"False",
")",
":",
"if",
"not",
"force",
"and",
"state",
"==",
"self",
".",
"_locked",
":",
"return",
"self",
".",
"_locked",
"=",
"state",
"tabbar",
"=",
"self",
".",
"tabBar",
"(",
... | Sets the locked state for this panel to the inputed state.
:param state | <bool> | [
"Sets",
"the",
"locked",
"state",
"for",
"this",
"panel",
"to",
"the",
"inputed",
"state",
".",
":",
"param",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L1470-L1492 | train | Sets the locked state for this panel. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanel.switchCurrentView | def switchCurrentView(self, viewType):
"""
Swaps the current tab view for the inputed action's type.
:param action | <QAction>
:return <XView> || None
"""
if not self.count():
return self.addView(viewType)
# make sure we're not trying to sw... | python | def switchCurrentView(self, viewType):
"""
Swaps the current tab view for the inputed action's type.
:param action | <QAction>
:return <XView> || None
"""
if not self.count():
return self.addView(viewType)
# make sure we're not trying to sw... | [
"def",
"switchCurrentView",
"(",
"self",
",",
"viewType",
")",
":",
"if",
"not",
"self",
".",
"count",
"(",
")",
":",
"return",
"self",
".",
"addView",
"(",
"viewType",
")",
"# make sure we're not trying to switch to the same type",
"view",
"=",
"self",
".",
"... | Swaps the current tab view for the inputed action's type.
:param action | <QAction>
:return <XView> || None | [
"Swaps",
"the",
"current",
"tab",
"view",
"for",
"the",
"inputed",
"action",
"s",
"type",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L1503-L1540 | train | Swaps the current tab view for the inputed action s type. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewpanel.py | XViewPanel.snagViewFromPanel | def snagViewFromPanel(self, panel, index=None):
"""
Removes the view from the inputed panel and adds it to this panel.
:param panel | <XViewPanel>
view | <XView>
"""
if index == None:
index = panel.currentIndex()
... | python | def snagViewFromPanel(self, panel, index=None):
"""
Removes the view from the inputed panel and adds it to this panel.
:param panel | <XViewPanel>
view | <XView>
"""
if index == None:
index = panel.currentIndex()
... | [
"def",
"snagViewFromPanel",
"(",
"self",
",",
"panel",
",",
"index",
"=",
"None",
")",
":",
"if",
"index",
"==",
"None",
":",
"index",
"=",
"panel",
".",
"currentIndex",
"(",
")",
"view",
"=",
"panel",
".",
"widget",
"(",
"index",
")",
"if",
"not",
... | Removes the view from the inputed panel and adds it to this panel.
:param panel | <XViewPanel>
view | <XView> | [
"Removes",
"the",
"view",
"from",
"the",
"inputed",
"panel",
"and",
"adds",
"it",
"to",
"this",
"panel",
".",
":",
"param",
"panel",
"|",
"<XViewPanel",
">",
"view",
"|",
"<XView",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewpanel.py#L1580-L1603 | train | Removes the view from the inputed panel and adds it to this panel. |
AgeOfLearning/coeus-unity-python-framework | coeus_unity/commands.py | await_transform_exists | def await_transform_exists(cli, transform_path, does_exist=DEFAULT_TRANSFORM_EXISTS, timeout_seconds=DEFAULT_TIMEOUT_SECONDS):
"""
Waits for a single transform to exist based on does_exist.
:param cli:
:param transform_path:
:param does_exist: Whether or not to await for exist state (True | False)
... | python | def await_transform_exists(cli, transform_path, does_exist=DEFAULT_TRANSFORM_EXISTS, timeout_seconds=DEFAULT_TIMEOUT_SECONDS):
"""
Waits for a single transform to exist based on does_exist.
:param cli:
:param transform_path:
:param does_exist: Whether or not to await for exist state (True | False)
... | [
"def",
"await_transform_exists",
"(",
"cli",
",",
"transform_path",
",",
"does_exist",
"=",
"DEFAULT_TRANSFORM_EXISTS",
",",
"timeout_seconds",
"=",
"DEFAULT_TIMEOUT_SECONDS",
")",
":",
"message_payload",
"=",
"{",
"\"transform_paths\"",
":",
"[",
"transform_path",
"]",... | Waits for a single transform to exist based on does_exist.
:param cli:
:param transform_path:
:param does_exist: Whether or not to await for exist state (True | False)
:param timeout_seconds: How long until this returns with failure
:return: bool | [
"Waits",
"for",
"a",
"single",
"transform",
"to",
"exist",
"based",
"on",
"does_exist",
".",
":",
"param",
"cli",
":",
":",
"param",
"transform_path",
":",
":",
"param",
"does_exist",
":",
"Whether",
"or",
"not",
"to",
"await",
"for",
"exist",
"state",
"... | cf8ca6800ace1425d917ea2628dbd05ed959fdd7 | https://github.com/AgeOfLearning/coeus-unity-python-framework/blob/cf8ca6800ace1425d917ea2628dbd05ed959fdd7/coeus_unity/commands.py#L29-L49 | train | Wait for a single transform to exist based on does_exist. |
AgeOfLearning/coeus-unity-python-framework | coeus_unity/commands.py | await_any_transforms_exist | def await_any_transforms_exist(cli, transform_paths, does_exist=DEFAULT_TRANSFORM_EXISTS, timeout_seconds=DEFAULT_TIMEOUT_SECONDS):
"""
Waits for a transform to exist based on does_exist.
:param cli:
:param transform_paths: An array of transform paths [...]
:param does_exist: Whether or not to await... | python | def await_any_transforms_exist(cli, transform_paths, does_exist=DEFAULT_TRANSFORM_EXISTS, timeout_seconds=DEFAULT_TIMEOUT_SECONDS):
"""
Waits for a transform to exist based on does_exist.
:param cli:
:param transform_paths: An array of transform paths [...]
:param does_exist: Whether or not to await... | [
"def",
"await_any_transforms_exist",
"(",
"cli",
",",
"transform_paths",
",",
"does_exist",
"=",
"DEFAULT_TRANSFORM_EXISTS",
",",
"timeout_seconds",
"=",
"DEFAULT_TIMEOUT_SECONDS",
")",
":",
"message_payload",
"=",
"{",
"\"transform_paths\"",
":",
"transform_paths",
",",
... | Waits for a transform to exist based on does_exist.
:param cli:
:param transform_paths: An array of transform paths [...]
:param does_exist: Whether or not to await for exist state (True | False)
:param timeout_seconds: How long until this returns with failure
:return: bool | [
"Waits",
"for",
"a",
"transform",
"to",
"exist",
"based",
"on",
"does_exist",
".",
":",
"param",
"cli",
":",
":",
"param",
"transform_paths",
":",
"An",
"array",
"of",
"transform",
"paths",
"[",
"...",
"]",
":",
"param",
"does_exist",
":",
"Whether",
"or... | cf8ca6800ace1425d917ea2628dbd05ed959fdd7 | https://github.com/AgeOfLearning/coeus-unity-python-framework/blob/cf8ca6800ace1425d917ea2628dbd05ed959fdd7/coeus_unity/commands.py#L52-L72 | train | Waits for a transform to exist based on does_exist. |
AgeOfLearning/coeus-unity-python-framework | coeus_unity/commands.py | fetch_transform_screen_position | def fetch_transform_screen_position(cli, transform_path):
"""
Requests screen position of a transform at path. WorldToScreenPoint is used for 3D, otherwise
a screen-scaled center of RectTransform is used.
:param cli:
:param transform_path:
:return: [x,y]
"""
message_payload = {
... | python | def fetch_transform_screen_position(cli, transform_path):
"""
Requests screen position of a transform at path. WorldToScreenPoint is used for 3D, otherwise
a screen-scaled center of RectTransform is used.
:param cli:
:param transform_path:
:return: [x,y]
"""
message_payload = {
... | [
"def",
"fetch_transform_screen_position",
"(",
"cli",
",",
"transform_path",
")",
":",
"message_payload",
"=",
"{",
"\"transform_path\"",
":",
"transform_path",
"}",
"msg",
"=",
"message",
".",
"Message",
"(",
"\"fetch.unity.transform.screenPosition\"",
",",
"message_pa... | Requests screen position of a transform at path. WorldToScreenPoint is used for 3D, otherwise
a screen-scaled center of RectTransform is used.
:param cli:
:param transform_path:
:return: [x,y] | [
"Requests",
"screen",
"position",
"of",
"a",
"transform",
"at",
"path",
".",
"WorldToScreenPoint",
"is",
"used",
"for",
"3D",
"otherwise",
"a",
"screen",
"-",
"scaled",
"center",
"of",
"RectTransform",
"is",
"used",
".",
":",
"param",
"cli",
":",
":",
"par... | cf8ca6800ace1425d917ea2628dbd05ed959fdd7 | https://github.com/AgeOfLearning/coeus-unity-python-framework/blob/cf8ca6800ace1425d917ea2628dbd05ed959fdd7/coeus_unity/commands.py#L98-L118 | train | Requests screen position of a transform at path. |
AgeOfLearning/coeus-unity-python-framework | coeus_unity/commands.py | query_renderer_visible | def query_renderer_visible(cli, transform_path):
"""
Requests status on whether a renderer at transform_path is visible.
:param cli:
:param transform_path:
:return: bool
"""
message_payload = {
"transform_path": transform_path
}
msg = message.Message("query.unity.renderer.vi... | python | def query_renderer_visible(cli, transform_path):
"""
Requests status on whether a renderer at transform_path is visible.
:param cli:
:param transform_path:
:return: bool
"""
message_payload = {
"transform_path": transform_path
}
msg = message.Message("query.unity.renderer.vi... | [
"def",
"query_renderer_visible",
"(",
"cli",
",",
"transform_path",
")",
":",
"message_payload",
"=",
"{",
"\"transform_path\"",
":",
"transform_path",
"}",
"msg",
"=",
"message",
".",
"Message",
"(",
"\"query.unity.renderer.visible\"",
",",
"message_payload",
")",
... | Requests status on whether a renderer at transform_path is visible.
:param cli:
:param transform_path:
:return: bool | [
"Requests",
"status",
"on",
"whether",
"a",
"renderer",
"at",
"transform_path",
"is",
"visible",
".",
":",
"param",
"cli",
":",
":",
"param",
"transform_path",
":",
":",
"return",
":",
"bool"
] | cf8ca6800ace1425d917ea2628dbd05ed959fdd7 | https://github.com/AgeOfLearning/coeus-unity-python-framework/blob/cf8ca6800ace1425d917ea2628dbd05ed959fdd7/coeus_unity/commands.py#L144-L160 | train | Queries Unity to see if a renderer at transform_path is visible. |
AgeOfLearning/coeus-unity-python-framework | coeus_unity/commands.py | await_renderer_visible | def await_renderer_visible(cli, transform_path, is_visible=DEFAULT_RENDERER_VISIBLE, timeout_seconds=DEFAULT_TIMEOUT_SECONDS):
"""
Waits for a transform renderer to become visible based on is_visible.
:param cli:
:param transform_path:
:param is_visible: Whether or not to await for visible state (Tr... | python | def await_renderer_visible(cli, transform_path, is_visible=DEFAULT_RENDERER_VISIBLE, timeout_seconds=DEFAULT_TIMEOUT_SECONDS):
"""
Waits for a transform renderer to become visible based on is_visible.
:param cli:
:param transform_path:
:param is_visible: Whether or not to await for visible state (Tr... | [
"def",
"await_renderer_visible",
"(",
"cli",
",",
"transform_path",
",",
"is_visible",
"=",
"DEFAULT_RENDERER_VISIBLE",
",",
"timeout_seconds",
"=",
"DEFAULT_TIMEOUT_SECONDS",
")",
":",
"message_payload",
"=",
"{",
"\"transform_path\"",
":",
"transform_path",
",",
"\"is... | Waits for a transform renderer to become visible based on is_visible.
:param cli:
:param transform_path:
:param is_visible: Whether or not to await for visible state (True | False)
:param timeout_seconds: How long until this returns with failure
:return: bool | [
"Waits",
"for",
"a",
"transform",
"renderer",
"to",
"become",
"visible",
"based",
"on",
"is_visible",
".",
":",
"param",
"cli",
":",
":",
"param",
"transform_path",
":",
":",
"param",
"is_visible",
":",
"Whether",
"or",
"not",
"to",
"await",
"for",
"visibl... | cf8ca6800ace1425d917ea2628dbd05ed959fdd7 | https://github.com/AgeOfLearning/coeus-unity-python-framework/blob/cf8ca6800ace1425d917ea2628dbd05ed959fdd7/coeus_unity/commands.py#L163-L182 | train | Waits for a transform renderer to become visible based on is_visible. |
AgeOfLearning/coeus-unity-python-framework | coeus_unity/commands.py | query_scene_loaded | def query_scene_loaded(cli, scene_name):
"""
Requests status on whether a scene is loaded or not.
:param cli:
:param scene_name:
:return: bool
"""
message_payload = {
"scene_name": scene_name
}
msg = message.Message("query.unity.scene.loaded", message_payload)
cli.send_m... | python | def query_scene_loaded(cli, scene_name):
"""
Requests status on whether a scene is loaded or not.
:param cli:
:param scene_name:
:return: bool
"""
message_payload = {
"scene_name": scene_name
}
msg = message.Message("query.unity.scene.loaded", message_payload)
cli.send_m... | [
"def",
"query_scene_loaded",
"(",
"cli",
",",
"scene_name",
")",
":",
"message_payload",
"=",
"{",
"\"scene_name\"",
":",
"scene_name",
"}",
"msg",
"=",
"message",
".",
"Message",
"(",
"\"query.unity.scene.loaded\"",
",",
"message_payload",
")",
"cli",
".",
"sen... | Requests status on whether a scene is loaded or not.
:param cli:
:param scene_name:
:return: bool | [
"Requests",
"status",
"on",
"whether",
"a",
"scene",
"is",
"loaded",
"or",
"not",
".",
":",
"param",
"cli",
":",
":",
"param",
"scene_name",
":",
":",
"return",
":",
"bool"
] | cf8ca6800ace1425d917ea2628dbd05ed959fdd7 | https://github.com/AgeOfLearning/coeus-unity-python-framework/blob/cf8ca6800ace1425d917ea2628dbd05ed959fdd7/coeus_unity/commands.py#L185-L201 | train | Queries Unity to see if a scene is loaded or not. |
AgeOfLearning/coeus-unity-python-framework | coeus_unity/commands.py | await_scene_loaded | def await_scene_loaded(cli, scene_name, is_loaded=DEFAULT_SCENE_LOADED, timeout_seconds=DEFAULT_TIMEOUT_SECONDS):
"""
Waits for a scene to be loaded based on is_loaded.
:param cli:
:param scene_name:
:param is_loaded: Whether or not to await for loaded state (True | False)
:param timeout_seconds... | python | def await_scene_loaded(cli, scene_name, is_loaded=DEFAULT_SCENE_LOADED, timeout_seconds=DEFAULT_TIMEOUT_SECONDS):
"""
Waits for a scene to be loaded based on is_loaded.
:param cli:
:param scene_name:
:param is_loaded: Whether or not to await for loaded state (True | False)
:param timeout_seconds... | [
"def",
"await_scene_loaded",
"(",
"cli",
",",
"scene_name",
",",
"is_loaded",
"=",
"DEFAULT_SCENE_LOADED",
",",
"timeout_seconds",
"=",
"DEFAULT_TIMEOUT_SECONDS",
")",
":",
"message_payload",
"=",
"{",
"\"scene_name\"",
":",
"scene_name",
",",
"\"is_loaded\"",
":",
... | Waits for a scene to be loaded based on is_loaded.
:param cli:
:param scene_name:
:param is_loaded: Whether or not to await for loaded state (True | False)
:param timeout_seconds: How long until this returns with failure
:return: bool | [
"Waits",
"for",
"a",
"scene",
"to",
"be",
"loaded",
"based",
"on",
"is_loaded",
".",
":",
"param",
"cli",
":",
":",
"param",
"scene_name",
":",
":",
"param",
"is_loaded",
":",
"Whether",
"or",
"not",
"to",
"await",
"for",
"loaded",
"state",
"(",
"True"... | cf8ca6800ace1425d917ea2628dbd05ed959fdd7 | https://github.com/AgeOfLearning/coeus-unity-python-framework/blob/cf8ca6800ace1425d917ea2628dbd05ed959fdd7/coeus_unity/commands.py#L204-L223 | train | Waits for a scene to be loaded based on is_loaded. |
AgeOfLearning/coeus-unity-python-framework | coeus_unity/commands.py | assign_component_value | def assign_component_value(cli, transform_path, component_type, name, value):
"""
Requests status on whether a scene is loaded or not.
:param cli:
:param transform_path: The path of the transform where the component resides
:param component_type: The C# type name of the component GetComponent(type)
... | python | def assign_component_value(cli, transform_path, component_type, name, value):
"""
Requests status on whether a scene is loaded or not.
:param cli:
:param transform_path: The path of the transform where the component resides
:param component_type: The C# type name of the component GetComponent(type)
... | [
"def",
"assign_component_value",
"(",
"cli",
",",
"transform_path",
",",
"component_type",
",",
"name",
",",
"value",
")",
":",
"message_payload",
"=",
"{",
"\"transform_path\"",
":",
"transform_path",
",",
"\"component_type\"",
":",
"component_type",
",",
"\"name\"... | Requests status on whether a scene is loaded or not.
:param cli:
:param transform_path: The path of the transform where the component resides
:param component_type: The C# type name of the component GetComponent(type)
:param name: The field or property name.
:param value: The value to assign (String... | [
"Requests",
"status",
"on",
"whether",
"a",
"scene",
"is",
"loaded",
"or",
"not",
".",
":",
"param",
"cli",
":",
":",
"param",
"transform_path",
":",
"The",
"path",
"of",
"the",
"transform",
"where",
"the",
"component",
"resides",
":",
"param",
"component_... | cf8ca6800ace1425d917ea2628dbd05ed959fdd7 | https://github.com/AgeOfLearning/coeus-unity-python-framework/blob/cf8ca6800ace1425d917ea2628dbd05ed959fdd7/coeus_unity/commands.py#L226-L247 | train | Assign a value to a component in a NCBI Unity Component |
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | ReadMixin._read | async def _read(self, path, *,
raw=None,
recurse=None,
dc=None,
separator=None,
keys=None,
watch=None,
consistency=None):
"""Returns the specified key
Parameters:
... | python | async def _read(self, path, *,
raw=None,
recurse=None,
dc=None,
separator=None,
keys=None,
watch=None,
consistency=None):
"""Returns the specified key
Parameters:
... | [
"async",
"def",
"_read",
"(",
"self",
",",
"path",
",",
"*",
",",
"raw",
"=",
"None",
",",
"recurse",
"=",
"None",
",",
"dc",
"=",
"None",
",",
"separator",
"=",
"None",
",",
"keys",
"=",
"None",
",",
"watch",
"=",
"None",
",",
"consistency",
"="... | Returns the specified key
Parameters:
dc (str): Specify datacenter that will be used.
Defaults to the agent's local datacenter.
watch (Blocking): Do a blocking query
consistency (Consistency): Force consistency | [
"Returns",
"the",
"specified",
"key"
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L10-L37 | train | Read the specified key in the specified datacenter. |
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | ReadMixin.keys | async def keys(self, prefix, *,
dc=None, separator=None, watch=None, consistency=None):
"""Returns a list of the keys under the given prefix
Parameters:
prefix (str): Prefix to fetch
separator (str): List only up to a given separator
dc (str): Spec... | python | async def keys(self, prefix, *,
dc=None, separator=None, watch=None, consistency=None):
"""Returns a list of the keys under the given prefix
Parameters:
prefix (str): Prefix to fetch
separator (str): List only up to a given separator
dc (str): Spec... | [
"async",
"def",
"keys",
"(",
"self",
",",
"prefix",
",",
"*",
",",
"dc",
"=",
"None",
",",
"separator",
"=",
"None",
",",
"watch",
"=",
"None",
",",
"consistency",
"=",
"None",
")",
":",
"response",
"=",
"await",
"self",
".",
"_read",
"(",
"prefix"... | Returns a list of the keys under the given prefix
Parameters:
prefix (str): Prefix to fetch
separator (str): List only up to a given separator
dc (str): Specify datacenter that will be used.
Defaults to the agent's local datacenter.
watch (B... | [
"Returns",
"a",
"list",
"of",
"the",
"keys",
"under",
"the",
"given",
"prefix"
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L39-L68 | train | Returns a list of the keys under the given prefix |
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | ReadMixin.get | async def get(self, key, *, dc=None, watch=None, consistency=None):
"""Returns the specified key
Parameters:
key (str): Key to fetch
watch (Blocking): Do a blocking query
consistency (Consistency): Force consistency
Returns:
ObjectMeta: where valu... | python | async def get(self, key, *, dc=None, watch=None, consistency=None):
"""Returns the specified key
Parameters:
key (str): Key to fetch
watch (Blocking): Do a blocking query
consistency (Consistency): Force consistency
Returns:
ObjectMeta: where valu... | [
"async",
"def",
"get",
"(",
"self",
",",
"key",
",",
"*",
",",
"dc",
"=",
"None",
",",
"watch",
"=",
"None",
",",
"consistency",
"=",
"None",
")",
":",
"response",
"=",
"await",
"self",
".",
"_read",
"(",
"key",
",",
"dc",
"=",
"dc",
",",
"watc... | Returns the specified key
Parameters:
key (str): Key to fetch
watch (Blocking): Do a blocking query
consistency (Consistency): Force consistency
Returns:
ObjectMeta: where value is the queried kv value
Object will look like::
{
... | [
"Returns",
"the",
"specified",
"key"
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L70-L120 | train | Get the specified key in the KV store. |
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | ReadMixin.raw | async def raw(self, key, *, dc=None, watch=None, consistency=None):
"""Returns the specified key
Parameters:
key (str): Key to fetch
dc (str): Specify datacenter that will be used.
Defaults to the agent's local datacenter.
watch (Blocking): Do a... | python | async def raw(self, key, *, dc=None, watch=None, consistency=None):
"""Returns the specified key
Parameters:
key (str): Key to fetch
dc (str): Specify datacenter that will be used.
Defaults to the agent's local datacenter.
watch (Blocking): Do a... | [
"async",
"def",
"raw",
"(",
"self",
",",
"key",
",",
"*",
",",
"dc",
"=",
"None",
",",
"watch",
"=",
"None",
",",
"consistency",
"=",
"None",
")",
":",
"response",
"=",
"await",
"self",
".",
"_read",
"(",
"key",
",",
"dc",
"=",
"dc",
",",
"raw"... | Returns the specified key
Parameters:
key (str): Key to fetch
dc (str): Specify datacenter that will be used.
Defaults to the agent's local datacenter.
watch (Blocking): Do a blocking query
consistency (Consistency): Force consistency
... | [
"Returns",
"the",
"specified",
"key"
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L122-L139 | train | Returns the raw value of a key in the specified datacenter |
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | ReadMixin.get_tree | async def get_tree(self, prefix, *,
dc=None, separator=None, watch=None, consistency=None):
"""Gets all keys with a prefix of Key during the transaction.
Parameters:
prefix (str): Prefix to fetch
separator (str): List only up to a given separator
... | python | async def get_tree(self, prefix, *,
dc=None, separator=None, watch=None, consistency=None):
"""Gets all keys with a prefix of Key during the transaction.
Parameters:
prefix (str): Prefix to fetch
separator (str): List only up to a given separator
... | [
"async",
"def",
"get_tree",
"(",
"self",
",",
"prefix",
",",
"*",
",",
"dc",
"=",
"None",
",",
"separator",
"=",
"None",
",",
"watch",
"=",
"None",
",",
"consistency",
"=",
"None",
")",
":",
"response",
"=",
"await",
"self",
".",
"_read",
"(",
"pre... | Gets all keys with a prefix of Key during the transaction.
Parameters:
prefix (str): Prefix to fetch
separator (str): List only up to a given separator
dc (str): Specify datacenter that will be used.
Defaults to the agent's local datacenter.
... | [
"Gets",
"all",
"keys",
"with",
"a",
"prefix",
"of",
"Key",
"during",
"the",
"transaction",
"."
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L141-L168 | train | Get all keys with a given prefix of Key during the transaction. |
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | WriteMixin.set | async def set(self, key, value, *, flags=None):
"""Sets the key to the given value.
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
flags (int): Flags to set with value
Returns:
bool: ``True`` on succes... | python | async def set(self, key, value, *, flags=None):
"""Sets the key to the given value.
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
flags (int): Flags to set with value
Returns:
bool: ``True`` on succes... | [
"async",
"def",
"set",
"(",
"self",
",",
"key",
",",
"value",
",",
"*",
",",
"flags",
"=",
"None",
")",
":",
"value",
"=",
"encode_value",
"(",
"value",
",",
"flags",
")",
"response",
"=",
"await",
"self",
".",
"_write",
"(",
"key",
",",
"value",
... | Sets the key to the given value.
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
flags (int): Flags to set with value
Returns:
bool: ``True`` on success | [
"Sets",
"the",
"key",
"to",
"the",
"given",
"value",
"."
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L173-L185 | train | Sets the key to the given value. |
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | WriteMixin.cas | async def cas(self, key, value, *, flags=None, index):
"""Sets the key to the given value with check-and-set semantics.
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
index (ObjectIndex): Index ID
flags (int):... | python | async def cas(self, key, value, *, flags=None, index):
"""Sets the key to the given value with check-and-set semantics.
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
index (ObjectIndex): Index ID
flags (int):... | [
"async",
"def",
"cas",
"(",
"self",
",",
"key",
",",
"value",
",",
"*",
",",
"flags",
"=",
"None",
",",
"index",
")",
":",
"value",
"=",
"encode_value",
"(",
"value",
",",
"flags",
")",
"index",
"=",
"extract_attr",
"(",
"index",
",",
"keys",
"=",
... | Sets the key to the given value with check-and-set semantics.
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
index (ObjectIndex): Index ID
flags (int): Flags to set with value
Response:
bool: ``Tru... | [
"Sets",
"the",
"key",
"to",
"the",
"given",
"value",
"with",
"check",
"-",
"and",
"-",
"set",
"semantics",
"."
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L187-L208 | train | Sets the key to the given value with check - and - set semantics. |
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | WriteMixin.lock | async def lock(self, key, value, *, flags=None, session):
"""Locks the Key with the given Session.
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
session (ObjectID): Session ID
flags (int): Flags to set with v... | python | async def lock(self, key, value, *, flags=None, session):
"""Locks the Key with the given Session.
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
session (ObjectID): Session ID
flags (int): Flags to set with v... | [
"async",
"def",
"lock",
"(",
"self",
",",
"key",
",",
"value",
",",
"*",
",",
"flags",
"=",
"None",
",",
"session",
")",
":",
"value",
"=",
"encode_value",
"(",
"value",
",",
"flags",
")",
"session_id",
"=",
"extract_attr",
"(",
"session",
",",
"keys... | Locks the Key with the given Session.
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
session (ObjectID): Session ID
flags (int): Flags to set with value
Response:
bool: ``True`` on success
... | [
"Locks",
"the",
"Key",
"with",
"the",
"given",
"Session",
"."
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L210-L229 | train | Locks the Key with the given Session. |
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | WriteMixin.unlock | async def unlock(self, key, value, *, flags=None, session):
"""Unlocks the Key with the given Session.
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
session (ObjectID): Session ID
flags (int): Flags to set wi... | python | async def unlock(self, key, value, *, flags=None, session):
"""Unlocks the Key with the given Session.
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
session (ObjectID): Session ID
flags (int): Flags to set wi... | [
"async",
"def",
"unlock",
"(",
"self",
",",
"key",
",",
"value",
",",
"*",
",",
"flags",
"=",
"None",
",",
"session",
")",
":",
"value",
"=",
"encode_value",
"(",
"value",
",",
"flags",
")",
"session_id",
"=",
"extract_attr",
"(",
"session",
",",
"ke... | Unlocks the Key with the given Session.
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
session (ObjectID): Session ID
flags (int): Flags to set with value
Response:
bool: ``True`` on success
... | [
"Unlocks",
"the",
"Key",
"with",
"the",
"given",
"Session",
"."
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L231-L250 | train | Unlocks the Key with the given Session. |
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | WriteMixin._write | async def _write(self, path, data, *,
flags=None, cas=None, acquire=None, release=None):
"""Sets the key to the given value.
Returns:
bool: ``True`` on success
"""
if not isinstance(data, bytes):
raise ValueError("value must be bytes")
... | python | async def _write(self, path, data, *,
flags=None, cas=None, acquire=None, release=None):
"""Sets the key to the given value.
Returns:
bool: ``True`` on success
"""
if not isinstance(data, bytes):
raise ValueError("value must be bytes")
... | [
"async",
"def",
"_write",
"(",
"self",
",",
"path",
",",
"data",
",",
"*",
",",
"flags",
"=",
"None",
",",
"cas",
"=",
"None",
",",
"acquire",
"=",
"None",
",",
"release",
"=",
"None",
")",
":",
"if",
"not",
"isinstance",
"(",
"data",
",",
"bytes... | Sets the key to the given value.
Returns:
bool: ``True`` on success | [
"Sets",
"the",
"key",
"to",
"the",
"given",
"value",
"."
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L252-L272 | train | Write the key to the given value. |
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | DeleteMixin.delete | async def delete(self, key):
"""Deletes the Key
Parameters:
key (str): Key to delete
Response:
bool: ``True`` on success
"""
response = await self._discard(key)
return response.body is True | python | async def delete(self, key):
"""Deletes the Key
Parameters:
key (str): Key to delete
Response:
bool: ``True`` on success
"""
response = await self._discard(key)
return response.body is True | [
"async",
"def",
"delete",
"(",
"self",
",",
"key",
")",
":",
"response",
"=",
"await",
"self",
".",
"_discard",
"(",
"key",
")",
"return",
"response",
".",
"body",
"is",
"True"
] | Deletes the Key
Parameters:
key (str): Key to delete
Response:
bool: ``True`` on success | [
"Deletes",
"the",
"Key"
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L277-L286 | train | Deletes the Key
from the cache. |
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | DeleteMixin.delete_tree | async def delete_tree(self, prefix, *, separator=None):
"""Deletes all keys with a prefix of Key.
Parameters:
key (str): Key to delete
separator (str): Delete only up to a given separator
Response:
bool: ``True`` on success
"""
response = awai... | python | async def delete_tree(self, prefix, *, separator=None):
"""Deletes all keys with a prefix of Key.
Parameters:
key (str): Key to delete
separator (str): Delete only up to a given separator
Response:
bool: ``True`` on success
"""
response = awai... | [
"async",
"def",
"delete_tree",
"(",
"self",
",",
"prefix",
",",
"*",
",",
"separator",
"=",
"None",
")",
":",
"response",
"=",
"await",
"self",
".",
"_discard",
"(",
"prefix",
",",
"recurse",
"=",
"True",
",",
"separator",
"=",
"separator",
")",
"retur... | Deletes all keys with a prefix of Key.
Parameters:
key (str): Key to delete
separator (str): Delete only up to a given separator
Response:
bool: ``True`` on success | [
"Deletes",
"all",
"keys",
"with",
"a",
"prefix",
"of",
"Key",
"."
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L288-L300 | train | Delete all keys with a given prefix of Key. |
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | DeleteMixin.delete_cas | async def delete_cas(self, key, *, index):
"""Deletes the Key with check-and-set semantics.
Parameters:
key (str): Key to delete
index (ObjectIndex): Index ID
Response:
bool: ``True`` on success
The Key will only be deleted if its current modify inde... | python | async def delete_cas(self, key, *, index):
"""Deletes the Key with check-and-set semantics.
Parameters:
key (str): Key to delete
index (ObjectIndex): Index ID
Response:
bool: ``True`` on success
The Key will only be deleted if its current modify inde... | [
"async",
"def",
"delete_cas",
"(",
"self",
",",
"key",
",",
"*",
",",
"index",
")",
":",
"index",
"=",
"extract_attr",
"(",
"index",
",",
"keys",
"=",
"[",
"\"ModifyIndex\"",
",",
"\"Index\"",
"]",
")",
"response",
"=",
"await",
"self",
".",
"_discard"... | Deletes the Key with check-and-set semantics.
Parameters:
key (str): Key to delete
index (ObjectIndex): Index ID
Response:
bool: ``True`` on success
The Key will only be deleted if its current modify index matches the
supplied Index. | [
"Deletes",
"the",
"Key",
"with",
"check",
"-",
"and",
"-",
"set",
"semantics",
"."
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L302-L316 | train | Deletes the Key with check - and - set semantics. |
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | DeleteMixin._discard | async def _discard(self, path, *, recurse=None, separator=None, cas=None):
"""Deletes the Key
"""
path = "/v1/kv/%s" % path
response = await self._api.delete(path, params={
"cas": cas,
"recurse": recurse,
"separator": separator
})
retur... | python | async def _discard(self, path, *, recurse=None, separator=None, cas=None):
"""Deletes the Key
"""
path = "/v1/kv/%s" % path
response = await self._api.delete(path, params={
"cas": cas,
"recurse": recurse,
"separator": separator
})
retur... | [
"async",
"def",
"_discard",
"(",
"self",
",",
"path",
",",
"*",
",",
"recurse",
"=",
"None",
",",
"separator",
"=",
"None",
",",
"cas",
"=",
"None",
")",
":",
"path",
"=",
"\"/v1/kv/%s\"",
"%",
"path",
"response",
"=",
"await",
"self",
".",
"_api",
... | Deletes the Key | [
"Deletes",
"the",
"Key"
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L318-L327 | train | Deletes the Key
|
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | KVOperations.set | def set(self, key, value, *, flags=None):
"""Sets the Key to the given Value
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
flags (int): Flags to set with value
"""
self.append({
"Verb": "set",... | python | def set(self, key, value, *, flags=None):
"""Sets the Key to the given Value
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
flags (int): Flags to set with value
"""
self.append({
"Verb": "set",... | [
"def",
"set",
"(",
"self",
",",
"key",
",",
"value",
",",
"*",
",",
"flags",
"=",
"None",
")",
":",
"self",
".",
"append",
"(",
"{",
"\"Verb\"",
":",
"\"set\"",
",",
"\"Key\"",
":",
"key",
",",
"\"Value\"",
":",
"encode_value",
"(",
"value",
",",
... | Sets the Key to the given Value
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
flags (int): Flags to set with value | [
"Sets",
"the",
"Key",
"to",
"the",
"given",
"Value"
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L356-L370 | train | Sets the Key to the given Value
|
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | KVOperations.cas | def cas(self, key, value, *, flags=None, index):
"""Sets the Key to the given Value with check-and-set semantics
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
index (ObjectIndex): Index ID
flags (int): Flags ... | python | def cas(self, key, value, *, flags=None, index):
"""Sets the Key to the given Value with check-and-set semantics
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
index (ObjectIndex): Index ID
flags (int): Flags ... | [
"def",
"cas",
"(",
"self",
",",
"key",
",",
"value",
",",
"*",
",",
"flags",
"=",
"None",
",",
"index",
")",
":",
"self",
".",
"append",
"(",
"{",
"\"Verb\"",
":",
"\"cas\"",
",",
"\"Key\"",
":",
"key",
",",
"\"Value\"",
":",
"encode_value",
"(",
... | Sets the Key to the given Value with check-and-set semantics
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
index (ObjectIndex): Index ID
flags (int): Flags to set with value
The Key will only be set if its c... | [
"Sets",
"the",
"Key",
"to",
"the",
"given",
"Value",
"with",
"check",
"-",
"and",
"-",
"set",
"semantics"
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L372-L391 | train | Sets the Key to the given Value with check - and - set semantics. |
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | KVOperations.lock | def lock(self, key, value, *, flags=None, session):
"""Locks the Key with the given Session
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
session (ObjectID): Session ID
The Key will only be set if its current mo... | python | def lock(self, key, value, *, flags=None, session):
"""Locks the Key with the given Session
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
session (ObjectID): Session ID
The Key will only be set if its current mo... | [
"def",
"lock",
"(",
"self",
",",
"key",
",",
"value",
",",
"*",
",",
"flags",
"=",
"None",
",",
"session",
")",
":",
"self",
".",
"append",
"(",
"{",
"\"Verb\"",
":",
"\"lock\"",
",",
"\"Key\"",
":",
"key",
",",
"\"Value\"",
":",
"encode_value",
"(... | Locks the Key with the given Session
Parameters:
key (str): Key to set
value (Payload): Value to set, It will be encoded by flags
session (ObjectID): Session ID
The Key will only be set if its current modify index matches the
supplied Index | [
"Locks",
"the",
"Key",
"with",
"the",
"given",
"Session"
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L393-L411 | train | Locks the Key with the given Session
|
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | KVOperations.check_index | def check_index(self, key, *, index):
"""Fails the transaction if Key does not have a modify index equal to
Index
Parameters:
key (str): Key to check
index (ObjectIndex): Index ID
"""
self.append({
"Verb": "check-index",
"Key": key... | python | def check_index(self, key, *, index):
"""Fails the transaction if Key does not have a modify index equal to
Index
Parameters:
key (str): Key to check
index (ObjectIndex): Index ID
"""
self.append({
"Verb": "check-index",
"Key": key... | [
"def",
"check_index",
"(",
"self",
",",
"key",
",",
"*",
",",
"index",
")",
":",
"self",
".",
"append",
"(",
"{",
"\"Verb\"",
":",
"\"check-index\"",
",",
"\"Key\"",
":",
"key",
",",
"\"Index\"",
":",
"extract_attr",
"(",
"index",
",",
"keys",
"=",
"... | Fails the transaction if Key does not have a modify index equal to
Index
Parameters:
key (str): Key to check
index (ObjectIndex): Index ID | [
"Fails",
"the",
"transaction",
"if",
"Key",
"does",
"not",
"have",
"a",
"modify",
"index",
"equal",
"to",
"Index"
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L471-L484 | train | Fails the transaction if the Key does not have a modify index equal to the index. |
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | KVOperations.check_session | def check_session(self, key, *, session=None):
"""Fails the transaction if Key is not currently locked by Session
Parameters:
key (str): Key to check
session (ObjectID): Session ID
"""
self.append({
"Verb": "check-session",
"Key": key,
... | python | def check_session(self, key, *, session=None):
"""Fails the transaction if Key is not currently locked by Session
Parameters:
key (str): Key to check
session (ObjectID): Session ID
"""
self.append({
"Verb": "check-session",
"Key": key,
... | [
"def",
"check_session",
"(",
"self",
",",
"key",
",",
"*",
",",
"session",
"=",
"None",
")",
":",
"self",
".",
"append",
"(",
"{",
"\"Verb\"",
":",
"\"check-session\"",
",",
"\"Key\"",
":",
"key",
",",
"\"Session\"",
":",
"extract_attr",
"(",
"session",
... | Fails the transaction if Key is not currently locked by Session
Parameters:
key (str): Key to check
session (ObjectID): Session ID | [
"Fails",
"the",
"transaction",
"if",
"Key",
"is",
"not",
"currently",
"locked",
"by",
"Session"
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L486-L498 | train | Fails the transaction if Key is not currently locked by Session
|
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | KVOperations.delete_cas | def delete_cas(self, key, *, index):
"""Deletes the Key with check-and-set semantics.
Parameters:
key (str): Key to delete
index (ObjectIndex): Index ID
The Key will only be deleted if its current modify index matches
the supplied Index
"""
self.... | python | def delete_cas(self, key, *, index):
"""Deletes the Key with check-and-set semantics.
Parameters:
key (str): Key to delete
index (ObjectIndex): Index ID
The Key will only be deleted if its current modify index matches
the supplied Index
"""
self.... | [
"def",
"delete_cas",
"(",
"self",
",",
"key",
",",
"*",
",",
"index",
")",
":",
"self",
".",
"append",
"(",
"{",
"\"Verb\"",
":",
"\"delete-cas\"",
",",
"\"Key\"",
":",
"key",
",",
"\"Index\"",
":",
"extract_attr",
"(",
"index",
",",
"keys",
"=",
"["... | Deletes the Key with check-and-set semantics.
Parameters:
key (str): Key to delete
index (ObjectIndex): Index ID
The Key will only be deleted if its current modify index matches
the supplied Index | [
"Deletes",
"the",
"Key",
"with",
"check",
"-",
"and",
"-",
"set",
"semantics",
"."
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L525-L540 | train | Deletes the Key with check - and - set semantics. |
johnnoone/aioconsul | aioconsul/client/kv_endpoint.py | KVOperations.execute | async def execute(self, dc=None, token=None):
"""Execute stored operations
Parameters:
dc (str): Specify datacenter that will be used.
Defaults to the agent's local datacenter.
token (ObjectID): Token ID
Returns:
Collection: Results of o... | python | async def execute(self, dc=None, token=None):
"""Execute stored operations
Parameters:
dc (str): Specify datacenter that will be used.
Defaults to the agent's local datacenter.
token (ObjectID): Token ID
Returns:
Collection: Results of o... | [
"async",
"def",
"execute",
"(",
"self",
",",
"dc",
"=",
"None",
",",
"token",
"=",
"None",
")",
":",
"token_id",
"=",
"extract_attr",
"(",
"token",
",",
"keys",
"=",
"[",
"\"ID\"",
"]",
")",
"try",
":",
"response",
"=",
"await",
"self",
".",
"_api"... | Execute stored operations
Parameters:
dc (str): Specify datacenter that will be used.
Defaults to the agent's local datacenter.
token (ObjectID): Token ID
Returns:
Collection: Results of operations.
Raises:
TransactionError: ... | [
"Execute",
"stored",
"operations"
] | 02f7a529d7dc2e49bed942111067aa5faf320e90 | https://github.com/johnnoone/aioconsul/blob/02f7a529d7dc2e49bed942111067aa5faf320e90/aioconsul/client/kv_endpoint.py#L542-L579 | train | Execute stored operations on the local datacenter. |
tueda/python-form | form/formlink.py | FormLink.open | def open(self, args=None, keep_log=False):
# type: (Optional[Union[str, Sequence[str]]], Union[bool, int]) -> None
"""Open a connection to FORM.
Open a connection to a new FORM process. The opened connection should
be closed by :meth:`close`, which can be guaranteed by use of the
... | python | def open(self, args=None, keep_log=False):
# type: (Optional[Union[str, Sequence[str]]], Union[bool, int]) -> None
"""Open a connection to FORM.
Open a connection to a new FORM process. The opened connection should
be closed by :meth:`close`, which can be guaranteed by use of the
... | [
"def",
"open",
"(",
"self",
",",
"args",
"=",
"None",
",",
"keep_log",
"=",
"False",
")",
":",
"# type: (Optional[Union[str, Sequence[str]]], Union[bool, int]) -> None",
"if",
"args",
"is",
"None",
":",
"if",
"'FORM'",
"in",
"os",
".",
"environ",
":",
"args",
... | Open a connection to FORM.
Open a connection to a new FORM process. The opened connection should
be closed by :meth:`close`, which can be guaranteed by use of the
"with" statement:
>>> import form
>>> with form.open() as formlink:
... pass # use formlink ...
... | [
"Open",
"a",
"connection",
"to",
"FORM",
"."
] | 1e5a8464f7a7a6cbbb32411fc2ea3615fd48334b | https://github.com/tueda/python-form/blob/1e5a8464f7a7a6cbbb32411fc2ea3615fd48334b/form/formlink.py#L71-L214 | train | Open a connection to the FORM process and return a new object. |
tueda/python-form | form/formlink.py | FormLink.write | def write(self, script):
# type: (str) -> None
"""Send a script to FORM.
Write the given script to the communication channel to FORM. It could
be buffered and so FORM may not execute the sent script until
:meth:`flush` or :meth:`read` is called.
"""
if self._clos... | python | def write(self, script):
# type: (str) -> None
"""Send a script to FORM.
Write the given script to the communication channel to FORM. It could
be buffered and so FORM may not execute the sent script until
:meth:`flush` or :meth:`read` is called.
"""
if self._clos... | [
"def",
"write",
"(",
"self",
",",
"script",
")",
":",
"# type: (str) -> None",
"if",
"self",
".",
"_closed",
":",
"raise",
"IOError",
"(",
"'tried to write to closed connection'",
")",
"script",
"=",
"script",
".",
"strip",
"(",
")",
"if",
"script",
":",
"as... | Send a script to FORM.
Write the given script to the communication channel to FORM. It could
be buffered and so FORM may not execute the sent script until
:meth:`flush` or :meth:`read` is called. | [
"Send",
"a",
"script",
"to",
"FORM",
"."
] | 1e5a8464f7a7a6cbbb32411fc2ea3615fd48334b | https://github.com/tueda/python-form/blob/1e5a8464f7a7a6cbbb32411fc2ea3615fd48334b/form/formlink.py#L310-L324 | train | Send a script to FORM. |
tueda/python-form | form/formlink.py | FormLink.flush | def flush(self):
# type: () -> None
"""Flush the channel to FORM.
Flush the communication channel to FORM. Because :meth:`write` is
buffered and :meth:`read` is a blocking operation, this method is used
for asynchronous execution of FORM scripts.
"""
if self._clo... | python | def flush(self):
# type: () -> None
"""Flush the channel to FORM.
Flush the communication channel to FORM. Because :meth:`write` is
buffered and :meth:`read` is a blocking operation, this method is used
for asynchronous execution of FORM scripts.
"""
if self._clo... | [
"def",
"flush",
"(",
"self",
")",
":",
"# type: () -> None",
"if",
"self",
".",
"_closed",
":",
"raise",
"IOError",
"(",
"'tried to flush closed connection'",
")",
"assert",
"self",
".",
"_parentout",
"is",
"not",
"None",
"self",
".",
"_parentout",
".",
"flush... | Flush the channel to FORM.
Flush the communication channel to FORM. Because :meth:`write` is
buffered and :meth:`read` is a blocking operation, this method is used
for asynchronous execution of FORM scripts. | [
"Flush",
"the",
"channel",
"to",
"FORM",
"."
] | 1e5a8464f7a7a6cbbb32411fc2ea3615fd48334b | https://github.com/tueda/python-form/blob/1e5a8464f7a7a6cbbb32411fc2ea3615fd48334b/form/formlink.py#L326-L337 | train | Flush the channel to FORM. |
tueda/python-form | form/formlink.py | FormLink.read | def read(self, *names): # type: ignore # noqa: F811
# type: (Any) -> Any
r"""Read results from FORM.
Wait for a response of FORM to obtain the results specified by
the given names and return a corresponding string or (nested) list of
strings. Objects to be read from FORM are e... | python | def read(self, *names): # type: ignore # noqa: F811
# type: (Any) -> Any
r"""Read results from FORM.
Wait for a response of FORM to obtain the results specified by
the given names and return a corresponding string or (nested) list of
strings. Objects to be read from FORM are e... | [
"def",
"read",
"(",
"self",
",",
"*",
"names",
")",
":",
"# type: ignore # noqa: F811",
"# type: (Any) -> Any",
"if",
"self",
".",
"_closed",
":",
"raise",
"IOError",
"(",
"'tried to read from closed connection'",
")",
"if",
"len",
"(",
"names",
")",
"==",
"1",... | r"""Read results from FORM.
Wait for a response of FORM to obtain the results specified by
the given names and return a corresponding string or (nested) list of
strings. Objects to be read from FORM are expressions, $-variables and
preprocessor variables.
========== ===========... | [
"r",
"Read",
"results",
"from",
"FORM",
"."
] | 1e5a8464f7a7a6cbbb32411fc2ea3615fd48334b | https://github.com/tueda/python-form/blob/1e5a8464f7a7a6cbbb32411fc2ea3615fd48334b/form/formlink.py#L399-L551 | train | Read the names of the objects in names and return a corresponding string or nested list of strings. |
tueda/python-form | form/formlink.py | FormLink._dateversion | def _dateversion(self):
# type: () -> int
"""Return the build/revision date as an integer "yyyymmdd"."""
import re
if self._head:
ma = re.search(r'(?<=\()(.*)(?=\))', self._head)
if ma:
s = re.split(r'[, ]+', ma.group(0))
if len(s) ... | python | def _dateversion(self):
# type: () -> int
"""Return the build/revision date as an integer "yyyymmdd"."""
import re
if self._head:
ma = re.search(r'(?<=\()(.*)(?=\))', self._head)
if ma:
s = re.split(r'[, ]+', ma.group(0))
if len(s) ... | [
"def",
"_dateversion",
"(",
"self",
")",
":",
"# type: () -> int",
"import",
"re",
"if",
"self",
".",
"_head",
":",
"ma",
"=",
"re",
".",
"search",
"(",
"r'(?<=\\()(.*)(?=\\))'",
",",
"self",
".",
"_head",
")",
"if",
"ma",
":",
"s",
"=",
"re",
".",
"... | Return the build/revision date as an integer "yyyymmdd". | [
"Return",
"the",
"build",
"/",
"revision",
"date",
"as",
"an",
"integer",
"yyyymmdd",
"."
] | 1e5a8464f7a7a6cbbb32411fc2ea3615fd48334b | https://github.com/tueda/python-form/blob/1e5a8464f7a7a6cbbb32411fc2ea3615fd48334b/form/formlink.py#L567-L592 | train | Return the build / revision date as an integer yyyymmdd. |
whiteclover/dbpy | db/query/delete.py | DeleteQuery.compile | def compile(self):
"""Compiles the delete sql statement"""
sql = ''
sql += 'DELETE FROM ' + self.dialect.quote_table(self._table)
if self._where:
sql += ' WHERE ' + self.compile_condition(self._where)
if self._order_by:
sql += ' ' + self.compile_order_by(s... | python | def compile(self):
"""Compiles the delete sql statement"""
sql = ''
sql += 'DELETE FROM ' + self.dialect.quote_table(self._table)
if self._where:
sql += ' WHERE ' + self.compile_condition(self._where)
if self._order_by:
sql += ' ' + self.compile_order_by(s... | [
"def",
"compile",
"(",
"self",
")",
":",
"sql",
"=",
"''",
"sql",
"+=",
"'DELETE FROM '",
"+",
"self",
".",
"dialect",
".",
"quote_table",
"(",
"self",
".",
"_table",
")",
"if",
"self",
".",
"_where",
":",
"sql",
"+=",
"' WHERE '",
"+",
"self",
".",
... | Compiles the delete sql statement | [
"Compiles",
"the",
"delete",
"sql",
"statement"
] | 3d9ce85f55cfb39cced22081e525f79581b26b3a | https://github.com/whiteclover/dbpy/blob/3d9ce85f55cfb39cced22081e525f79581b26b3a/db/query/delete.py#L40-L51 | train | Compiles the delete sql statement |
whiteclover/dbpy | db/query/delete.py | DeleteQuery.clear | def clear(self):
"""Clear and reset to orignal state"""
WhereQuery.clear(self)
self._table = None
self._parameters = []
self._sql = None | python | def clear(self):
"""Clear and reset to orignal state"""
WhereQuery.clear(self)
self._table = None
self._parameters = []
self._sql = None | [
"def",
"clear",
"(",
"self",
")",
":",
"WhereQuery",
".",
"clear",
"(",
"self",
")",
"self",
".",
"_table",
"=",
"None",
"self",
".",
"_parameters",
"=",
"[",
"]",
"self",
".",
"_sql",
"=",
"None"
] | Clear and reset to orignal state | [
"Clear",
"and",
"reset",
"to",
"orignal",
"state"
] | 3d9ce85f55cfb39cced22081e525f79581b26b3a | https://github.com/whiteclover/dbpy/blob/3d9ce85f55cfb39cced22081e525f79581b26b3a/db/query/delete.py#L53-L58 | train | Clear and reset the state of the table and parameters |
talkincode/txradius | txradius/mschap/mschap.py | challenge_hash | def challenge_hash(peer_challenge, authenticator_challenge, username):
"""ChallengeHash"""
sha_hash = hashlib.sha1()
sha_hash.update(peer_challenge)
sha_hash.update(authenticator_challenge)
sha_hash.update(username)
return sha_hash.digest()[:8] | python | def challenge_hash(peer_challenge, authenticator_challenge, username):
"""ChallengeHash"""
sha_hash = hashlib.sha1()
sha_hash.update(peer_challenge)
sha_hash.update(authenticator_challenge)
sha_hash.update(username)
return sha_hash.digest()[:8] | [
"def",
"challenge_hash",
"(",
"peer_challenge",
",",
"authenticator_challenge",
",",
"username",
")",
":",
"sha_hash",
"=",
"hashlib",
".",
"sha1",
"(",
")",
"sha_hash",
".",
"update",
"(",
"peer_challenge",
")",
"sha_hash",
".",
"update",
"(",
"authenticator_ch... | ChallengeHash | [
"ChallengeHash"
] | b86fdbc9be41183680b82b07d3a8e8ea10926e01 | https://github.com/talkincode/txradius/blob/b86fdbc9be41183680b82b07d3a8e8ea10926e01/txradius/mschap/mschap.py#L11-L17 | train | Return the challenge hash for a given peer challenge and authenticator challenge and username. |
talkincode/txradius | txradius/mschap/mschap.py | nt_password_hash | def nt_password_hash(passwd):
"""NtPasswordHash"""
pw = utils.str2unicode(passwd)
md4_context = md4.new()
md4_context.update(pw)
return md4_context.digest() | python | def nt_password_hash(passwd):
"""NtPasswordHash"""
pw = utils.str2unicode(passwd)
md4_context = md4.new()
md4_context.update(pw)
return md4_context.digest() | [
"def",
"nt_password_hash",
"(",
"passwd",
")",
":",
"pw",
"=",
"utils",
".",
"str2unicode",
"(",
"passwd",
")",
"md4_context",
"=",
"md4",
".",
"new",
"(",
")",
"md4_context",
".",
"update",
"(",
"pw",
")",
"return",
"md4_context",
".",
"digest",
"(",
... | NtPasswordHash | [
"NtPasswordHash"
] | b86fdbc9be41183680b82b07d3a8e8ea10926e01 | https://github.com/talkincode/txradius/blob/b86fdbc9be41183680b82b07d3a8e8ea10926e01/txradius/mschap/mschap.py#L20-L25 | train | NtPasswordHash function |
talkincode/txradius | txradius/mschap/mschap.py | hash_nt_password_hash | def hash_nt_password_hash(password_hash):
"""HashNtPasswordHash"""
md4_context = md4.new()
md4_context.update(password_hash)
return md4_context.digest() | python | def hash_nt_password_hash(password_hash):
"""HashNtPasswordHash"""
md4_context = md4.new()
md4_context.update(password_hash)
return md4_context.digest() | [
"def",
"hash_nt_password_hash",
"(",
"password_hash",
")",
":",
"md4_context",
"=",
"md4",
".",
"new",
"(",
")",
"md4_context",
".",
"update",
"(",
"password_hash",
")",
"return",
"md4_context",
".",
"digest",
"(",
")"
] | HashNtPasswordHash | [
"HashNtPasswordHash"
] | b86fdbc9be41183680b82b07d3a8e8ea10926e01 | https://github.com/talkincode/txradius/blob/b86fdbc9be41183680b82b07d3a8e8ea10926e01/txradius/mschap/mschap.py#L28-L32 | train | Hash NtPasswordHash |
talkincode/txradius | txradius/mschap/mschap.py | generate_nt_response_mschap2 | def generate_nt_response_mschap2(authenticator_challenge, peer_challenge, username, password):
"""GenerateNTResponse"""
challenge = challenge_hash(peer_challenge, authenticator_challenge, username)
password_hash = nt_password_hash(password)
return challenge_response(challenge, password_hash) | python | def generate_nt_response_mschap2(authenticator_challenge, peer_challenge, username, password):
"""GenerateNTResponse"""
challenge = challenge_hash(peer_challenge, authenticator_challenge, username)
password_hash = nt_password_hash(password)
return challenge_response(challenge, password_hash) | [
"def",
"generate_nt_response_mschap2",
"(",
"authenticator_challenge",
",",
"peer_challenge",
",",
"username",
",",
"password",
")",
":",
"challenge",
"=",
"challenge_hash",
"(",
"peer_challenge",
",",
"authenticator_challenge",
",",
"username",
")",
"password_hash",
"=... | GenerateNTResponse | [
"GenerateNTResponse"
] | b86fdbc9be41183680b82b07d3a8e8ea10926e01 | https://github.com/talkincode/txradius/blob/b86fdbc9be41183680b82b07d3a8e8ea10926e01/txradius/mschap/mschap.py#L40-L44 | train | GenerateNTResponse is a generator function that generates a NT response for the given authenticator_challenge username and password. |
talkincode/txradius | txradius/mschap/mschap.py | challenge_response | def challenge_response(challenge, password_hash):
"""ChallengeResponse"""
zpassword_hash = password_hash.ljust(21, '\0')
response = ""
des_obj = des.DES(zpassword_hash[0:7])
response += des_obj.encrypt(challenge)
des_obj = des.DES(zpassword_hash[7:14])
response += des_obj.encrypt(challenge... | python | def challenge_response(challenge, password_hash):
"""ChallengeResponse"""
zpassword_hash = password_hash.ljust(21, '\0')
response = ""
des_obj = des.DES(zpassword_hash[0:7])
response += des_obj.encrypt(challenge)
des_obj = des.DES(zpassword_hash[7:14])
response += des_obj.encrypt(challenge... | [
"def",
"challenge_response",
"(",
"challenge",
",",
"password_hash",
")",
":",
"zpassword_hash",
"=",
"password_hash",
".",
"ljust",
"(",
"21",
",",
"'\\0'",
")",
"response",
"=",
"\"\"",
"des_obj",
"=",
"des",
".",
"DES",
"(",
"zpassword_hash",
"[",
"0",
... | ChallengeResponse | [
"ChallengeResponse"
] | b86fdbc9be41183680b82b07d3a8e8ea10926e01 | https://github.com/talkincode/txradius/blob/b86fdbc9be41183680b82b07d3a8e8ea10926e01/txradius/mschap/mschap.py#L48-L61 | train | Return the challenge response for the given challenge and password hash. |
talkincode/txradius | txradius/mschap/mschap.py | generate_authenticator_response | def generate_authenticator_response(password, nt_response, peer_challenge, authenticator_challenge, username):
"""GenerateAuthenticatorResponse"""
Magic1 = "\x4D\x61\x67\x69\x63\x20\x73\x65\x72\x76\x65\x72\x20\x74\x6F\x20\x63\x6C\x69\x65\x6E\x74\x20\x73\x69\x67\x6E\x69\x6E\x67\x20\x63\x6F\x6E\x73\x74\x61\x6E\x7... | python | def generate_authenticator_response(password, nt_response, peer_challenge, authenticator_challenge, username):
"""GenerateAuthenticatorResponse"""
Magic1 = "\x4D\x61\x67\x69\x63\x20\x73\x65\x72\x76\x65\x72\x20\x74\x6F\x20\x63\x6C\x69\x65\x6E\x74\x20\x73\x69\x67\x6E\x69\x6E\x67\x20\x63\x6F\x6E\x73\x74\x61\x6E\x7... | [
"def",
"generate_authenticator_response",
"(",
"password",
",",
"nt_response",
",",
"peer_challenge",
",",
"authenticator_challenge",
",",
"username",
")",
":",
"Magic1",
"=",
"\"\\x4D\\x61\\x67\\x69\\x63\\x20\\x73\\x65\\x72\\x76\\x65\\x72\\x20\\x74\\x6F\\x20\\x63\\x6C\\x69\\x65\\x6E... | GenerateAuthenticatorResponse | [
"GenerateAuthenticatorResponse"
] | b86fdbc9be41183680b82b07d3a8e8ea10926e01 | https://github.com/talkincode/txradius/blob/b86fdbc9be41183680b82b07d3a8e8ea10926e01/txradius/mschap/mschap.py#L64-L85 | train | Generate authenticator response. |
talkincode/txradius | txradius/mschap/mschap.py | check_authenticator_response | def check_authenticator_response(password, nt_response, peer_challenge, authenticator_challenge, user_name, received_response):
"""CheckAuthenticatorResponse"""
my_resppnse = generate_authenticator_response(password, nt_response, peer_challenge, authenticator_challenge, user_name)
return my_resppnse == rec... | python | def check_authenticator_response(password, nt_response, peer_challenge, authenticator_challenge, user_name, received_response):
"""CheckAuthenticatorResponse"""
my_resppnse = generate_authenticator_response(password, nt_response, peer_challenge, authenticator_challenge, user_name)
return my_resppnse == rec... | [
"def",
"check_authenticator_response",
"(",
"password",
",",
"nt_response",
",",
"peer_challenge",
",",
"authenticator_challenge",
",",
"user_name",
",",
"received_response",
")",
":",
"my_resppnse",
"=",
"generate_authenticator_response",
"(",
"password",
",",
"nt_respon... | CheckAuthenticatorResponse | [
"CheckAuthenticatorResponse"
] | b86fdbc9be41183680b82b07d3a8e8ea10926e01 | https://github.com/talkincode/txradius/blob/b86fdbc9be41183680b82b07d3a8e8ea10926e01/txradius/mschap/mschap.py#L88-L92 | train | Check if authenticator response is correct. |
bitesofcode/projexui | projexui/widgets/xcolortreewidget.py | XColorTreeWidgetItem.setName | def setName( self, name ):
"""
Sets the name for this color item to the inputed name.
:param name | <str>
"""
self._name = projex.text.nativestring(name)
self.setText(0, ' '.join(projex.text.words(self._name))) | python | def setName( self, name ):
"""
Sets the name for this color item to the inputed name.
:param name | <str>
"""
self._name = projex.text.nativestring(name)
self.setText(0, ' '.join(projex.text.words(self._name))) | [
"def",
"setName",
"(",
"self",
",",
"name",
")",
":",
"self",
".",
"_name",
"=",
"projex",
".",
"text",
".",
"nativestring",
"(",
"name",
")",
"self",
".",
"setText",
"(",
"0",
",",
"' '",
".",
"join",
"(",
"projex",
".",
"text",
".",
"words",
"(... | Sets the name for this color item to the inputed name.
:param name | <str> | [
"Sets",
"the",
"name",
"for",
"this",
"color",
"item",
"to",
"the",
"inputed",
"name",
".",
":",
"param",
"name",
"|",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcolortreewidget.py#L79-L86 | train | Sets the name for this color item to the inputed name. |
bitesofcode/projexui | projexui/widgets/xcolortreewidget.py | XColorTreeWidget.editColor | def editColor( self, item, index ):
"""
Prompts the user to pick a new color for the inputed item/column.
:param item | <XColorTreeWidgetItem>
index | <int>
"""
if ( not index ):
return
newcolor = QColorDialog.ge... | python | def editColor( self, item, index ):
"""
Prompts the user to pick a new color for the inputed item/column.
:param item | <XColorTreeWidgetItem>
index | <int>
"""
if ( not index ):
return
newcolor = QColorDialog.ge... | [
"def",
"editColor",
"(",
"self",
",",
"item",
",",
"index",
")",
":",
"if",
"(",
"not",
"index",
")",
":",
"return",
"newcolor",
"=",
"QColorDialog",
".",
"getColor",
"(",
"item",
".",
"colorAt",
"(",
"index",
"-",
"1",
")",
",",
"self",
")",
"if",... | Prompts the user to pick a new color for the inputed item/column.
:param item | <XColorTreeWidgetItem>
index | <int> | [
"Prompts",
"the",
"user",
"to",
"pick",
"a",
"new",
"color",
"for",
"the",
"inputed",
"item",
"/",
"column",
".",
":",
"param",
"item",
"|",
"<XColorTreeWidgetItem",
">",
"index",
"|",
"<int",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcolortreewidget.py#L122-L142 | train | Prompts the user to choose a new color for the inputed item and column. |
bitesofcode/projexui | projexui/widgets/xcolortreewidget.py | XColorTreeWidget.savedColorSet | def savedColorSet( self ):
"""
Returns the current colors as a saved color set.
:return <XColorSet> || None
"""
colorSet = self._colorSet
if ( not colorSet ):
return None
labels = colorSet.colorGroups()
for i in range( sel... | python | def savedColorSet( self ):
"""
Returns the current colors as a saved color set.
:return <XColorSet> || None
"""
colorSet = self._colorSet
if ( not colorSet ):
return None
labels = colorSet.colorGroups()
for i in range( sel... | [
"def",
"savedColorSet",
"(",
"self",
")",
":",
"colorSet",
"=",
"self",
".",
"_colorSet",
"if",
"(",
"not",
"colorSet",
")",
":",
"return",
"None",
"labels",
"=",
"colorSet",
".",
"colorGroups",
"(",
")",
"for",
"i",
"in",
"range",
"(",
"self",
".",
... | Returns the current colors as a saved color set.
:return <XColorSet> || None | [
"Returns",
"the",
"current",
"colors",
"as",
"a",
"saved",
"color",
"set",
".",
":",
"return",
"<XColorSet",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcolortreewidget.py#L153-L170 | train | Returns the current colors as a saved color set. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.