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/xlogginghandler.py | XLoggingHandler.emit | def emit(self, record):
"""
Emits the signal for this record through the dispatch
element.
:param record | <logging.LogRecord>
"""
disp = self.dispatch()
if disp is None:
return
msg = self.format(record)
... | python | def emit(self, record):
"""
Emits the signal for this record through the dispatch
element.
:param record | <logging.LogRecord>
"""
disp = self.dispatch()
if disp is None:
return
msg = self.format(record)
... | [
"def",
"emit",
"(",
"self",
",",
"record",
")",
":",
"disp",
"=",
"self",
".",
"dispatch",
"(",
")",
"if",
"disp",
"is",
"None",
":",
"return",
"msg",
"=",
"self",
".",
"format",
"(",
"record",
")",
"# emit the dispatch signals\r",
"disp",
".",
"record... | Emits the signal for this record through the dispatch
element.
:param record | <logging.LogRecord> | [
"Emits",
"the",
"signal",
"for",
"this",
"record",
"through",
"the",
"dispatch",
"element",
".",
":",
"param",
"record",
"|",
"<logging",
".",
"LogRecord",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xlogginghandler.py#L61-L87 | train | Emits the message for this record through the dispatch signal. |
mikhaildubov/AST-text-analysis | east/asts/ast_linear.py | LinearAnnotatedSuffixTree._construct | def _construct(self, strings_collection):
"""
Generalized suffix tree construction algorithm based on the
Ukkonen's algorithm for suffix tree construction,
with linear [O(n_1 + ... + n_m)] worst-case time complexity,
where m is the number of strings in collection.
... | python | def _construct(self, strings_collection):
"""
Generalized suffix tree construction algorithm based on the
Ukkonen's algorithm for suffix tree construction,
with linear [O(n_1 + ... + n_m)] worst-case time complexity,
where m is the number of strings in collection.
... | [
"def",
"_construct",
"(",
"self",
",",
"strings_collection",
")",
":",
"# 1. Add a unique character to each string in the collection",
"strings_collection",
"=",
"utils",
".",
"make_unique_endings",
"(",
"strings_collection",
")",
"##################################################... | Generalized suffix tree construction algorithm based on the
Ukkonen's algorithm for suffix tree construction,
with linear [O(n_1 + ... + n_m)] worst-case time complexity,
where m is the number of strings in collection. | [
"Generalized",
"suffix",
"tree",
"construction",
"algorithm",
"based",
"on",
"the",
"Ukkonen",
"s",
"algorithm",
"for",
"suffix",
"tree",
"construction",
"with",
"linear",
"[",
"O",
"(",
"n_1",
"+",
"...",
"+",
"n_m",
")",
"]",
"worst",
"-",
"case",
"time"... | 055ad8d2492c100bbbaa25309ec1074bdf1dfaa5 | https://github.com/mikhaildubov/AST-text-analysis/blob/055ad8d2492c100bbbaa25309ec1074bdf1dfaa5/east/asts/ast_linear.py#L12-L208 | train | This method is used to construct the GST from a list of strings. |
neithere/eav-django | eav/managers.py | BaseEntityManager._filter_by_simple_schema | def _filter_by_simple_schema(self, qs, lookup, sublookup, value, schema):
"""
Filters given entity queryset by an attribute which is linked to given
schema and has given value in the field for schema's datatype.
"""
value_lookup = 'attrs__value_%s' % schema.datatype
if su... | python | def _filter_by_simple_schema(self, qs, lookup, sublookup, value, schema):
"""
Filters given entity queryset by an attribute which is linked to given
schema and has given value in the field for schema's datatype.
"""
value_lookup = 'attrs__value_%s' % schema.datatype
if su... | [
"def",
"_filter_by_simple_schema",
"(",
"self",
",",
"qs",
",",
"lookup",
",",
"sublookup",
",",
"value",
",",
"schema",
")",
":",
"value_lookup",
"=",
"'attrs__value_%s'",
"%",
"schema",
".",
"datatype",
"if",
"sublookup",
":",
"value_lookup",
"=",
"'%s__%s'"... | Filters given entity queryset by an attribute which is linked to given
schema and has given value in the field for schema's datatype. | [
"Filters",
"given",
"entity",
"queryset",
"by",
"an",
"attribute",
"which",
"is",
"linked",
"to",
"given",
"schema",
"and",
"has",
"given",
"value",
"in",
"the",
"field",
"for",
"schema",
"s",
"datatype",
"."
] | 7f2e9fe17bbe740622cfb38f6ce0e8413b7da3d7 | https://github.com/neithere/eav-django/blob/7f2e9fe17bbe740622cfb38f6ce0e8413b7da3d7/eav/managers.py#L121-L132 | train | Filters given entity queryset by a simple schema. |
neithere/eav-django | eav/managers.py | BaseEntityManager._filter_by_range_schema | def _filter_by_range_schema(self, qs, lookup, sublookup, value, schema):
"""
Filters given entity queryset by an attribute which is linked to given
range schema. Lookups `between` yields items that lie not completely
within given range but have intersection with it. For example, and item... | python | def _filter_by_range_schema(self, qs, lookup, sublookup, value, schema):
"""
Filters given entity queryset by an attribute which is linked to given
range schema. Lookups `between` yields items that lie not completely
within given range but have intersection with it. For example, and item... | [
"def",
"_filter_by_range_schema",
"(",
"self",
",",
"qs",
",",
"lookup",
",",
"sublookup",
",",
"value",
",",
"schema",
")",
":",
"# This code was written with a single use case in mind. That use case",
"# required searching for objects whose ranges *intersect* with given",
"# on... | Filters given entity queryset by an attribute which is linked to given
range schema. Lookups `between` yields items that lie not completely
within given range but have intersection with it. For example, and item
with x=(2,5) will match q=(3,None) or q=(0,3). See tests for details.
q... | [
"Filters",
"given",
"entity",
"queryset",
"by",
"an",
"attribute",
"which",
"is",
"linked",
"to",
"given",
"range",
"schema",
".",
"Lookups",
"between",
"yields",
"items",
"that",
"lie",
"not",
"completely",
"within",
"given",
"range",
"but",
"have",
"intersec... | 7f2e9fe17bbe740622cfb38f6ce0e8413b7da3d7 | https://github.com/neithere/eav-django/blob/7f2e9fe17bbe740622cfb38f6ce0e8413b7da3d7/eav/managers.py#L134-L171 | train | Filters given entity queryset by an attribute which is linked to given
range schema. |
neithere/eav-django | eav/managers.py | BaseEntityManager._filter_by_m2m_schema | def _filter_by_m2m_schema(self, qs, lookup, sublookup, value, schema, model=None):
"""
Filters given entity queryset by an attribute which is linked to given
many-to-many schema.
"""
model = model or self.model
schemata = dict((s.name, s) for s in model.get_schemata_for_m... | python | def _filter_by_m2m_schema(self, qs, lookup, sublookup, value, schema, model=None):
"""
Filters given entity queryset by an attribute which is linked to given
many-to-many schema.
"""
model = model or self.model
schemata = dict((s.name, s) for s in model.get_schemata_for_m... | [
"def",
"_filter_by_m2m_schema",
"(",
"self",
",",
"qs",
",",
"lookup",
",",
"sublookup",
",",
"value",
",",
"schema",
",",
"model",
"=",
"None",
")",
":",
"model",
"=",
"model",
"or",
"self",
".",
"model",
"schemata",
"=",
"dict",
"(",
"(",
"s",
".",... | Filters given entity queryset by an attribute which is linked to given
many-to-many schema. | [
"Filters",
"given",
"entity",
"queryset",
"by",
"an",
"attribute",
"which",
"is",
"linked",
"to",
"given",
"many",
"-",
"to",
"-",
"many",
"schema",
"."
] | 7f2e9fe17bbe740622cfb38f6ce0e8413b7da3d7 | https://github.com/neithere/eav-django/blob/7f2e9fe17bbe740622cfb38f6ce0e8413b7da3d7/eav/managers.py#L173-L189 | train | Filters given entity queryset by an attribute which is linked to given
model. |
neithere/eav-django | eav/managers.py | BaseEntityManager.create | def create(self, **kwargs):
"""
Creates entity instance and related Attr instances.
Note that while entity instances may filter schemata by fields, that
filtering does not take place here. Attribute of any schema will be saved
successfully as long as such schema exists.
... | python | def create(self, **kwargs):
"""
Creates entity instance and related Attr instances.
Note that while entity instances may filter schemata by fields, that
filtering does not take place here. Attribute of any schema will be saved
successfully as long as such schema exists.
... | [
"def",
"create",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"fields",
"=",
"self",
".",
"model",
".",
"_meta",
".",
"get_all_field_names",
"(",
")",
"schemata",
"=",
"dict",
"(",
"(",
"s",
".",
"name",
",",
"s",
")",
"for",
"s",
"in",
"self"... | Creates entity instance and related Attr instances.
Note that while entity instances may filter schemata by fields, that
filtering does not take place here. Attribute of any schema will be saved
successfully as long as such schema exists.
Note that we cannot create attribute with no pr... | [
"Creates",
"entity",
"instance",
"and",
"related",
"Attr",
"instances",
"."
] | 7f2e9fe17bbe740622cfb38f6ce0e8413b7da3d7 | https://github.com/neithere/eav-django/blob/7f2e9fe17bbe740622cfb38f6ce0e8413b7da3d7/eav/managers.py#L191-L225 | train | Creates an entity instance and related Attr instances. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.connectSignals | def connectSignals(self, node):
"""
:remarks Connects to signals of the inputed node, if the node
is a valid XNode type.
:param node <XNode> || None
:return <bool> success
"""
from projexui.widgets.xnodewidget.xnode imp... | python | def connectSignals(self, node):
"""
:remarks Connects to signals of the inputed node, if the node
is a valid XNode type.
:param node <XNode> || None
:return <bool> success
"""
from projexui.widgets.xnodewidget.xnode imp... | [
"def",
"connectSignals",
"(",
"self",
",",
"node",
")",
":",
"from",
"projexui",
".",
"widgets",
".",
"xnodewidget",
".",
"xnode",
"import",
"XNode",
"# make sure we're connecting to a valid node",
"if",
"not",
"isinstance",
"(",
"node",
",",
"XNode",
")",
":",
... | :remarks Connects to signals of the inputed node, if the node
is a valid XNode type.
:param node <XNode> || None
:return <bool> success | [
":",
"remarks",
"Connects",
"to",
"signals",
"of",
"the",
"inputed",
"node",
"if",
"the",
"node",
"is",
"a",
"valid",
"XNode",
"type",
".",
":",
"param",
"node",
"<XNode",
">",
"||",
"None",
":",
"return",
"<bool",
">",
"success"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L136-L154 | train | Connects the signals of the inputed node to the signals of the inputed node. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.controlPoints | def controlPoints(self):
"""
:remarks Generates the control points for this path
:return <list> [ <tuple> ( <float> x, <float> y), .. ]
"""
# define input variables
in_point = self.inputPoint()
in_rect = self.inputRect()
in_x = in_point.x(... | python | def controlPoints(self):
"""
:remarks Generates the control points for this path
:return <list> [ <tuple> ( <float> x, <float> y), .. ]
"""
# define input variables
in_point = self.inputPoint()
in_rect = self.inputRect()
in_x = in_point.x(... | [
"def",
"controlPoints",
"(",
"self",
")",
":",
"# define input variables",
"in_point",
"=",
"self",
".",
"inputPoint",
"(",
")",
"in_rect",
"=",
"self",
".",
"inputRect",
"(",
")",
"in_x",
"=",
"in_point",
".",
"x",
"(",
")",
"in_y",
"=",
"in_point",
"."... | :remarks Generates the control points for this path
:return <list> [ <tuple> ( <float> x, <float> y), .. ] | [
":",
"remarks",
"Generates",
"the",
"control",
"points",
"for",
"this",
"path",
":",
"return",
"<list",
">",
"[",
"<tuple",
">",
"(",
"<float",
">",
"x",
"<float",
">",
"y",
")",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L156-L479 | train | Generates the control points for this path. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.disconnectSignals | def disconnectSignals(self, node):
"""
Disconnects from signals of the inputed node, if the node is a \
valid XNode type.
:param node <XNode> || None
:return <bool> success
"""
from projexui.widgets.xnodewidget.xnode import XNode
... | python | def disconnectSignals(self, node):
"""
Disconnects from signals of the inputed node, if the node is a \
valid XNode type.
:param node <XNode> || None
:return <bool> success
"""
from projexui.widgets.xnodewidget.xnode import XNode
... | [
"def",
"disconnectSignals",
"(",
"self",
",",
"node",
")",
":",
"from",
"projexui",
".",
"widgets",
".",
"xnodewidget",
".",
"xnode",
"import",
"XNode",
"# make sure we're disconnecting from a valid node",
"if",
"not",
"isinstance",
"(",
"node",
",",
"XNode",
")",... | Disconnects from signals of the inputed node, if the node is a \
valid XNode type.
:param node <XNode> || None
:return <bool> success | [
"Disconnects",
"from",
"signals",
"of",
"the",
"inputed",
"node",
"if",
"the",
"node",
"is",
"a",
"\\",
"valid",
"XNode",
"type",
".",
":",
"param",
"node",
"<XNode",
">",
"||",
"None",
":",
"return",
"<bool",
">",
"success"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L519-L536 | train | Disconnects from signals of the inputed node. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.inputRect | def inputRect(self):
"""
Returns the bounding rectangle for the input node associated with this
connection. If only a point is provided, then a 0 width rect will be
used.
:return <QRectF>
"""
try:
return self._inputNode.sceneRect()
... | python | def inputRect(self):
"""
Returns the bounding rectangle for the input node associated with this
connection. If only a point is provided, then a 0 width rect will be
used.
:return <QRectF>
"""
try:
return self._inputNode.sceneRect()
... | [
"def",
"inputRect",
"(",
"self",
")",
":",
"try",
":",
"return",
"self",
".",
"_inputNode",
".",
"sceneRect",
"(",
")",
"except",
"AttributeError",
":",
"point",
"=",
"self",
".",
"inputPoint",
"(",
")",
"return",
"QRectF",
"(",
"point",
".",
"x",
"(",... | Returns the bounding rectangle for the input node associated with this
connection. If only a point is provided, then a 0 width rect will be
used.
:return <QRectF> | [
"Returns",
"the",
"bounding",
"rectangle",
"for",
"the",
"input",
"node",
"associated",
"with",
"this",
"connection",
".",
"If",
"only",
"a",
"point",
"is",
"provided",
"then",
"a",
"0",
"width",
"rect",
"will",
"be",
"used",
".",
":",
"return",
"<QRectF",... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L604-L616 | train | Returns the bounding rectangle for the input node associated with this ArcGIS connection. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.inputPoint | def inputPoint(self):
"""
Returns a scene space point that the connection \
will draw to as its input target. If the connection \
has a node defined, then it will calculate the input \
point based on the position of the node, factoring in \
preference for input location ... | python | def inputPoint(self):
"""
Returns a scene space point that the connection \
will draw to as its input target. If the connection \
has a node defined, then it will calculate the input \
point based on the position of the node, factoring in \
preference for input location ... | [
"def",
"inputPoint",
"(",
"self",
")",
":",
"node",
"=",
"self",
".",
"inputNode",
"(",
")",
"# return the set point",
"if",
"not",
"node",
":",
"return",
"self",
".",
"_inputPoint",
"# test for the hotspot",
"hotspot",
"=",
"self",
".",
"inputHotspot",
"(",
... | Returns a scene space point that the connection \
will draw to as its input target. If the connection \
has a node defined, then it will calculate the input \
point based on the position of the node, factoring in \
preference for input location and fixed information. \
If there ... | [
"Returns",
"a",
"scene",
"space",
"point",
"that",
"the",
"connection",
"\\",
"will",
"draw",
"to",
"as",
"its",
"input",
"target",
".",
"If",
"the",
"connection",
"\\",
"has",
"a",
"node",
"defined",
"then",
"it",
"will",
"calculate",
"the",
"input",
"\... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L634-L705 | train | Returns the input point for the current connection. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.isDirection | def isDirection(self, outputLocation, inputLocation):
"""
Checks to see if the output and input locations match the settings \
for this item.
:param outputLocation | <XConnectionLocation>
:param inputLocation | <XConnectionLocation>
... | python | def isDirection(self, outputLocation, inputLocation):
"""
Checks to see if the output and input locations match the settings \
for this item.
:param outputLocation | <XConnectionLocation>
:param inputLocation | <XConnectionLocation>
... | [
"def",
"isDirection",
"(",
"self",
",",
"outputLocation",
",",
"inputLocation",
")",
":",
"return",
"(",
"self",
".",
"isOutputLocation",
"(",
"outputLocation",
")",
"and",
"self",
".",
"isInputLocation",
"(",
"inputLocation",
")",
")"
] | Checks to see if the output and input locations match the settings \
for this item.
:param outputLocation | <XConnectionLocation>
:param inputLocation | <XConnectionLocation>
:return <bool> | [
"Checks",
"to",
"see",
"if",
"the",
"output",
"and",
"input",
"locations",
"match",
"the",
"settings",
"\\",
"for",
"this",
"item",
".",
":",
"param",
"outputLocation",
"|",
"<XConnectionLocation",
">",
":",
"param",
"inputLocation",
"|",
"<XConnectionLocation",... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L707-L718 | train | Checks to see if the output and input locations match the settings \
apikey. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.isEnabled | def isEnabled(self):
"""
Returns whether or not this connection is enabled.
:sa disableWithLayer
:return <bool>
"""
if self._disableWithLayer and self._layer:
lenabled = self._layer.isEnabled()
elif self._inputNode and self._o... | python | def isEnabled(self):
"""
Returns whether or not this connection is enabled.
:sa disableWithLayer
:return <bool>
"""
if self._disableWithLayer and self._layer:
lenabled = self._layer.isEnabled()
elif self._inputNode and self._o... | [
"def",
"isEnabled",
"(",
"self",
")",
":",
"if",
"self",
".",
"_disableWithLayer",
"and",
"self",
".",
"_layer",
":",
"lenabled",
"=",
"self",
".",
"_layer",
".",
"isEnabled",
"(",
")",
"elif",
"self",
".",
"_inputNode",
"and",
"self",
".",
"_outputNode"... | Returns whether or not this connection is enabled.
:sa disableWithLayer
:return <bool> | [
"Returns",
"whether",
"or",
"not",
"this",
"connection",
"is",
"enabled",
".",
":",
"sa",
"disableWithLayer",
":",
"return",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L729-L744 | train | Returns whether or not this connection is enabled. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.isVisible | def isVisible(self):
"""
Returns whether or not this connection is visible. If either node it is
connected to is hidden, then it should be as well.
:return <bool>
"""
in_node = self.inputNode()
out_node = self.outputNode()
if in_node and not... | python | def isVisible(self):
"""
Returns whether or not this connection is visible. If either node it is
connected to is hidden, then it should be as well.
:return <bool>
"""
in_node = self.inputNode()
out_node = self.outputNode()
if in_node and not... | [
"def",
"isVisible",
"(",
"self",
")",
":",
"in_node",
"=",
"self",
".",
"inputNode",
"(",
")",
"out_node",
"=",
"self",
".",
"outputNode",
"(",
")",
"if",
"in_node",
"and",
"not",
"in_node",
".",
"isVisible",
"(",
")",
":",
"return",
"False",
"if",
"... | Returns whether or not this connection is visible. If either node it is
connected to is hidden, then it should be as well.
:return <bool> | [
"Returns",
"whether",
"or",
"not",
"this",
"connection",
"is",
"visible",
".",
"If",
"either",
"node",
"it",
"is",
"connected",
"to",
"is",
"hidden",
"then",
"it",
"should",
"be",
"as",
"well",
".",
":",
"return",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L778-L794 | train | Returns whether or not this connection is visible. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.mappedPolygon | def mappedPolygon(self, polygon, path=None, percent=0.5):
"""
Maps the inputed polygon to the inputed path \
used when drawing items along the path. If no \
specific path is supplied, then this object's own \
path will be used. It will rotate and move the \
polygon acco... | python | def mappedPolygon(self, polygon, path=None, percent=0.5):
"""
Maps the inputed polygon to the inputed path \
used when drawing items along the path. If no \
specific path is supplied, then this object's own \
path will be used. It will rotate and move the \
polygon acco... | [
"def",
"mappedPolygon",
"(",
"self",
",",
"polygon",
",",
"path",
"=",
"None",
",",
"percent",
"=",
"0.5",
")",
":",
"translatePerc",
"=",
"percent",
"anglePerc",
"=",
"percent",
"# we don't want to allow the angle percentage greater than 0.85",
"# or less than 0.05 or ... | Maps the inputed polygon to the inputed path \
used when drawing items along the path. If no \
specific path is supplied, then this object's own \
path will be used. It will rotate and move the \
polygon according to the inputed percentage.
:param polygon <QPo... | [
"Maps",
"the",
"inputed",
"polygon",
"to",
"the",
"inputed",
"path",
"\\",
"used",
"when",
"drawing",
"items",
"along",
"the",
"path",
".",
"If",
"no",
"\\",
"specific",
"path",
"is",
"supplied",
"then",
"this",
"object",
"s",
"own",
"\\",
"path",
"will"... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L804-L848 | train | Maps the inputed polygon to the inputed path. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.mousePressEvent | def mousePressEvent(self, event):
"""
Overloads the mouse press event to handle special cases and \
bypass when the scene is in view mode.
:param event <QMousePressEvent>
"""
# ignore events when the scene is in view mode
scene = self.scene()
... | python | def mousePressEvent(self, event):
"""
Overloads the mouse press event to handle special cases and \
bypass when the scene is in view mode.
:param event <QMousePressEvent>
"""
# ignore events when the scene is in view mode
scene = self.scene()
... | [
"def",
"mousePressEvent",
"(",
"self",
",",
"event",
")",
":",
"# ignore events when the scene is in view mode",
"scene",
"=",
"self",
".",
"scene",
"(",
")",
"if",
"scene",
"and",
"scene",
".",
"inViewMode",
"(",
")",
":",
"event",
".",
"ignore",
"(",
")",
... | Overloads the mouse press event to handle special cases and \
bypass when the scene is in view mode.
:param event <QMousePressEvent> | [
"Overloads",
"the",
"mouse",
"press",
"event",
"to",
"handle",
"special",
"cases",
"and",
"\\",
"bypass",
"when",
"the",
"scene",
"is",
"in",
"view",
"mode",
".",
":",
"param",
"event",
"<QMousePressEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L850-L875 | train | Handles the mouse press event for this node and returns the related class name. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.mouseMoveEvent | def mouseMoveEvent(self, event):
"""
Overloads the mouse move event to ignore the event when \
the scene is in view mode.
:param event <QMouseMoveEvent>
"""
# ignore events when the scene is in view mode
scene = self.scene()
if scene and (s... | python | def mouseMoveEvent(self, event):
"""
Overloads the mouse move event to ignore the event when \
the scene is in view mode.
:param event <QMouseMoveEvent>
"""
# ignore events when the scene is in view mode
scene = self.scene()
if scene and (s... | [
"def",
"mouseMoveEvent",
"(",
"self",
",",
"event",
")",
":",
"# ignore events when the scene is in view mode",
"scene",
"=",
"self",
".",
"scene",
"(",
")",
"if",
"scene",
"and",
"(",
"scene",
".",
"inViewMode",
"(",
")",
"or",
"scene",
".",
"isConnecting",
... | Overloads the mouse move event to ignore the event when \
the scene is in view mode.
:param event <QMouseMoveEvent> | [
"Overloads",
"the",
"mouse",
"move",
"event",
"to",
"ignore",
"the",
"event",
"when",
"\\",
"the",
"scene",
"is",
"in",
"view",
"mode",
".",
":",
"param",
"event",
"<QMouseMoveEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L877-L891 | train | Overloads the mouse move event to ignore the event when the scene is in view mode. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.mouseReleaseEvent | def mouseReleaseEvent(self, event):
"""
Overloads the mouse release event to ignore the event when the \
scene is in view mode, and release the selection block signal.
:param event <QMouseReleaseEvent>
"""
# ignore events when the scene is in view mode
... | python | def mouseReleaseEvent(self, event):
"""
Overloads the mouse release event to ignore the event when the \
scene is in view mode, and release the selection block signal.
:param event <QMouseReleaseEvent>
"""
# ignore events when the scene is in view mode
... | [
"def",
"mouseReleaseEvent",
"(",
"self",
",",
"event",
")",
":",
"# ignore events when the scene is in view mode",
"scene",
"=",
"self",
".",
"scene",
"(",
")",
"if",
"scene",
"and",
"(",
"scene",
".",
"inViewMode",
"(",
")",
"or",
"scene",
".",
"isConnecting"... | Overloads the mouse release event to ignore the event when the \
scene is in view mode, and release the selection block signal.
:param event <QMouseReleaseEvent> | [
"Overloads",
"the",
"mouse",
"release",
"event",
"to",
"ignore",
"the",
"event",
"when",
"the",
"\\",
"scene",
"is",
"in",
"view",
"mode",
"and",
"release",
"the",
"selection",
"block",
"signal",
".",
":",
"param",
"event",
"<QMouseReleaseEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L893-L916 | train | Overloads the mouse release event to ignore the event when the scene is in view mode and release the selection block signal. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.opacity | def opacity(self):
"""
Returns the opacity amount for this connection.
:return <float>
"""
in_node = self.inputNode()
out_node = self.outputNode()
if ( in_node and out_node and \
(in_node.isIsolateHidden() or out_node.isIsolateHi... | python | def opacity(self):
"""
Returns the opacity amount for this connection.
:return <float>
"""
in_node = self.inputNode()
out_node = self.outputNode()
if ( in_node and out_node and \
(in_node.isIsolateHidden() or out_node.isIsolateHi... | [
"def",
"opacity",
"(",
"self",
")",
":",
"in_node",
"=",
"self",
".",
"inputNode",
"(",
")",
"out_node",
"=",
"self",
".",
"outputNode",
"(",
")",
"if",
"(",
"in_node",
"and",
"out_node",
"and",
"(",
"in_node",
".",
"isIsolateHidden",
"(",
")",
"or",
... | Returns the opacity amount for this connection.
:return <float> | [
"Returns",
"the",
"opacity",
"amount",
"for",
"this",
"connection",
".",
":",
"return",
"<float",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L918-L936 | train | Returns the opacity amount for this connection. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.outputPoint | def outputPoint(self):
"""
Returns a scene space point that the connection \
will draw to as its output source. If the connection \
has a node defined, then it will calculate the output \
point based on the position of the node, factoring in \
preference for output locat... | python | def outputPoint(self):
"""
Returns a scene space point that the connection \
will draw to as its output source. If the connection \
has a node defined, then it will calculate the output \
point based on the position of the node, factoring in \
preference for output locat... | [
"def",
"outputPoint",
"(",
"self",
")",
":",
"node",
"=",
"self",
".",
"outputNode",
"(",
")",
"# return the set point",
"if",
"not",
"node",
":",
"return",
"self",
".",
"_outputPoint",
"# test for the hotspot",
"hotspot",
"=",
"self",
".",
"outputHotspot",
"(... | Returns a scene space point that the connection \
will draw to as its output source. If the connection \
has a node defined, then it will calculate the output \
point based on the position of the node, factoring in \
preference for output location and fixed positions. If \
the... | [
"Returns",
"a",
"scene",
"space",
"point",
"that",
"the",
"connection",
"\\",
"will",
"draw",
"to",
"as",
"its",
"output",
"source",
".",
"If",
"the",
"connection",
"\\",
"has",
"a",
"node",
"defined",
"then",
"it",
"will",
"calculate",
"the",
"output",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L989-L1060 | train | Returns the scene space point that the connection will draw to as its output source. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.outputRect | def outputRect(self):
"""
Returns the bounding rectangle for the output node associated with this
connection. If only a point is provided, then a 0 width rect will be
used.
:return <QRectF>
"""
try:
return self._outputNode.sceneRect()
... | python | def outputRect(self):
"""
Returns the bounding rectangle for the output node associated with this
connection. If only a point is provided, then a 0 width rect will be
used.
:return <QRectF>
"""
try:
return self._outputNode.sceneRect()
... | [
"def",
"outputRect",
"(",
"self",
")",
":",
"try",
":",
"return",
"self",
".",
"_outputNode",
".",
"sceneRect",
"(",
")",
"except",
"AttributeError",
":",
"point",
"=",
"self",
".",
"outputPoint",
"(",
")",
"return",
"QRectF",
"(",
"point",
".",
"x",
"... | Returns the bounding rectangle for the output node associated with this
connection. If only a point is provided, then a 0 width rect will be
used.
:return <QRectF> | [
"Returns",
"the",
"bounding",
"rectangle",
"for",
"the",
"output",
"node",
"associated",
"with",
"this",
"connection",
".",
"If",
"only",
"a",
"point",
"is",
"provided",
"then",
"a",
"0",
"width",
"rect",
"will",
"be",
"used",
".",
":",
"return",
"<QRectF"... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1062-L1074 | train | Returns the bounding rectangle for the output node associated with this ArcGIS connection. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.paint | def paint(self, painter, option, widget):
"""
Overloads the paint method from QGraphicsPathItem to \
handle custom drawing of the path using this items \
pens and polygons.
:param painter <QPainter>
:param option <QGraphicsItemStyleOption>
... | python | def paint(self, painter, option, widget):
"""
Overloads the paint method from QGraphicsPathItem to \
handle custom drawing of the path using this items \
pens and polygons.
:param painter <QPainter>
:param option <QGraphicsItemStyleOption>
... | [
"def",
"paint",
"(",
"self",
",",
"painter",
",",
"option",
",",
"widget",
")",
":",
"# following the arguments required by Qt",
"# pylint: disable-msg=W0613",
"painter",
".",
"setOpacity",
"(",
"self",
".",
"opacity",
"(",
")",
")",
"# show the connection selected",
... | Overloads the paint method from QGraphicsPathItem to \
handle custom drawing of the path using this items \
pens and polygons.
:param painter <QPainter>
:param option <QGraphicsItemStyleOption>
:param widget <QWidget> | [
"Overloads",
"the",
"paint",
"method",
"from",
"QGraphicsPathItem",
"to",
"\\",
"handle",
"custom",
"drawing",
"of",
"the",
"path",
"using",
"this",
"items",
"\\",
"pens",
"and",
"polygons",
".",
":",
"param",
"painter",
"<QPainter",
">",
":",
"param",
"opti... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1085-L1133 | train | This method draws the path using the currently selected item and the selected item s pens and polygons. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.prepareToRemove | def prepareToRemove(self):
"""
Handles any code that needs to run to cleanup the connection \
before it gets removed from the scene.
:return <bool> success
"""
# disconnect the signals from the input and output nodes
for node in (self._outputNode, sel... | python | def prepareToRemove(self):
"""
Handles any code that needs to run to cleanup the connection \
before it gets removed from the scene.
:return <bool> success
"""
# disconnect the signals from the input and output nodes
for node in (self._outputNode, sel... | [
"def",
"prepareToRemove",
"(",
"self",
")",
":",
"# disconnect the signals from the input and output nodes",
"for",
"node",
"in",
"(",
"self",
".",
"_outputNode",
",",
"self",
".",
"_inputNode",
")",
":",
"self",
".",
"disconnectSignals",
"(",
"node",
")",
"# clea... | Handles any code that needs to run to cleanup the connection \
before it gets removed from the scene.
:return <bool> success | [
"Handles",
"any",
"code",
"that",
"needs",
"to",
"run",
"to",
"cleanup",
"the",
"connection",
"\\",
"before",
"it",
"gets",
"removed",
"from",
"the",
"scene",
".",
":",
"return",
"<bool",
">",
"success"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1135-L1150 | train | Prepares any code that needs to run to cleanup the connection before it gets removed from the scene. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.rebuild | def rebuild(self):
"""
Rebuilds the path for this connection based on the given connection \
style parameters that have been set.
:return <QPainterPath>
"""
# create the path
path = self.rebuildPath()
self._polygons = self.rebuildPolygons(path... | python | def rebuild(self):
"""
Rebuilds the path for this connection based on the given connection \
style parameters that have been set.
:return <QPainterPath>
"""
# create the path
path = self.rebuildPath()
self._polygons = self.rebuildPolygons(path... | [
"def",
"rebuild",
"(",
"self",
")",
":",
"# create the path",
"path",
"=",
"self",
".",
"rebuildPath",
"(",
")",
"self",
".",
"_polygons",
"=",
"self",
".",
"rebuildPolygons",
"(",
"path",
")",
"if",
"self",
".",
"_textItem",
":",
"point",
"=",
"path",
... | Rebuilds the path for this connection based on the given connection \
style parameters that have been set.
:return <QPainterPath> | [
"Rebuilds",
"the",
"path",
"for",
"this",
"connection",
"based",
"on",
"the",
"given",
"connection",
"\\",
"style",
"parameters",
"that",
"have",
"been",
"set",
".",
":",
"return",
"<QPainterPath",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1152-L1178 | train | Rebuilds the path for this connection based on the given connection \
AttributeNames style parameters that have been set. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.rebuildPath | def rebuildPath(self):
"""
Rebuilds the path for the given style options based on the currently \
set parameters.
:return <QPainterPath>
"""
# rebuild linear style
if self.isStyle(XConnectionStyle.Linear):
return self.rebuildLinear()
... | python | def rebuildPath(self):
"""
Rebuilds the path for the given style options based on the currently \
set parameters.
:return <QPainterPath>
"""
# rebuild linear style
if self.isStyle(XConnectionStyle.Linear):
return self.rebuildLinear()
... | [
"def",
"rebuildPath",
"(",
"self",
")",
":",
"# rebuild linear style",
"if",
"self",
".",
"isStyle",
"(",
"XConnectionStyle",
".",
"Linear",
")",
":",
"return",
"self",
".",
"rebuildLinear",
"(",
")",
"# rebuild block style",
"elif",
"self",
".",
"isStyle",
"(... | Rebuilds the path for the given style options based on the currently \
set parameters.
:return <QPainterPath> | [
"Rebuilds",
"the",
"path",
"for",
"the",
"given",
"style",
"options",
"based",
"on",
"the",
"currently",
"\\",
"set",
"parameters",
".",
":",
"return",
"<QPainterPath",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1180-L1202 | train | Rebuilds the path for the given style options based on the currently \
set parameters. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.rebuildPolygons | def rebuildPolygons(self, path):
"""
Rebuilds the polygons that will be used on this path.
:param path | <QPainterPath>
:return <list> [ <QPolygonF>, .. ]
"""
output = []
# create the input arrow
if self.showInputArrow():
... | python | def rebuildPolygons(self, path):
"""
Rebuilds the polygons that will be used on this path.
:param path | <QPainterPath>
:return <list> [ <QPolygonF>, .. ]
"""
output = []
# create the input arrow
if self.showInputArrow():
... | [
"def",
"rebuildPolygons",
"(",
"self",
",",
"path",
")",
":",
"output",
"=",
"[",
"]",
"# create the input arrow",
"if",
"self",
".",
"showInputArrow",
"(",
")",
":",
"if",
"self",
".",
"inputArrowStyle",
"(",
")",
"&",
"self",
".",
"ArrowStyle",
".",
"I... | Rebuilds the polygons that will be used on this path.
:param path | <QPainterPath>
:return <list> [ <QPolygonF>, .. ] | [
"Rebuilds",
"the",
"polygons",
"that",
"will",
"be",
"used",
"on",
"this",
"path",
".",
":",
"param",
"path",
"|",
"<QPainterPath",
">",
":",
"return",
"<list",
">",
"[",
"<QPolygonF",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1204-L1261 | train | Rebuilds the polygons that will be used on this path. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.rebuildLinear | def rebuildLinear(self):
"""
Rebuilds a linear path from the output to input points.
:return <QPainterPath>
"""
points = self.controlPoints()
# create a simple line between the output and input points
path = QPainterPath()
path.moveTo(*poin... | python | def rebuildLinear(self):
"""
Rebuilds a linear path from the output to input points.
:return <QPainterPath>
"""
points = self.controlPoints()
# create a simple line between the output and input points
path = QPainterPath()
path.moveTo(*poin... | [
"def",
"rebuildLinear",
"(",
"self",
")",
":",
"points",
"=",
"self",
".",
"controlPoints",
"(",
")",
"# create a simple line between the output and input points",
"path",
"=",
"QPainterPath",
"(",
")",
"path",
".",
"moveTo",
"(",
"*",
"points",
"[",
"0",
"]",
... | Rebuilds a linear path from the output to input points.
:return <QPainterPath> | [
"Rebuilds",
"a",
"linear",
"path",
"from",
"the",
"output",
"to",
"input",
"points",
".",
":",
"return",
"<QPainterPath",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1263-L1277 | train | Rebuilds a linear path from the output to input points. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.rebuildBlock | def rebuildBlock(self):
"""
Rebuilds a blocked path from the output to input points.
:return <QPainterPath>
"""
# collect the control points
points = self.controlPoints()
curve = 12
path = QPainterPath()
if len(points) == 2:
... | python | def rebuildBlock(self):
"""
Rebuilds a blocked path from the output to input points.
:return <QPainterPath>
"""
# collect the control points
points = self.controlPoints()
curve = 12
path = QPainterPath()
if len(points) == 2:
... | [
"def",
"rebuildBlock",
"(",
"self",
")",
":",
"# collect the control points",
"points",
"=",
"self",
".",
"controlPoints",
"(",
")",
"curve",
"=",
"12",
"path",
"=",
"QPainterPath",
"(",
")",
"if",
"len",
"(",
"points",
")",
"==",
"2",
":",
"path",
".",
... | Rebuilds a blocked path from the output to input points.
:return <QPainterPath> | [
"Rebuilds",
"a",
"blocked",
"path",
"from",
"the",
"output",
"to",
"input",
"points",
".",
":",
"return",
"<QPainterPath",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1279-L1334 | train | Rebuilds a blocked path from the output to input points. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.rebuildSmooth | def rebuildSmooth(self):
"""
Rebuilds a smooth path based on the inputed points and set \
parameters for this item.
:return <QPainterPath>
"""
# collect the control points
points = self.controlPoints()
# create the path
path = QPainte... | python | def rebuildSmooth(self):
"""
Rebuilds a smooth path based on the inputed points and set \
parameters for this item.
:return <QPainterPath>
"""
# collect the control points
points = self.controlPoints()
# create the path
path = QPainte... | [
"def",
"rebuildSmooth",
"(",
"self",
")",
":",
"# collect the control points",
"points",
"=",
"self",
".",
"controlPoints",
"(",
")",
"# create the path",
"path",
"=",
"QPainterPath",
"(",
")",
"if",
"len",
"(",
"points",
")",
"==",
"3",
":",
"x0",
",",
"y... | Rebuilds a smooth path based on the inputed points and set \
parameters for this item.
:return <QPainterPath> | [
"Rebuilds",
"a",
"smooth",
"path",
"based",
"on",
"the",
"inputed",
"points",
"and",
"set",
"\\",
"parameters",
"for",
"this",
"item",
".",
":",
"return",
"<QPainterPath",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1336-L1388 | train | Rebuilds a smooth path based on the inputed points and set \
AttributeNames to the item s control points and returns the path object. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.setDirection | def setDirection(self, outputLocation, inputLocation):
"""
Sets the output-to-input direction by setting both the locations \
at the same time.
:param outputLocation | <XConnectionLocation>
:param inputLocation | <XConnectionLocation>
"""
... | python | def setDirection(self, outputLocation, inputLocation):
"""
Sets the output-to-input direction by setting both the locations \
at the same time.
:param outputLocation | <XConnectionLocation>
:param inputLocation | <XConnectionLocation>
"""
... | [
"def",
"setDirection",
"(",
"self",
",",
"outputLocation",
",",
"inputLocation",
")",
":",
"self",
".",
"setOutputLocation",
"(",
"outputLocation",
")",
"self",
".",
"setInputLocation",
"(",
"inputLocation",
")"
] | Sets the output-to-input direction by setting both the locations \
at the same time.
:param outputLocation | <XConnectionLocation>
:param inputLocation | <XConnectionLocation> | [
"Sets",
"the",
"output",
"-",
"to",
"-",
"input",
"direction",
"by",
"setting",
"both",
"the",
"locations",
"\\",
"at",
"the",
"same",
"time",
".",
":",
"param",
"outputLocation",
"|",
"<XConnectionLocation",
">",
":",
"param",
"inputLocation",
"|",
"<XConne... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1427-L1436 | train | Sets the output - to - input direction by setting both the locations \
outputLocation and \
Attrs inputLocation. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.setDirty | def setDirty(self, state=True):
"""
Flags the connection as being dirty and needing a rebuild.
:param state | <bool>
"""
self._dirty = state
# set if this connection should be visible
if self._inputNode and self._outputNode:
vis = self... | python | def setDirty(self, state=True):
"""
Flags the connection as being dirty and needing a rebuild.
:param state | <bool>
"""
self._dirty = state
# set if this connection should be visible
if self._inputNode and self._outputNode:
vis = self... | [
"def",
"setDirty",
"(",
"self",
",",
"state",
"=",
"True",
")",
":",
"self",
".",
"_dirty",
"=",
"state",
"# set if this connection should be visible",
"if",
"self",
".",
"_inputNode",
"and",
"self",
".",
"_outputNode",
":",
"vis",
"=",
"self",
".",
"_inputN... | Flags the connection as being dirty and needing a rebuild.
:param state | <bool> | [
"Flags",
"the",
"connection",
"as",
"being",
"dirty",
"and",
"needing",
"a",
"rebuild",
".",
":",
"param",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1438-L1449 | train | Sets the dirty flag for this connection. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.setInputNode | def setInputNode(self, node):
"""
Sets the node that will be recieving this connection as an input.
:param node | <XNode>
"""
# if the node already matches the current input node, ignore
if self._inputNode == node:
return
# disconnect... | python | def setInputNode(self, node):
"""
Sets the node that will be recieving this connection as an input.
:param node | <XNode>
"""
# if the node already matches the current input node, ignore
if self._inputNode == node:
return
# disconnect... | [
"def",
"setInputNode",
"(",
"self",
",",
"node",
")",
":",
"# if the node already matches the current input node, ignore",
"if",
"self",
".",
"_inputNode",
"==",
"node",
":",
"return",
"# disconnect from the existing node",
"self",
".",
"disconnectSignals",
"(",
"self",
... | Sets the node that will be recieving this connection as an input.
:param node | <XNode> | [
"Sets",
"the",
"node",
"that",
"will",
"be",
"recieving",
"this",
"connection",
"as",
"an",
"input",
".",
":",
"param",
"node",
"|",
"<XNode",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1511-L1531 | train | Sets the node that will be recieving this connection as an input. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.setInputPoint | def setInputPoint(self, point):
"""
Sets the scene level input point position to draw the connection to. \
This is used mainly by the scene when drawing a user connection - \
it will only be used when there is no connected input node.
:param point | <QPointF>
... | python | def setInputPoint(self, point):
"""
Sets the scene level input point position to draw the connection to. \
This is used mainly by the scene when drawing a user connection - \
it will only be used when there is no connected input node.
:param point | <QPointF>
... | [
"def",
"setInputPoint",
"(",
"self",
",",
"point",
")",
":",
"self",
".",
"_inputPoint",
"=",
"point",
"self",
".",
"setPath",
"(",
"self",
".",
"rebuild",
"(",
")",
")"
] | Sets the scene level input point position to draw the connection to. \
This is used mainly by the scene when drawing a user connection - \
it will only be used when there is no connected input node.
:param point | <QPointF> | [
"Sets",
"the",
"scene",
"level",
"input",
"point",
"position",
"to",
"draw",
"the",
"connection",
"to",
".",
"\\",
"This",
"is",
"used",
"mainly",
"by",
"the",
"scene",
"when",
"drawing",
"a",
"user",
"connection",
"-",
"\\",
"it",
"will",
"only",
"be",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1560-L1569 | train | Sets the scene level input point position to draw the connection to. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.setLayer | def setLayer(self, layer):
"""
Sets the layer that this node is associated with to the given layer.
:param layer | <XNodeLayer> || None
:return <bool> changed
"""
if layer == self._layer:
return False
self._layer = lay... | python | def setLayer(self, layer):
"""
Sets the layer that this node is associated with to the given layer.
:param layer | <XNodeLayer> || None
:return <bool> changed
"""
if layer == self._layer:
return False
self._layer = lay... | [
"def",
"setLayer",
"(",
"self",
",",
"layer",
")",
":",
"if",
"layer",
"==",
"self",
".",
"_layer",
":",
"return",
"False",
"self",
".",
"_layer",
"=",
"layer",
"self",
".",
"syncLayerData",
"(",
")",
"return",
"True"
] | Sets the layer that this node is associated with to the given layer.
:param layer | <XNodeLayer> || None
:return <bool> changed | [
"Sets",
"the",
"layer",
"that",
"this",
"node",
"is",
"associated",
"with",
"to",
"the",
"given",
"layer",
".",
":",
"param",
"layer",
"|",
"<XNodeLayer",
">",
"||",
"None",
":",
"return",
"<bool",
">",
"changed"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1571-L1585 | train | Sets the layer that this node is associated with to the given layer. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.setOutputNode | def setOutputNode(self, node):
"""
Sets the node that will be generating the output information for \
this connection.
:param node | <XNode>
"""
# if the output node matches the current, ignore
if node == self._outputNode:
return
... | python | def setOutputNode(self, node):
"""
Sets the node that will be generating the output information for \
this connection.
:param node | <XNode>
"""
# if the output node matches the current, ignore
if node == self._outputNode:
return
... | [
"def",
"setOutputNode",
"(",
"self",
",",
"node",
")",
":",
"# if the output node matches the current, ignore",
"if",
"node",
"==",
"self",
".",
"_outputNode",
":",
"return",
"# disconnect from an existing node",
"self",
".",
"disconnectSignals",
"(",
"self",
".",
"_o... | Sets the node that will be generating the output information for \
this connection.
:param node | <XNode> | [
"Sets",
"the",
"node",
"that",
"will",
"be",
"generating",
"the",
"output",
"information",
"for",
"\\",
"this",
"connection",
".",
":",
"param",
"node",
"|",
"<XNode",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1605-L1624 | train | Sets the node that will be generated the output information for this connection. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.setOutputPoint | def setOutputPoint(self, point):
"""
Sets the scene space point for where this connection should draw \
its output from. This value will only be used if no output \
node is defined.
:param point | <QPointF>
"""
self._outputPoint = point
... | python | def setOutputPoint(self, point):
"""
Sets the scene space point for where this connection should draw \
its output from. This value will only be used if no output \
node is defined.
:param point | <QPointF>
"""
self._outputPoint = point
... | [
"def",
"setOutputPoint",
"(",
"self",
",",
"point",
")",
":",
"self",
".",
"_outputPoint",
"=",
"point",
"self",
".",
"setPath",
"(",
"self",
".",
"rebuild",
"(",
")",
")"
] | Sets the scene space point for where this connection should draw \
its output from. This value will only be used if no output \
node is defined.
:param point | <QPointF> | [
"Sets",
"the",
"scene",
"space",
"point",
"for",
"where",
"this",
"connection",
"should",
"draw",
"\\",
"its",
"output",
"from",
".",
"This",
"value",
"will",
"only",
"be",
"used",
"if",
"no",
"output",
"\\",
"node",
"is",
"defined",
".",
":",
"param",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1653-L1662 | train | Sets the scene space point for where this connection should draw its output from. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.setStyle | def setStyle(self, style):
"""
:remarks Sets the style of the connection that will be used.
:param style <XConnectionStyle>
"""
self._style = style
self.setDirty()
self.update() | python | def setStyle(self, style):
"""
:remarks Sets the style of the connection that will be used.
:param style <XConnectionStyle>
"""
self._style = style
self.setDirty()
self.update() | [
"def",
"setStyle",
"(",
"self",
",",
"style",
")",
":",
"self",
".",
"_style",
"=",
"style",
"self",
".",
"setDirty",
"(",
")",
"self",
".",
"update",
"(",
")"
] | :remarks Sets the style of the connection that will be used.
:param style <XConnectionStyle> | [
":",
"remarks",
"Sets",
"the",
"style",
"of",
"the",
"connection",
"that",
"will",
"be",
"used",
".",
":",
"param",
"style",
"<XConnectionStyle",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1715-L1723 | train | Sets the style of the connection that will be used. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.setVisible | def setVisible(self, state):
"""
Sets whether or not this connection's local visibility should be on.
:param state | ,bool>
"""
self._visible = state
super(XNodeConnection, self).setVisible(self.isVisible()) | python | def setVisible(self, state):
"""
Sets whether or not this connection's local visibility should be on.
:param state | ,bool>
"""
self._visible = state
super(XNodeConnection, self).setVisible(self.isVisible()) | [
"def",
"setVisible",
"(",
"self",
",",
"state",
")",
":",
"self",
".",
"_visible",
"=",
"state",
"super",
"(",
"XNodeConnection",
",",
"self",
")",
".",
"setVisible",
"(",
"self",
".",
"isVisible",
"(",
")",
")"
] | Sets whether or not this connection's local visibility should be on.
:param state | ,bool> | [
"Sets",
"whether",
"or",
"not",
"this",
"connection",
"s",
"local",
"visibility",
"should",
"be",
"on",
".",
":",
"param",
"state",
"|",
"bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1725-L1733 | train | Sets whether or not this connection s local visibility should be on. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.setZValue | def setZValue(self, value):
"""
Sets the z value for this connection, also updating the text item to
match the value if one is defined.
:param value | <int>
"""
super(XNodeConnection, self).setZValue(value)
if self._textItem:
self._text... | python | def setZValue(self, value):
"""
Sets the z value for this connection, also updating the text item to
match the value if one is defined.
:param value | <int>
"""
super(XNodeConnection, self).setZValue(value)
if self._textItem:
self._text... | [
"def",
"setZValue",
"(",
"self",
",",
"value",
")",
":",
"super",
"(",
"XNodeConnection",
",",
"self",
")",
".",
"setZValue",
"(",
"value",
")",
"if",
"self",
".",
"_textItem",
":",
"self",
".",
"_textItem",
".",
"setZValue",
"(",
"value",
")"
] | Sets the z value for this connection, also updating the text item to
match the value if one is defined.
:param value | <int> | [
"Sets",
"the",
"z",
"value",
"for",
"this",
"connection",
"also",
"updating",
"the",
"text",
"item",
"to",
"match",
"the",
"value",
"if",
"one",
"is",
"defined",
".",
":",
"param",
"value",
"|",
"<int",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1735-L1745 | train | Sets the z value for this connection. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.setText | def setText(self, text):
"""
Sets the text for this connection to the inputed text.
:param text | <str>
"""
self._text = text
if text:
if self._textItem is None:
self._textItem = QGraphicsTextItem()
self._textItem... | python | def setText(self, text):
"""
Sets the text for this connection to the inputed text.
:param text | <str>
"""
self._text = text
if text:
if self._textItem is None:
self._textItem = QGraphicsTextItem()
self._textItem... | [
"def",
"setText",
"(",
"self",
",",
"text",
")",
":",
"self",
".",
"_text",
"=",
"text",
"if",
"text",
":",
"if",
"self",
".",
"_textItem",
"is",
"None",
":",
"self",
".",
"_textItem",
"=",
"QGraphicsTextItem",
"(",
")",
"self",
".",
"_textItem",
"."... | Sets the text for this connection to the inputed text.
:param text | <str> | [
"Sets",
"the",
"text",
"for",
"this",
"connection",
"to",
"the",
"inputed",
"text",
".",
":",
"param",
"text",
"|",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1784-L1801 | train | Sets the text for this connection to the inputed text. |
bitesofcode/projexui | projexui/widgets/xnodewidget/xnodeconnection.py | XNodeConnection.syncLayerData | def syncLayerData(self, layerData=None):
"""
Syncs the layer information for this item from the given layer data.
:param layerData | <dict>
"""
if not self._layer:
return
if not layerData:
layerData = self._layer.layerData()
... | python | def syncLayerData(self, layerData=None):
"""
Syncs the layer information for this item from the given layer data.
:param layerData | <dict>
"""
if not self._layer:
return
if not layerData:
layerData = self._layer.layerData()
... | [
"def",
"syncLayerData",
"(",
"self",
",",
"layerData",
"=",
"None",
")",
":",
"if",
"not",
"self",
".",
"_layer",
":",
"return",
"if",
"not",
"layerData",
":",
"layerData",
"=",
"self",
".",
"_layer",
".",
"layerData",
"(",
")",
"self",
".",
"setVisibl... | Syncs the layer information for this item from the given layer data.
:param layerData | <dict> | [
"Syncs",
"the",
"layer",
"information",
"for",
"this",
"item",
"from",
"the",
"given",
"layer",
"data",
".",
":",
"param",
"layerData",
"|",
"<dict",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xnodewidget/xnodeconnection.py#L1811-L1835 | train | Syncs the layer information for this item from the given layer data. |
bitesofcode/projexui | projexui/widgets/xurlwidget.py | XUrlWidget.blockSignals | def blockSignals( self, state ):
"""
Blocks the signals for this widget and its sub-parts.
:param state | <bool>
"""
super(XUrlWidget, self).blockSignals(state)
self._urlEdit.blockSignals(state)
self._urlButton.blockSignals(state) | python | def blockSignals( self, state ):
"""
Blocks the signals for this widget and its sub-parts.
:param state | <bool>
"""
super(XUrlWidget, self).blockSignals(state)
self._urlEdit.blockSignals(state)
self._urlButton.blockSignals(state) | [
"def",
"blockSignals",
"(",
"self",
",",
"state",
")",
":",
"super",
"(",
"XUrlWidget",
",",
"self",
")",
".",
"blockSignals",
"(",
"state",
")",
"self",
".",
"_urlEdit",
".",
"blockSignals",
"(",
"state",
")",
"self",
".",
"_urlButton",
".",
"blockSigna... | Blocks the signals for this widget and its sub-parts.
:param state | <bool> | [
"Blocks",
"the",
"signals",
"for",
"this",
"widget",
"and",
"its",
"sub",
"-",
"parts",
".",
":",
"param",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xurlwidget.py#L62-L70 | train | Blocks the signals for this widget and its sub - parts. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewprofilemanagermenu.py | XViewProfileManagerMenu.removeProfile | def removeProfile( self ):
"""
Removes the current profile from the system.
"""
manager = self.parent()
prof = manager.currentProfile()
opts = QMessageBox.Yes | QMessageBox.No
question = 'Are you sure you want to remove "%s"?' % prof.name()
answer... | python | def removeProfile( self ):
"""
Removes the current profile from the system.
"""
manager = self.parent()
prof = manager.currentProfile()
opts = QMessageBox.Yes | QMessageBox.No
question = 'Are you sure you want to remove "%s"?' % prof.name()
answer... | [
"def",
"removeProfile",
"(",
"self",
")",
":",
"manager",
"=",
"self",
".",
"parent",
"(",
")",
"prof",
"=",
"manager",
".",
"currentProfile",
"(",
")",
"opts",
"=",
"QMessageBox",
".",
"Yes",
"|",
"QMessageBox",
".",
"No",
"question",
"=",
"'Are you sur... | Removes the current profile from the system. | [
"Removes",
"the",
"current",
"profile",
"from",
"the",
"system",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewprofilemanagermenu.py#L44-L55 | train | Removes the current profile from the system. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewprofilemanagermenu.py | XViewProfileManagerMenu.saveProfile | def saveProfile( self ):
"""
Saves the current profile to the current settings from the view widget.
"""
manager = self.parent()
prof = manager.currentProfile()
# save the current profile
save_prof = manager.viewWidget().saveProfile()
prof.setX... | python | def saveProfile( self ):
"""
Saves the current profile to the current settings from the view widget.
"""
manager = self.parent()
prof = manager.currentProfile()
# save the current profile
save_prof = manager.viewWidget().saveProfile()
prof.setX... | [
"def",
"saveProfile",
"(",
"self",
")",
":",
"manager",
"=",
"self",
".",
"parent",
"(",
")",
"prof",
"=",
"manager",
".",
"currentProfile",
"(",
")",
"# save the current profile",
"save_prof",
"=",
"manager",
".",
"viewWidget",
"(",
")",
".",
"saveProfile",... | Saves the current profile to the current settings from the view widget. | [
"Saves",
"the",
"current",
"profile",
"to",
"the",
"current",
"settings",
"from",
"the",
"view",
"widget",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewprofilemanagermenu.py#L57-L66 | train | Saves the current profile to the current settings from the view widget. |
bitesofcode/projexui | projexui/widgets/xviewwidget/xviewprofilemanagermenu.py | XViewProfileManagerMenu.saveProfileAs | def saveProfileAs( self ):
"""
Saves the current profile as a new profile to the manager.
"""
name, ok = QInputDialog.getText(self, 'Create Profile', 'Name:')
if ( not name ):
return
manager = self.parent()
prof = manager.viewWidget().saveP... | python | def saveProfileAs( self ):
"""
Saves the current profile as a new profile to the manager.
"""
name, ok = QInputDialog.getText(self, 'Create Profile', 'Name:')
if ( not name ):
return
manager = self.parent()
prof = manager.viewWidget().saveP... | [
"def",
"saveProfileAs",
"(",
"self",
")",
":",
"name",
",",
"ok",
"=",
"QInputDialog",
".",
"getText",
"(",
"self",
",",
"'Create Profile'",
",",
"'Name:'",
")",
"if",
"(",
"not",
"name",
")",
":",
"return",
"manager",
"=",
"self",
".",
"parent",
"(",
... | Saves the current profile as a new profile to the manager. | [
"Saves",
"the",
"current",
"profile",
"as",
"a",
"new",
"profile",
"to",
"the",
"manager",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xviewwidget/xviewprofilemanagermenu.py#L68-L79 | train | Saves the current profile as a new profile to the manager. |
Gbps/fastlog | fastlog/hexdump.py | hexdump_iter | def hexdump_iter(logger, fd, width=16, skip=True, hexii=False, begin=0, highlight=None):
r"""
Return a hexdump-dump of a string as a generator of lines. Unless you have
massive amounts of data you probably want to use :meth:`hexdump`.
Arguments:
logger(FastLogger): Logger object
fd(fil... | python | def hexdump_iter(logger, fd, width=16, skip=True, hexii=False, begin=0, highlight=None):
r"""
Return a hexdump-dump of a string as a generator of lines. Unless you have
massive amounts of data you probably want to use :meth:`hexdump`.
Arguments:
logger(FastLogger): Logger object
fd(fil... | [
"def",
"hexdump_iter",
"(",
"logger",
",",
"fd",
",",
"width",
"=",
"16",
",",
"skip",
"=",
"True",
",",
"hexii",
"=",
"False",
",",
"begin",
"=",
"0",
",",
"highlight",
"=",
"None",
")",
":",
"style",
"=",
"logger",
".",
"style",
".",
"hexdump",
... | r"""
Return a hexdump-dump of a string as a generator of lines. Unless you have
massive amounts of data you probably want to use :meth:`hexdump`.
Arguments:
logger(FastLogger): Logger object
fd(file): File object to dump. Use :meth:`StringIO.StringIO` or :meth:`hexdump` to dump a string.
... | [
"r",
"Return",
"a",
"hexdump",
"-",
"dump",
"of",
"a",
"string",
"as",
"a",
"generator",
"of",
"lines",
".",
"Unless",
"you",
"have",
"massive",
"amounts",
"of",
"data",
"you",
"probably",
"want",
"to",
"use",
":",
"meth",
":",
"hexdump",
"."
] | 8edb2327d72191510302c4654ffaa1691fe31277 | https://github.com/Gbps/fastlog/blob/8edb2327d72191510302c4654ffaa1691fe31277/fastlog/hexdump.py#L47-L181 | train | r Returns a generator of lines of a string in a hexdump - dump format. |
Gbps/fastlog | fastlog/hexdump.py | hexdump | def hexdump(logger, s, width=16, skip=True, hexii=False, begin=0, highlight=None):
r"""
Return a hexdump-dump of a string.
Arguments:
logger(FastLogger): Logger object
s(str): The data to hexdump.
width(int): The number of characters per line
skip(bool): Set to True, if repe... | python | def hexdump(logger, s, width=16, skip=True, hexii=False, begin=0, highlight=None):
r"""
Return a hexdump-dump of a string.
Arguments:
logger(FastLogger): Logger object
s(str): The data to hexdump.
width(int): The number of characters per line
skip(bool): Set to True, if repe... | [
"def",
"hexdump",
"(",
"logger",
",",
"s",
",",
"width",
"=",
"16",
",",
"skip",
"=",
"True",
",",
"hexii",
"=",
"False",
",",
"begin",
"=",
"0",
",",
"highlight",
"=",
"None",
")",
":",
"s",
"=",
"_flat",
"(",
"s",
")",
"return",
"'\\n'",
".",... | r"""
Return a hexdump-dump of a string.
Arguments:
logger(FastLogger): Logger object
s(str): The data to hexdump.
width(int): The number of characters per line
skip(bool): Set to True, if repeated lines should be replaced by a "*"
hexii(bool): Set to True, if a hexii-dum... | [
"r",
"Return",
"a",
"hexdump",
"-",
"dump",
"of",
"a",
"string",
"."
] | 8edb2327d72191510302c4654ffaa1691fe31277 | https://github.com/Gbps/fastlog/blob/8edb2327d72191510302c4654ffaa1691fe31277/fastlog/hexdump.py#L183-L314 | train | r Prints a string of the object containing the given size in hexadecimal. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.adjustText | def adjustText(self):
"""
Updates the text based on the current format options.
"""
pos = self.cursorPosition()
self.blockSignals(True)
super(XLineEdit, self).setText(self.formatText(self.text()))
self.setCursorPosition(pos)
self.blockSignals(False) | python | def adjustText(self):
"""
Updates the text based on the current format options.
"""
pos = self.cursorPosition()
self.blockSignals(True)
super(XLineEdit, self).setText(self.formatText(self.text()))
self.setCursorPosition(pos)
self.blockSignals(False) | [
"def",
"adjustText",
"(",
"self",
")",
":",
"pos",
"=",
"self",
".",
"cursorPosition",
"(",
")",
"self",
".",
"blockSignals",
"(",
"True",
")",
"super",
"(",
"XLineEdit",
",",
"self",
")",
".",
"setText",
"(",
"self",
".",
"formatText",
"(",
"self",
... | Updates the text based on the current format options. | [
"Updates",
"the",
"text",
"based",
"on",
"the",
"current",
"format",
"options",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L110-L118 | train | Adjusts the text based on the current format options. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.addButton | def addButton(self, button, alignment=None):
"""
Adds a button the edit. All the buttons will be layed out at the \
end of the widget.
:param button | <QToolButton>
alignment | <Qt.Alignment>
:return <bool> | success
... | python | def addButton(self, button, alignment=None):
"""
Adds a button the edit. All the buttons will be layed out at the \
end of the widget.
:param button | <QToolButton>
alignment | <Qt.Alignment>
:return <bool> | success
... | [
"def",
"addButton",
"(",
"self",
",",
"button",
",",
"alignment",
"=",
"None",
")",
":",
"if",
"alignment",
"==",
"None",
":",
"if",
"button",
".",
"pos",
"(",
")",
".",
"x",
"(",
")",
"<",
"self",
".",
"pos",
"(",
")",
".",
"x",
"(",
")",
":... | Adds a button the edit. All the buttons will be layed out at the \
end of the widget.
:param button | <QToolButton>
alignment | <Qt.Alignment>
:return <bool> | success | [
"Adds",
"a",
"button",
"the",
"edit",
".",
"All",
"the",
"buttons",
"will",
"be",
"layed",
"out",
"at",
"the",
"\\",
"end",
"of",
"the",
"widget",
".",
":",
"param",
"button",
"|",
"<QToolButton",
">",
"alignment",
"|",
"<Qt",
".",
"Alignment",
">",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L120-L150 | train | Adds a button to the edit. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.adjustButtons | def adjustButtons( self ):
"""
Adjusts the placement of the buttons for this line edit.
"""
y = 1
for btn in self.buttons():
btn.setIconSize(self.iconSize())
btn.setFixedSize(QSize(self.height() - 2, self.height() - 2))
# adju... | python | def adjustButtons( self ):
"""
Adjusts the placement of the buttons for this line edit.
"""
y = 1
for btn in self.buttons():
btn.setIconSize(self.iconSize())
btn.setFixedSize(QSize(self.height() - 2, self.height() - 2))
# adju... | [
"def",
"adjustButtons",
"(",
"self",
")",
":",
"y",
"=",
"1",
"for",
"btn",
"in",
"self",
".",
"buttons",
"(",
")",
":",
"btn",
".",
"setIconSize",
"(",
"self",
".",
"iconSize",
"(",
")",
")",
"btn",
".",
"setFixedSize",
"(",
"QSize",
"(",
"self",
... | Adjusts the placement of the buttons for this line edit. | [
"Adjusts",
"the",
"placement",
"of",
"the",
"buttons",
"for",
"this",
"line",
"edit",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L152-L182 | train | Adjusts the placement of the buttons for this line edit. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.adjustTextMargins | def adjustTextMargins( self ):
"""
Adjusts the margins for the text based on the contents to be displayed.
"""
left_buttons = self._buttons.get(Qt.AlignLeft, [])
if left_buttons:
bwidth = left_buttons[-1].pos().x() + left_buttons[-1].width() - 4
else:... | python | def adjustTextMargins( self ):
"""
Adjusts the margins for the text based on the contents to be displayed.
"""
left_buttons = self._buttons.get(Qt.AlignLeft, [])
if left_buttons:
bwidth = left_buttons[-1].pos().x() + left_buttons[-1].width() - 4
else:... | [
"def",
"adjustTextMargins",
"(",
"self",
")",
":",
"left_buttons",
"=",
"self",
".",
"_buttons",
".",
"get",
"(",
"Qt",
".",
"AlignLeft",
",",
"[",
"]",
")",
"if",
"left_buttons",
":",
"bwidth",
"=",
"left_buttons",
"[",
"-",
"1",
"]",
".",
"pos",
"(... | Adjusts the margins for the text based on the contents to be displayed. | [
"Adjusts",
"the",
"margins",
"for",
"the",
"text",
"based",
"on",
"the",
"contents",
"to",
"be",
"displayed",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L184-L199 | train | Adjusts the margins for the text based on the contents of the current item. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.adjustStyleSheet | def adjustStyleSheet( self ):
"""
Adjusts the stylesheet for this widget based on whether it has a \
corner radius and/or icon.
"""
radius = self.cornerRadius()
icon = self.icon()
if not self.objectName():
self.setStyleSheet('')
... | python | def adjustStyleSheet( self ):
"""
Adjusts the stylesheet for this widget based on whether it has a \
corner radius and/or icon.
"""
radius = self.cornerRadius()
icon = self.icon()
if not self.objectName():
self.setStyleSheet('')
... | [
"def",
"adjustStyleSheet",
"(",
"self",
")",
":",
"radius",
"=",
"self",
".",
"cornerRadius",
"(",
")",
"icon",
"=",
"self",
".",
"icon",
"(",
")",
"if",
"not",
"self",
".",
"objectName",
"(",
")",
":",
"self",
".",
"setStyleSheet",
"(",
"''",
")",
... | Adjusts the stylesheet for this widget based on whether it has a \
corner radius and/or icon. | [
"Adjusts",
"the",
"stylesheet",
"for",
"this",
"widget",
"based",
"on",
"whether",
"it",
"has",
"a",
"\\",
"corner",
"radius",
"and",
"/",
"or",
"icon",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L201-L224 | train | Adjusts the stylesheet for this widget based on whether it has a corner radius and icon. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.buttons | def buttons(self):
"""
Returns all the buttons linked to this edit.
:return [<QToolButton>, ..]
"""
all_buttons = []
for buttons in self._buttons.values():
all_buttons += buttons
return all_buttons | python | def buttons(self):
"""
Returns all the buttons linked to this edit.
:return [<QToolButton>, ..]
"""
all_buttons = []
for buttons in self._buttons.values():
all_buttons += buttons
return all_buttons | [
"def",
"buttons",
"(",
"self",
")",
":",
"all_buttons",
"=",
"[",
"]",
"for",
"buttons",
"in",
"self",
".",
"_buttons",
".",
"values",
"(",
")",
":",
"all_buttons",
"+=",
"buttons",
"return",
"all_buttons"
] | Returns all the buttons linked to this edit.
:return [<QToolButton>, ..] | [
"Returns",
"all",
"the",
"buttons",
"linked",
"to",
"this",
"edit",
".",
":",
"return",
"[",
"<QToolButton",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L226-L235 | train | Returns all the buttons linked to this edit. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.clear | def clear(self):
"""
Clears the text from the edit.
"""
super(XLineEdit, self).clear()
self.textEntered.emit('')
self.textChanged.emit('')
self.textEdited.emit('') | python | def clear(self):
"""
Clears the text from the edit.
"""
super(XLineEdit, self).clear()
self.textEntered.emit('')
self.textChanged.emit('')
self.textEdited.emit('') | [
"def",
"clear",
"(",
"self",
")",
":",
"super",
"(",
"XLineEdit",
",",
"self",
")",
".",
"clear",
"(",
")",
"self",
".",
"textEntered",
".",
"emit",
"(",
"''",
")",
"self",
".",
"textChanged",
".",
"emit",
"(",
"''",
")",
"self",
".",
"textEdited",... | Clears the text from the edit. | [
"Clears",
"the",
"text",
"from",
"the",
"edit",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L237-L245 | train | Clears the text from the edit. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.currentText | def currentText( self ):
"""
Returns the text that is available currently, \
if the user has set standard text, then that \
is returned, otherwise the hint is returned.
:return <str>
"""
text = nativestring(self.text())
if text or not self.use... | python | def currentText( self ):
"""
Returns the text that is available currently, \
if the user has set standard text, then that \
is returned, otherwise the hint is returned.
:return <str>
"""
text = nativestring(self.text())
if text or not self.use... | [
"def",
"currentText",
"(",
"self",
")",
":",
"text",
"=",
"nativestring",
"(",
"self",
".",
"text",
"(",
")",
")",
"if",
"text",
"or",
"not",
"self",
".",
"useHintValue",
"(",
")",
":",
"return",
"text",
"return",
"self",
".",
"hint",
"(",
")"
] | Returns the text that is available currently, \
if the user has set standard text, then that \
is returned, otherwise the hint is returned.
:return <str> | [
"Returns",
"the",
"text",
"that",
"is",
"available",
"currently",
"\\",
"if",
"the",
"user",
"has",
"set",
"standard",
"text",
"then",
"that",
"\\",
"is",
"returned",
"otherwise",
"the",
"hint",
"is",
"returned",
".",
":",
"return",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L264-L275 | train | Returns the current text that is available currently. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.focusInEvent | def focusInEvent(self, event):
"""
Updates the focus in state for this edit.
:param event | <QFocusEvent>
"""
super(XLineEdit, self).focusInEvent(event)
self._focusedIn = True | python | def focusInEvent(self, event):
"""
Updates the focus in state for this edit.
:param event | <QFocusEvent>
"""
super(XLineEdit, self).focusInEvent(event)
self._focusedIn = True | [
"def",
"focusInEvent",
"(",
"self",
",",
"event",
")",
":",
"super",
"(",
"XLineEdit",
",",
"self",
")",
".",
"focusInEvent",
"(",
"event",
")",
"self",
".",
"_focusedIn",
"=",
"True"
] | Updates the focus in state for this edit.
:param event | <QFocusEvent> | [
"Updates",
"the",
"focus",
"in",
"state",
"for",
"this",
"edit",
".",
":",
"param",
"event",
"|",
"<QFocusEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L288-L296 | train | Updates the focus in state for this edit. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.focusOutEvent | def focusOutEvent(self, event):
"""
Updates the focus in state for this edit.
:param event | <QFocusEvent>
"""
super(XLineEdit, self).focusOutEvent(event)
self._focusedIn = False | python | def focusOutEvent(self, event):
"""
Updates the focus in state for this edit.
:param event | <QFocusEvent>
"""
super(XLineEdit, self).focusOutEvent(event)
self._focusedIn = False | [
"def",
"focusOutEvent",
"(",
"self",
",",
"event",
")",
":",
"super",
"(",
"XLineEdit",
",",
"self",
")",
".",
"focusOutEvent",
"(",
"event",
")",
"self",
".",
"_focusedIn",
"=",
"False"
] | Updates the focus in state for this edit.
:param event | <QFocusEvent> | [
"Updates",
"the",
"focus",
"in",
"state",
"for",
"this",
"edit",
".",
":",
"param",
"event",
"|",
"<QFocusEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L298-L306 | train | Updates the focus in state for this edit. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.formatText | def formatText(self, text):
"""
Formats the inputed text based on the input format assigned to this
line edit.
:param text | <str>
:return <str> | frormatted text
"""
format = self.inputFormat()
if format == XLineEdit.I... | python | def formatText(self, text):
"""
Formats the inputed text based on the input format assigned to this
line edit.
:param text | <str>
:return <str> | frormatted text
"""
format = self.inputFormat()
if format == XLineEdit.I... | [
"def",
"formatText",
"(",
"self",
",",
"text",
")",
":",
"format",
"=",
"self",
".",
"inputFormat",
"(",
")",
"if",
"format",
"==",
"XLineEdit",
".",
"InputFormat",
".",
"Normal",
":",
"return",
"text",
"text",
"=",
"projex",
".",
"text",
".",
"natives... | Formats the inputed text based on the input format assigned to this
line edit.
:param text | <str>
:return <str> | frormatted text | [
"Formats",
"the",
"inputed",
"text",
"based",
"on",
"the",
"input",
"format",
"assigned",
"to",
"this",
"line",
"edit",
".",
":",
"param",
"text",
"|",
"<str",
">",
":",
"return",
"<str",
">",
"|",
"frormatted",
"text"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L308-L353 | train | Formats the input text according to the input format assigned to this line edit. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.hint | def hint(self):
"""
Returns the hint value for this line edit.
:return <str>
"""
parts = (self._hintPrefix, self._hint, self._hintSuffix)
return ''.join(map(projex.text.nativestring, parts)) | python | def hint(self):
"""
Returns the hint value for this line edit.
:return <str>
"""
parts = (self._hintPrefix, self._hint, self._hintSuffix)
return ''.join(map(projex.text.nativestring, parts)) | [
"def",
"hint",
"(",
"self",
")",
":",
"parts",
"=",
"(",
"self",
".",
"_hintPrefix",
",",
"self",
".",
"_hint",
",",
"self",
".",
"_hintSuffix",
")",
"return",
"''",
".",
"join",
"(",
"map",
"(",
"projex",
".",
"text",
".",
"nativestring",
",",
"pa... | Returns the hint value for this line edit.
:return <str> | [
"Returns",
"the",
"hint",
"value",
"for",
"this",
"line",
"edit",
".",
":",
"return",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L355-L362 | train | Returns the hint value for this line edit. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.mousePressEvent | def mousePressEvent(self, event):
"""
Selects all the text if the property is set after this widget
first gains focus.
:param event | <QMouseEvent>
"""
super(XLineEdit, self).mousePressEvent(event)
if self._focusedIn and self.select... | python | def mousePressEvent(self, event):
"""
Selects all the text if the property is set after this widget
first gains focus.
:param event | <QMouseEvent>
"""
super(XLineEdit, self).mousePressEvent(event)
if self._focusedIn and self.select... | [
"def",
"mousePressEvent",
"(",
"self",
",",
"event",
")",
":",
"super",
"(",
"XLineEdit",
",",
"self",
")",
".",
"mousePressEvent",
"(",
"event",
")",
"if",
"self",
".",
"_focusedIn",
"and",
"self",
".",
"selectAllOnFocus",
"(",
")",
":",
"self",
".",
... | Selects all the text if the property is set after this widget
first gains focus.
:param event | <QMouseEvent> | [
"Selects",
"all",
"the",
"text",
"if",
"the",
"property",
"is",
"set",
"after",
"this",
"widget",
"first",
"gains",
"focus",
".",
":",
"param",
"event",
"|",
"<QMouseEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L420-L431 | train | Select all the text if the property is set after this widget. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.paintEvent | def paintEvent(self, event):
"""
Overloads the paint event to paint additional \
hint information if no text is set on the \
editor.
:param event | <QPaintEvent>
"""
super(XLineEdit, self).paintEvent(event)
# paint the hint text... | python | def paintEvent(self, event):
"""
Overloads the paint event to paint additional \
hint information if no text is set on the \
editor.
:param event | <QPaintEvent>
"""
super(XLineEdit, self).paintEvent(event)
# paint the hint text... | [
"def",
"paintEvent",
"(",
"self",
",",
"event",
")",
":",
"super",
"(",
"XLineEdit",
",",
"self",
")",
".",
"paintEvent",
"(",
"event",
")",
"# paint the hint text if not text is set",
"if",
"self",
".",
"text",
"(",
")",
"and",
"not",
"(",
"self",
".",
... | Overloads the paint event to paint additional \
hint information if no text is set on the \
editor.
:param event | <QPaintEvent> | [
"Overloads",
"the",
"paint",
"event",
"to",
"paint",
"additional",
"\\",
"hint",
"information",
"if",
"no",
"text",
"is",
"set",
"on",
"the",
"\\",
"editor",
".",
":",
"param",
"event",
"|",
"<QPaintEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L433-L486 | train | Overloads the paint event to paint additional \ ntext information if no text is set on the line edit. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.resizeEvent | def resizeEvent( self, event ):
"""
Overloads the resize event to handle updating of buttons.
:param event | <QResizeEvent>
"""
super(XLineEdit, self).resizeEvent(event)
self.adjustButtons() | python | def resizeEvent( self, event ):
"""
Overloads the resize event to handle updating of buttons.
:param event | <QResizeEvent>
"""
super(XLineEdit, self).resizeEvent(event)
self.adjustButtons() | [
"def",
"resizeEvent",
"(",
"self",
",",
"event",
")",
":",
"super",
"(",
"XLineEdit",
",",
"self",
")",
".",
"resizeEvent",
"(",
"event",
")",
"self",
".",
"adjustButtons",
"(",
")"
] | Overloads the resize event to handle updating of buttons.
:param event | <QResizeEvent> | [
"Overloads",
"the",
"resize",
"event",
"to",
"handle",
"updating",
"of",
"buttons",
".",
":",
"param",
"event",
"|",
"<QResizeEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L488-L495 | train | Overloads the resize event to handle updating of buttons. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.setCurrentState | def setCurrentState(self, state):
"""
Sets the current state for this edit to the inputed state.
:param state | <XLineEdit.State>
"""
self._currentState = state
palette = self.palette()
if state == XLineEdit.State.Normal:
... | python | def setCurrentState(self, state):
"""
Sets the current state for this edit to the inputed state.
:param state | <XLineEdit.State>
"""
self._currentState = state
palette = self.palette()
if state == XLineEdit.State.Normal:
... | [
"def",
"setCurrentState",
"(",
"self",
",",
"state",
")",
":",
"self",
".",
"_currentState",
"=",
"state",
"palette",
"=",
"self",
".",
"palette",
"(",
")",
"if",
"state",
"==",
"XLineEdit",
".",
"State",
".",
"Normal",
":",
"palette",
"=",
"QApplication... | Sets the current state for this edit to the inputed state.
:param state | <XLineEdit.State> | [
"Sets",
"the",
"current",
"state",
"for",
"this",
"edit",
"to",
"the",
"inputed",
"state",
".",
":",
"param",
"state",
"|",
"<XLineEdit",
".",
"State",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L516-L539 | train | Sets the current state for this edit. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.setHint | def setHint(self, hint):
"""
Sets the hint text to the inputed value.
:param hint | <str>
"""
self._hint = self.formatText(hint)
self.update()
self.hintChanged.emit(self.hint()) | python | def setHint(self, hint):
"""
Sets the hint text to the inputed value.
:param hint | <str>
"""
self._hint = self.formatText(hint)
self.update()
self.hintChanged.emit(self.hint()) | [
"def",
"setHint",
"(",
"self",
",",
"hint",
")",
":",
"self",
".",
"_hint",
"=",
"self",
".",
"formatText",
"(",
"hint",
")",
"self",
".",
"update",
"(",
")",
"self",
".",
"hintChanged",
".",
"emit",
"(",
"self",
".",
"hint",
"(",
")",
")"
] | Sets the hint text to the inputed value.
:param hint | <str> | [
"Sets",
"the",
"hint",
"text",
"to",
"the",
"inputed",
"value",
".",
":",
"param",
"hint",
"|",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L545-L553 | train | Sets the hint text for the current item. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.setInputFormatText | def setInputFormatText( self, text ):
"""
Sets the input format text for this widget to the given value.
:param text | <str>
"""
try:
self._inputFormat = XLineEdit.InputFormat[nativestring(text)]
except KeyError:
pass | python | def setInputFormatText( self, text ):
"""
Sets the input format text for this widget to the given value.
:param text | <str>
"""
try:
self._inputFormat = XLineEdit.InputFormat[nativestring(text)]
except KeyError:
pass | [
"def",
"setInputFormatText",
"(",
"self",
",",
"text",
")",
":",
"try",
":",
"self",
".",
"_inputFormat",
"=",
"XLineEdit",
".",
"InputFormat",
"[",
"nativestring",
"(",
"text",
")",
"]",
"except",
"KeyError",
":",
"pass"
] | Sets the input format text for this widget to the given value.
:param text | <str> | [
"Sets",
"the",
"input",
"format",
"text",
"for",
"this",
"widget",
"to",
"the",
"given",
"value",
".",
":",
"param",
"text",
"|",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L606-L615 | train | Sets the input format text for this widget to the given value. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.setObjectName | def setObjectName( self, objectName ):
"""
Updates the style sheet for this line edit when the name changes.
:param objectName | <str>
"""
super(XLineEdit, self).setObjectName(objectName)
self.adjustStyleSheet() | python | def setObjectName( self, objectName ):
"""
Updates the style sheet for this line edit when the name changes.
:param objectName | <str>
"""
super(XLineEdit, self).setObjectName(objectName)
self.adjustStyleSheet() | [
"def",
"setObjectName",
"(",
"self",
",",
"objectName",
")",
":",
"super",
"(",
"XLineEdit",
",",
"self",
")",
".",
"setObjectName",
"(",
"objectName",
")",
"self",
".",
"adjustStyleSheet",
"(",
")"
] | Updates the style sheet for this line edit when the name changes.
:param objectName | <str> | [
"Updates",
"the",
"style",
"sheet",
"for",
"this",
"line",
"edit",
"when",
"the",
"name",
"changes",
".",
":",
"param",
"objectName",
"|",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L617-L624 | train | Updates the style sheet for this line edit when the name changes. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.setText | def setText( self, text ):
"""
Sets the text for this widget to the inputed text, converting it based \
on the current input format if necessary.
:param text | <str>
"""
if text is None:
text = ''
super(XLineEdit, self)... | python | def setText( self, text ):
"""
Sets the text for this widget to the inputed text, converting it based \
on the current input format if necessary.
:param text | <str>
"""
if text is None:
text = ''
super(XLineEdit, self)... | [
"def",
"setText",
"(",
"self",
",",
"text",
")",
":",
"if",
"text",
"is",
"None",
":",
"text",
"=",
"''",
"super",
"(",
"XLineEdit",
",",
"self",
")",
".",
"setText",
"(",
"projex",
".",
"text",
".",
"encoded",
"(",
"self",
".",
"formatText",
"(",
... | Sets the text for this widget to the inputed text, converting it based \
on the current input format if necessary.
:param text | <str> | [
"Sets",
"the",
"text",
"for",
"this",
"widget",
"to",
"the",
"inputed",
"text",
"converting",
"it",
"based",
"\\",
"on",
"the",
"current",
"input",
"format",
"if",
"necessary",
".",
":",
"param",
"text",
"|",
"<str",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L656-L666 | train | Sets the text for this widget to the inputed text. |
bitesofcode/projexui | projexui/widgets/xlineedit.py | XLineEdit.setVisible | def setVisible(self, state):
"""
Sets the visible state for this line edit.
:param state | <bool>
"""
super(XLineEdit, self).setVisible(state)
self.adjustStyleSheet()
self.adjustTextMargins() | python | def setVisible(self, state):
"""
Sets the visible state for this line edit.
:param state | <bool>
"""
super(XLineEdit, self).setVisible(state)
self.adjustStyleSheet()
self.adjustTextMargins() | [
"def",
"setVisible",
"(",
"self",
",",
"state",
")",
":",
"super",
"(",
"XLineEdit",
",",
"self",
")",
".",
"setVisible",
"(",
"state",
")",
"self",
".",
"adjustStyleSheet",
"(",
")",
"self",
".",
"adjustTextMargins",
"(",
")"
] | Sets the visible state for this line edit.
:param state | <bool> | [
"Sets",
"the",
"visible",
"state",
"for",
"this",
"line",
"edit",
".",
":",
"param",
"state",
"|",
"<bool",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xlineedit.py#L668-L677 | train | Sets the visible state for this line edit. |
faxir/faxir-python | faxir/api/accounts_api.py | AccountsApi.get_accounts | def get_accounts(self, **kwargs): # noqa: E501
"""Get account information of all members of your corporate account # noqa: E501
Only admin account can send request to this endpoint which returns accounts of all members # noqa: E501
This method makes a synchronous HTTP request by default. To ... | python | def get_accounts(self, **kwargs): # noqa: E501
"""Get account information of all members of your corporate account # noqa: E501
Only admin account can send request to this endpoint which returns accounts of all members # noqa: E501
This method makes a synchronous HTTP request by default. To ... | [
"def",
"get_accounts",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async'",
")",
":",
"return",
"self",
".",
"get_accounts_with_http_info",
"(... | Get account information of all members of your corporate account # noqa: E501
Only admin account can send request to this endpoint which returns accounts of all members # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asyn... | [
"Get",
"account",
"information",
"of",
"all",
"members",
"of",
"your",
"corporate",
"account",
"#",
"noqa",
":",
"E501"
] | 75ed2ea487a6be537342baea1077a02b0c8e70c1 | https://github.com/faxir/faxir-python/blob/75ed2ea487a6be537342baea1077a02b0c8e70c1/faxir/api/accounts_api.py#L36-L55 | train | Get all accounts of all members of your corporate account |
faxir/faxir-python | faxir/api/accounts_api.py | AccountsApi.get_accounts_with_http_info | def get_accounts_with_http_info(self, **kwargs): # noqa: E501
"""Get account information of all members of your corporate account # noqa: E501
Only admin account can send request to this endpoint which returns accounts of all members # noqa: E501
This method makes a synchronous HTTP request ... | python | def get_accounts_with_http_info(self, **kwargs): # noqa: E501
"""Get account information of all members of your corporate account # noqa: E501
Only admin account can send request to this endpoint which returns accounts of all members # noqa: E501
This method makes a synchronous HTTP request ... | [
"def",
"get_accounts_with_http_info",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"all_params",
"=",
"[",
"]",
"# noqa: E501",
"all_params",
".",
"append",
"(",
"'async'",
")",
"all_params",
".",
"append",
"(",
"'_return_http_data_only'",
")"... | Get account information of all members of your corporate account # noqa: E501
Only admin account can send request to this endpoint which returns accounts of all members # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass asyn... | [
"Get",
"account",
"information",
"of",
"all",
"members",
"of",
"your",
"corporate",
"account",
"#",
"noqa",
":",
"E501"
] | 75ed2ea487a6be537342baea1077a02b0c8e70c1 | https://github.com/faxir/faxir-python/blob/75ed2ea487a6be537342baea1077a02b0c8e70c1/faxir/api/accounts_api.py#L57-L125 | train | This method returns all accounts of all members of your corporate account |
faxir/faxir-python | faxir/api/accounts_api.py | AccountsApi.get_member_details | def get_member_details(self, member_id, **kwargs): # noqa: E501
"""Get member details # noqa: E501
Get your member details (quota and role) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> t... | python | def get_member_details(self, member_id, **kwargs): # noqa: E501
"""Get member details # noqa: E501
Get your member details (quota and role) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> t... | [
"def",
"get_member_details",
"(",
"self",
",",
"member_id",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async'",
")",
":",
"return",
"self",
".",
"get_me... | Get member details # noqa: E501
Get your member details (quota and role) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_member_details(member_id, async=True)
>>> result = t... | [
"Get",
"member",
"details",
"#",
"noqa",
":",
"E501"
] | 75ed2ea487a6be537342baea1077a02b0c8e70c1 | https://github.com/faxir/faxir-python/blob/75ed2ea487a6be537342baea1077a02b0c8e70c1/faxir/api/accounts_api.py#L127-L147 | train | Get member details |
faxir/faxir-python | faxir/api/accounts_api.py | AccountsApi.get_user | def get_user(self, user_id, **kwargs): # noqa: E501
"""Get account information for admin or member # noqa: E501
Get account information. For members user_id can only be self. form admin it can be user_id of any <br />**In case you want to get your own account information please use *`self`* as an ali... | python | def get_user(self, user_id, **kwargs): # noqa: E501
"""Get account information for admin or member # noqa: E501
Get account information. For members user_id can only be self. form admin it can be user_id of any <br />**In case you want to get your own account information please use *`self`* as an ali... | [
"def",
"get_user",
"(",
"self",
",",
"user_id",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async'",
")",
":",
"return",
"self",
".",
"get_user_with_http... | Get account information for admin or member # noqa: E501
Get account information. For members user_id can only be self. form admin it can be user_id of any <br />**In case you want to get your own account information please use *`self`* as an alias for your user_id.** # noqa: E501
This method makes a... | [
"Get",
"account",
"information",
"for",
"admin",
"or",
"member",
"#",
"noqa",
":",
"E501"
] | 75ed2ea487a6be537342baea1077a02b0c8e70c1 | https://github.com/faxir/faxir-python/blob/75ed2ea487a6be537342baea1077a02b0c8e70c1/faxir/api/accounts_api.py#L226-L246 | train | Get user information. |
faxir/faxir-python | faxir/api/accounts_api.py | AccountsApi.update_member_details | def update_member_details(self, member_id, payload_member_detail, **kwargs): # noqa: E501
"""Modify member details # noqa: E501
One of the paramters below is needed to modify member information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchron... | python | def update_member_details(self, member_id, payload_member_detail, **kwargs): # noqa: E501
"""Modify member details # noqa: E501
One of the paramters below is needed to modify member information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchron... | [
"def",
"update_member_details",
"(",
"self",
",",
"member_id",
",",
"payload_member_detail",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async'",
")",
":",
... | Modify member details # noqa: E501
One of the paramters below is needed to modify member information # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.update_member_details(member_id, pay... | [
"Modify",
"member",
"details",
"#",
"noqa",
":",
"E501"
] | 75ed2ea487a6be537342baea1077a02b0c8e70c1 | https://github.com/faxir/faxir-python/blob/75ed2ea487a6be537342baea1077a02b0c8e70c1/faxir/api/accounts_api.py#L325-L346 | train | Update member details |
Gbps/fastlog | fastlog/termcap.py | get | def get(cap, *args, **kwargs):
"""
Get a terminal capability exposes through the `curses` module.
"""
# Hack for readthedocs.org
if 'READTHEDOCS' in os.environ:
return ''
if kwargs != {}:
raise TypeError("get(): No such argument %r" % kwargs.popitem()[0])
if _cache == {}:
... | python | def get(cap, *args, **kwargs):
"""
Get a terminal capability exposes through the `curses` module.
"""
# Hack for readthedocs.org
if 'READTHEDOCS' in os.environ:
return ''
if kwargs != {}:
raise TypeError("get(): No such argument %r" % kwargs.popitem()[0])
if _cache == {}:
... | [
"def",
"get",
"(",
"cap",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"# Hack for readthedocs.org",
"if",
"'READTHEDOCS'",
"in",
"os",
".",
"environ",
":",
"return",
"''",
"if",
"kwargs",
"!=",
"{",
"}",
":",
"raise",
"TypeError",
"(",
"\"get(... | Get a terminal capability exposes through the `curses` module. | [
"Get",
"a",
"terminal",
"capability",
"exposes",
"through",
"the",
"curses",
"module",
"."
] | 8edb2327d72191510302c4654ffaa1691fe31277 | https://github.com/Gbps/fastlog/blob/8edb2327d72191510302c4654ffaa1691fe31277/fastlog/termcap.py#L9-L49 | train | Get a terminal capability exposes through the curses module. |
andylockran/heatmiserV3 | heatmiserV3/connection.py | HeatmiserUH1.registerThermostat | def registerThermostat(self, thermostat):
"""Registers a thermostat with the UH1"""
try:
type(thermostat) == heatmiser.HeatmiserThermostat
if thermostat.address in self.thermostats.keys():
raise ValueError("Key already present")
else:
s... | python | def registerThermostat(self, thermostat):
"""Registers a thermostat with the UH1"""
try:
type(thermostat) == heatmiser.HeatmiserThermostat
if thermostat.address in self.thermostats.keys():
raise ValueError("Key already present")
else:
s... | [
"def",
"registerThermostat",
"(",
"self",
",",
"thermostat",
")",
":",
"try",
":",
"type",
"(",
"thermostat",
")",
"==",
"heatmiser",
".",
"HeatmiserThermostat",
"if",
"thermostat",
".",
"address",
"in",
"self",
".",
"thermostats",
".",
"keys",
"(",
")",
"... | Registers a thermostat with the UH1 | [
"Registers",
"a",
"thermostat",
"with",
"the",
"UH1"
] | bd8638f5fd1f85d16c908020252f58a0cc4f6ac0 | https://github.com/andylockran/heatmiserV3/blob/bd8638f5fd1f85d16c908020252f58a0cc4f6ac0/heatmiserV3/connection.py#L49-L62 | train | Registers a thermostat with the UH1 |
bitesofcode/projexui | projexui/menus/xrecentfilesmenu.py | XRecentFilesMenu.addFilename | def addFilename( self, filename ):
"""
Adds a new filename to the top of the list. If the filename is \
already loaded, it will be moved to the front of the list.
:param filename | <str>
"""
filename = os.path.normpath(nativestring(filename))
... | python | def addFilename( self, filename ):
"""
Adds a new filename to the top of the list. If the filename is \
already loaded, it will be moved to the front of the list.
:param filename | <str>
"""
filename = os.path.normpath(nativestring(filename))
... | [
"def",
"addFilename",
"(",
"self",
",",
"filename",
")",
":",
"filename",
"=",
"os",
".",
"path",
".",
"normpath",
"(",
"nativestring",
"(",
"filename",
")",
")",
"if",
"filename",
"in",
"self",
".",
"_filenames",
":",
"self",
".",
"_filenames",
".",
"... | Adds a new filename to the top of the list. If the filename is \
already loaded, it will be moved to the front of the list.
:param filename | <str> | [
"Adds",
"a",
"new",
"filename",
"to",
"the",
"top",
"of",
"the",
"list",
".",
"If",
"the",
"filename",
"is",
"\\",
"already",
"loaded",
"it",
"will",
"be",
"moved",
"to",
"the",
"front",
"of",
"the",
"list",
".",
":",
"param",
"filename",
"|",
"<str"... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/menus/xrecentfilesmenu.py#L40-L55 | train | Adds a new filename to the top of the list. |
bitesofcode/projexui | projexui/menus/xrecentfilesmenu.py | XRecentFilesMenu.emitFileTriggered | def emitFileTriggered( self, action ):
"""
Emits that the filename has been triggered for the inputed action.
:param action | <QAction>
"""
if not self.signalsBlocked():
filename = nativestring(unwrapVariant(action.data()))
self.fileTriggered... | python | def emitFileTriggered( self, action ):
"""
Emits that the filename has been triggered for the inputed action.
:param action | <QAction>
"""
if not self.signalsBlocked():
filename = nativestring(unwrapVariant(action.data()))
self.fileTriggered... | [
"def",
"emitFileTriggered",
"(",
"self",
",",
"action",
")",
":",
"if",
"not",
"self",
".",
"signalsBlocked",
"(",
")",
":",
"filename",
"=",
"nativestring",
"(",
"unwrapVariant",
"(",
"action",
".",
"data",
"(",
")",
")",
")",
"self",
".",
"fileTriggere... | Emits that the filename has been triggered for the inputed action.
:param action | <QAction> | [
"Emits",
"that",
"the",
"filename",
"has",
"been",
"triggered",
"for",
"the",
"inputed",
"action",
".",
":",
"param",
"action",
"|",
"<QAction",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/menus/xrecentfilesmenu.py#L57-L65 | train | Emits that the filename has been triggered for the inputed action. |
bitesofcode/projexui | projexui/menus/xrecentfilesmenu.py | XRecentFilesMenu.refresh | def refresh( self ):
"""
Clears out the actions for this menu and then loads the files.
"""
self.clear()
for i, filename in enumerate(self.filenames()):
name = '%i. %s' % (i+1, os.path.basename(filename))
action = self.addAction(name)
... | python | def refresh( self ):
"""
Clears out the actions for this menu and then loads the files.
"""
self.clear()
for i, filename in enumerate(self.filenames()):
name = '%i. %s' % (i+1, os.path.basename(filename))
action = self.addAction(name)
... | [
"def",
"refresh",
"(",
"self",
")",
":",
"self",
".",
"clear",
"(",
")",
"for",
"i",
",",
"filename",
"in",
"enumerate",
"(",
"self",
".",
"filenames",
"(",
")",
")",
":",
"name",
"=",
"'%i. %s'",
"%",
"(",
"i",
"+",
"1",
",",
"os",
".",
"path"... | Clears out the actions for this menu and then loads the files. | [
"Clears",
"out",
"the",
"actions",
"for",
"this",
"menu",
"and",
"then",
"loads",
"the",
"files",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/menus/xrecentfilesmenu.py#L84-L93 | train | Refreshes the menu with the current files. |
bitesofcode/projexui | projexui/menus/xrecentfilesmenu.py | XRecentFilesMenu.restoreSettings | def restoreSettings(self, settings):
"""
Restores the files for this menu from the settings.
:param settings | <QSettings>
"""
value = unwrapVariant(settings.value('recent_files'))
if value:
self.setFilenames(value.split(os.path.pathsep)) | python | def restoreSettings(self, settings):
"""
Restores the files for this menu from the settings.
:param settings | <QSettings>
"""
value = unwrapVariant(settings.value('recent_files'))
if value:
self.setFilenames(value.split(os.path.pathsep)) | [
"def",
"restoreSettings",
"(",
"self",
",",
"settings",
")",
":",
"value",
"=",
"unwrapVariant",
"(",
"settings",
".",
"value",
"(",
"'recent_files'",
")",
")",
"if",
"value",
":",
"self",
".",
"setFilenames",
"(",
"value",
".",
"split",
"(",
"os",
".",
... | Restores the files for this menu from the settings.
:param settings | <QSettings> | [
"Restores",
"the",
"files",
"for",
"this",
"menu",
"from",
"the",
"settings",
".",
":",
"param",
"settings",
"|",
"<QSettings",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/menus/xrecentfilesmenu.py#L95-L103 | train | Restores the files for this menu from the settings. |
bitesofcode/projexui | projexui/menus/xrecentfilesmenu.py | XRecentFilesMenu.saveSettings | def saveSettings(self, settings):
"""
Saves the files for this menu to the settings.
:param settings | <QSettings>
"""
value = wrapVariant(os.path.pathsep.join(self.filenames()))
settings.setValue('recent_files', value) | python | def saveSettings(self, settings):
"""
Saves the files for this menu to the settings.
:param settings | <QSettings>
"""
value = wrapVariant(os.path.pathsep.join(self.filenames()))
settings.setValue('recent_files', value) | [
"def",
"saveSettings",
"(",
"self",
",",
"settings",
")",
":",
"value",
"=",
"wrapVariant",
"(",
"os",
".",
"path",
".",
"pathsep",
".",
"join",
"(",
"self",
".",
"filenames",
"(",
")",
")",
")",
"settings",
".",
"setValue",
"(",
"'recent_files'",
",",... | Saves the files for this menu to the settings.
:param settings | <QSettings> | [
"Saves",
"the",
"files",
"for",
"this",
"menu",
"to",
"the",
"settings",
".",
":",
"param",
"settings",
"|",
"<QSettings",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/menus/xrecentfilesmenu.py#L105-L112 | train | Saves the files for this menu to the settings. |
bitesofcode/projexui | projexui/menus/xrecentfilesmenu.py | XRecentFilesMenu.setFilenames | def setFilenames( self, filenames ):
"""
Sets the list of filenames that will be used for this menu to the \
inputed list.
:param filenames | [<str>, ..]
"""
mapped = []
for filename in filenames:
filename = nativestring(filename)
... | python | def setFilenames( self, filenames ):
"""
Sets the list of filenames that will be used for this menu to the \
inputed list.
:param filenames | [<str>, ..]
"""
mapped = []
for filename in filenames:
filename = nativestring(filename)
... | [
"def",
"setFilenames",
"(",
"self",
",",
"filenames",
")",
":",
"mapped",
"=",
"[",
"]",
"for",
"filename",
"in",
"filenames",
":",
"filename",
"=",
"nativestring",
"(",
"filename",
")",
"if",
"(",
"not",
"filename",
")",
":",
"continue",
"mapped",
".",
... | Sets the list of filenames that will be used for this menu to the \
inputed list.
:param filenames | [<str>, ..] | [
"Sets",
"the",
"list",
"of",
"filenames",
"that",
"will",
"be",
"used",
"for",
"this",
"menu",
"to",
"the",
"\\",
"inputed",
"list",
".",
":",
"param",
"filenames",
"|",
"[",
"<str",
">",
"..",
"]"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/menus/xrecentfilesmenu.py#L114-L132 | train | Sets the list of filenames that will be used for this menu to the \
inputed list. |
bitesofcode/projexui | projexui/menus/xrecentfilesmenu.py | XRecentFilesMenu.setMaximumLength | def setMaximumLength( self, length ):
"""
Sets the maximum number of files to be cached when loading.
:param length | <int>
"""
self._maximumLength = length
self._filenames = self._filenames[:length]
self.refresh() | python | def setMaximumLength( self, length ):
"""
Sets the maximum number of files to be cached when loading.
:param length | <int>
"""
self._maximumLength = length
self._filenames = self._filenames[:length]
self.refresh() | [
"def",
"setMaximumLength",
"(",
"self",
",",
"length",
")",
":",
"self",
".",
"_maximumLength",
"=",
"length",
"self",
".",
"_filenames",
"=",
"self",
".",
"_filenames",
"[",
":",
"length",
"]",
"self",
".",
"refresh",
"(",
")"
] | Sets the maximum number of files to be cached when loading.
:param length | <int> | [
"Sets",
"the",
"maximum",
"number",
"of",
"files",
"to",
"be",
"cached",
"when",
"loading",
".",
":",
"param",
"length",
"|",
"<int",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/menus/xrecentfilesmenu.py#L134-L142 | train | Sets the maximum number of files to be cached when loading. |
whiteclover/dbpy | db/query/insert.py | InsertQuery.values | def values(self, values):
"""The values for insert ,
it can be a dict row or list tuple row.
"""
if isinstance(values, dict):
l = []
for column in self._columns:
l.append(values[column])
self._values.append(tuple(l))
else:
... | python | def values(self, values):
"""The values for insert ,
it can be a dict row or list tuple row.
"""
if isinstance(values, dict):
l = []
for column in self._columns:
l.append(values[column])
self._values.append(tuple(l))
else:
... | [
"def",
"values",
"(",
"self",
",",
"values",
")",
":",
"if",
"isinstance",
"(",
"values",
",",
"dict",
")",
":",
"l",
"=",
"[",
"]",
"for",
"column",
"in",
"self",
".",
"_columns",
":",
"l",
".",
"append",
"(",
"values",
"[",
"column",
"]",
")",
... | The values for insert ,
it can be a dict row or list tuple row. | [
"The",
"values",
"for",
"insert",
"it",
"can",
"be",
"a",
"dict",
"row",
"or",
"list",
"tuple",
"row",
"."
] | 3d9ce85f55cfb39cced22081e525f79581b26b3a | https://github.com/whiteclover/dbpy/blob/3d9ce85f55cfb39cced22081e525f79581b26b3a/db/query/insert.py#L36-L47 | train | The values for insert a single entry in the table. |
bitesofcode/projexui | projexui/xanimation.py | XObjectAnimation.updateCurrentValue | def updateCurrentValue(self, value):
"""
Implementation of QAbstractAnimation's abstract method, called when
the value is changed internally and is supposed to update the
python object's value.
:param value | <QVariant> || <variant>
"""
try:... | python | def updateCurrentValue(self, value):
"""
Implementation of QAbstractAnimation's abstract method, called when
the value is changed internally and is supposed to update the
python object's value.
:param value | <QVariant> || <variant>
"""
try:... | [
"def",
"updateCurrentValue",
"(",
"self",
",",
"value",
")",
":",
"try",
":",
"method",
"=",
"getattr",
"(",
"self",
".",
"_targetObject",
",",
"self",
".",
"_setter",
")",
"except",
"AttributeError",
":",
"return",
"try",
":",
"method",
"(",
"unwrapVarian... | Implementation of QAbstractAnimation's abstract method, called when
the value is changed internally and is supposed to update the
python object's value.
:param value | <QVariant> || <variant> | [
"Implementation",
"of",
"QAbstractAnimation",
"s",
"abstract",
"method",
"called",
"when",
"the",
"value",
"is",
"changed",
"internally",
"and",
"is",
"supposed",
"to",
"update",
"the",
"python",
"object",
"s",
"value",
".",
":",
"param",
"value",
"|",
"<QVari... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xanimation.py#L48-L64 | train | Updates the current value of the object. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidgetdelegate.py | XTreeWidgetDelegate.createEditor | def createEditor(self, parent, option, index):
"""
Creates a new editor for the given index parented to the inputed widget.
:param parent | <QWidget>
option | <QStyleOption>
index | <QModelIndex>
:return <QWidget... | python | def createEditor(self, parent, option, index):
"""
Creates a new editor for the given index parented to the inputed widget.
:param parent | <QWidget>
option | <QStyleOption>
index | <QModelIndex>
:return <QWidget... | [
"def",
"createEditor",
"(",
"self",
",",
"parent",
",",
"option",
",",
"index",
")",
":",
"if",
"index",
".",
"column",
"(",
")",
"in",
"self",
".",
"_disabledEditingColumns",
":",
"return",
"None",
"editor",
"=",
"super",
"(",
"XTreeWidgetDelegate",
",",
... | Creates a new editor for the given index parented to the inputed widget.
:param parent | <QWidget>
option | <QStyleOption>
index | <QModelIndex>
:return <QWidget> || None | [
"Creates",
"a",
"new",
"editor",
"for",
"the",
"given",
"index",
"parented",
"to",
"the",
"inputed",
"widget",
".",
":",
"param",
"parent",
"|",
"<QWidget",
">",
"option",
"|",
"<QStyleOption",
">",
"index",
"|",
"<QModelIndex",
">",
":",
"return",
"<QWidg... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetdelegate.py#L111-L131 | train | Create a new editor for the given index. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidgetdelegate.py | XTreeWidgetDelegate.drawBackground | def drawBackground( self, painter, opt, rect, brush ):
"""
Make sure the background extends to 0 for the first item.
:param painter | <QtGui.QPainter>
rect | <QtCore.QRect>
brush | <QtGui.QBrush>
"""
if not brush:... | python | def drawBackground( self, painter, opt, rect, brush ):
"""
Make sure the background extends to 0 for the first item.
:param painter | <QtGui.QPainter>
rect | <QtCore.QRect>
brush | <QtGui.QBrush>
"""
if not brush:... | [
"def",
"drawBackground",
"(",
"self",
",",
"painter",
",",
"opt",
",",
"rect",
",",
"brush",
")",
":",
"if",
"not",
"brush",
":",
"return",
"painter",
".",
"setPen",
"(",
"QtCore",
".",
"Qt",
".",
"NoPen",
")",
"painter",
".",
"setBrush",
"(",
"brush... | Make sure the background extends to 0 for the first item.
:param painter | <QtGui.QPainter>
rect | <QtCore.QRect>
brush | <QtGui.QBrush> | [
"Make",
"sure",
"the",
"background",
"extends",
"to",
"0",
"for",
"the",
"first",
"item",
".",
":",
"param",
"painter",
"|",
"<QtGui",
".",
"QPainter",
">",
"rect",
"|",
"<QtCore",
".",
"QRect",
">",
"brush",
"|",
"<QtGui",
".",
"QBrush",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetdelegate.py#L167-L180 | train | Draw the background for the current item. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidgetdelegate.py | XTreeWidgetDelegate.drawCheck | def drawCheck( self, painter, option, rect, state ):
"""
Renders a check indicator within the rectangle based on the inputed \
check state.
:param painter | <QtGui.QPainter>
option | <QtGui.QStyleOptionViewItem>
rect | <QtG... | python | def drawCheck( self, painter, option, rect, state ):
"""
Renders a check indicator within the rectangle based on the inputed \
check state.
:param painter | <QtGui.QPainter>
option | <QtGui.QStyleOptionViewItem>
rect | <QtG... | [
"def",
"drawCheck",
"(",
"self",
",",
"painter",
",",
"option",
",",
"rect",
",",
"state",
")",
":",
"if",
"not",
"self",
".",
"useCheckMaps",
"(",
")",
":",
"return",
"super",
"(",
"XTreeWidgetDelegate",
",",
"self",
")",
".",
"drawCheck",
"(",
"paint... | Renders a check indicator within the rectangle based on the inputed \
check state.
:param painter | <QtGui.QPainter>
option | <QtGui.QStyleOptionViewItem>
rect | <QtGui.QRect>
state | <QtCore.Qt.CheckState> | [
"Renders",
"a",
"check",
"indicator",
"within",
"the",
"rectangle",
"based",
"on",
"the",
"inputed",
"\\",
"check",
"state",
".",
":",
"param",
"painter",
"|",
"<QtGui",
".",
"QPainter",
">",
"option",
"|",
"<QtGui",
".",
"QStyleOptionViewItem",
">",
"rect",... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetdelegate.py#L182-L215 | train | Renders a check indicator within the rectangle. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidgetdelegate.py | XTreeWidgetDelegate.drawDisplay | def drawDisplay(self, painter, option, rect, text):
"""
Overloads the drawDisplay method to render HTML if the rich text \
information is set to true.
:param painter | <QtGui.QPainter>
option | <QtGui.QStyleOptionItem>
rect ... | python | def drawDisplay(self, painter, option, rect, text):
"""
Overloads the drawDisplay method to render HTML if the rich text \
information is set to true.
:param painter | <QtGui.QPainter>
option | <QtGui.QStyleOptionItem>
rect ... | [
"def",
"drawDisplay",
"(",
"self",
",",
"painter",
",",
"option",
",",
"rect",
",",
"text",
")",
":",
"if",
"self",
".",
"showRichText",
"(",
")",
":",
"# create the document\r",
"doc",
"=",
"QtGui",
".",
"QTextDocument",
"(",
")",
"doc",
".",
"setTextWi... | Overloads the drawDisplay method to render HTML if the rich text \
information is set to true.
:param painter | <QtGui.QPainter>
option | <QtGui.QStyleOptionItem>
rect | <QtCore.QRect>
text | <str> | [
"Overloads",
"the",
"drawDisplay",
"method",
"to",
"render",
"HTML",
"if",
"the",
"rich",
"text",
"\\",
"information",
"is",
"set",
"to",
"true",
".",
":",
"param",
"painter",
"|",
"<QtGui",
".",
"QPainter",
">",
"option",
"|",
"<QtGui",
".",
"QStyleOption... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetdelegate.py#L217-L251 | train | Overloads the drawDisplay method to render the text for the current object. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidgetdelegate.py | XTreeWidgetDelegate.drawOverlay | def drawOverlay(self, painter, option, rect, icon):
"""
Draws the overlay pixmap for this item.
:param painter | <QtGui.QPainter>
option | <QtGui.QSylteOptionIndex>
rect | <QtCore.QRect>
pixmap | <QtGui.QIcon>
... | python | def drawOverlay(self, painter, option, rect, icon):
"""
Draws the overlay pixmap for this item.
:param painter | <QtGui.QPainter>
option | <QtGui.QSylteOptionIndex>
rect | <QtCore.QRect>
pixmap | <QtGui.QIcon>
... | [
"def",
"drawOverlay",
"(",
"self",
",",
"painter",
",",
"option",
",",
"rect",
",",
"icon",
")",
":",
"if",
"icon",
"and",
"not",
"icon",
".",
"isNull",
"(",
")",
":",
"painter",
".",
"drawPixmap",
"(",
"rect",
",",
"icon",
".",
"pixmap",
"(",
"rec... | Draws the overlay pixmap for this item.
:param painter | <QtGui.QPainter>
option | <QtGui.QSylteOptionIndex>
rect | <QtCore.QRect>
pixmap | <QtGui.QIcon> | [
"Draws",
"the",
"overlay",
"pixmap",
"for",
"this",
"item",
".",
":",
"param",
"painter",
"|",
"<QtGui",
".",
"QPainter",
">",
"option",
"|",
"<QtGui",
".",
"QSylteOptionIndex",
">",
"rect",
"|",
"<QtCore",
".",
"QRect",
">",
"pixmap",
"|",
"<QtGui",
"."... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetdelegate.py#L253-L263 | train | Draws the overlay for this item. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidgetdelegate.py | XTreeWidgetDelegate.drawGrid | def drawGrid(self, painter, opt, rect, index):
"""
Draws the grid lines for this delegate.
:param painter | <QtGui.QPainter>
opt | <QtGui.QStyleOptionItem>
rect | <QtCore.QRect>
index | <QtGui.QModelIndex>
... | python | def drawGrid(self, painter, opt, rect, index):
"""
Draws the grid lines for this delegate.
:param painter | <QtGui.QPainter>
opt | <QtGui.QStyleOptionItem>
rect | <QtCore.QRect>
index | <QtGui.QModelIndex>
... | [
"def",
"drawGrid",
"(",
"self",
",",
"painter",
",",
"opt",
",",
"rect",
",",
"index",
")",
":",
"if",
"not",
"self",
".",
"showGrid",
"(",
")",
":",
"return",
"painter",
".",
"setBrush",
"(",
"QtCore",
".",
"Qt",
".",
"NoBrush",
")",
"painter",
".... | Draws the grid lines for this delegate.
:param painter | <QtGui.QPainter>
opt | <QtGui.QStyleOptionItem>
rect | <QtCore.QRect>
index | <QtGui.QModelIndex> | [
"Draws",
"the",
"grid",
"lines",
"for",
"this",
"delegate",
".",
":",
"param",
"painter",
"|",
"<QtGui",
".",
"QPainter",
">",
"opt",
"|",
"<QtGui",
".",
"QStyleOptionItem",
">",
"rect",
"|",
"<QtCore",
".",
"QRect",
">",
"index",
"|",
"<QtGui",
".",
"... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetdelegate.py#L265-L299 | train | Draws the grid for this delegate. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidgetdelegate.py | XTreeWidgetDelegate.paint | def paint(self, painter, opt, index):
"""
Overloads the paint method to draw the grid and other options for \
this delegate.
:param painter | <QtGui.QPainter>
opt | <QtGui.QStyleOptionItem>
index | <QtGui.QModelIndex>
... | python | def paint(self, painter, opt, index):
"""
Overloads the paint method to draw the grid and other options for \
this delegate.
:param painter | <QtGui.QPainter>
opt | <QtGui.QStyleOptionItem>
index | <QtGui.QModelIndex>
... | [
"def",
"paint",
"(",
"self",
",",
"painter",
",",
"opt",
",",
"index",
")",
":",
"# prepare the painter\r",
"painter",
".",
"save",
"(",
")",
"painter",
".",
"resetTransform",
"(",
")",
"# extract data from the tree\r",
"tree",
"=",
"self",
".",
"parent",
"(... | Overloads the paint method to draw the grid and other options for \
this delegate.
:param painter | <QtGui.QPainter>
opt | <QtGui.QStyleOptionItem>
index | <QtGui.QModelIndex> | [
"Overloads",
"the",
"paint",
"method",
"to",
"draw",
"the",
"grid",
"and",
"other",
"options",
"for",
"\\",
"this",
"delegate",
".",
":",
"param",
"painter",
"|",
"<QtGui",
".",
"QPainter",
">",
"opt",
"|",
"<QtGui",
".",
"QStyleOptionItem",
">",
"index",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetdelegate.py#L340-L550 | train | Returns the contents of the item in the tree that corresponds to the item at the given index. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidgetdelegate.py | XTreeWidgetDelegate.setBackground | def setBackground(self, column, brush):
"""
Sets the default item foreground brush.
:param column | <int>
brush | <QtGui.QBrush> || None
"""
if brush:
self._background[column] = QtGui.QBrush(brush)
elif column in sel... | python | def setBackground(self, column, brush):
"""
Sets the default item foreground brush.
:param column | <int>
brush | <QtGui.QBrush> || None
"""
if brush:
self._background[column] = QtGui.QBrush(brush)
elif column in sel... | [
"def",
"setBackground",
"(",
"self",
",",
"column",
",",
"brush",
")",
":",
"if",
"brush",
":",
"self",
".",
"_background",
"[",
"column",
"]",
"=",
"QtGui",
".",
"QBrush",
"(",
"brush",
")",
"elif",
"column",
"in",
"self",
".",
"_background",
":",
"... | Sets the default item foreground brush.
:param column | <int>
brush | <QtGui.QBrush> || None | [
"Sets",
"the",
"default",
"item",
"foreground",
"brush",
".",
":",
"param",
"column",
"|",
"<int",
">",
"brush",
"|",
"<QtGui",
".",
"QBrush",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetdelegate.py#L552-L562 | train | Sets the default item foreground brush for the given column. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidgetdelegate.py | XTreeWidgetDelegate.setForeground | def setForeground(self, column, brush):
"""
Sets the default item foreground brush.
:param brush | <QtGui.QBrush> || None
"""
if brush:
self._foreground[column] = QtGui.QBrush(brush)
elif column in self._background:
self._for... | python | def setForeground(self, column, brush):
"""
Sets the default item foreground brush.
:param brush | <QtGui.QBrush> || None
"""
if brush:
self._foreground[column] = QtGui.QBrush(brush)
elif column in self._background:
self._for... | [
"def",
"setForeground",
"(",
"self",
",",
"column",
",",
"brush",
")",
":",
"if",
"brush",
":",
"self",
".",
"_foreground",
"[",
"column",
"]",
"=",
"QtGui",
".",
"QBrush",
"(",
"brush",
")",
"elif",
"column",
"in",
"self",
".",
"_background",
":",
"... | Sets the default item foreground brush.
:param brush | <QtGui.QBrush> || None | [
"Sets",
"the",
"default",
"item",
"foreground",
"brush",
".",
":",
"param",
"brush",
"|",
"<QtGui",
".",
"QBrush",
">",
"||",
"None"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetdelegate.py#L633-L642 | train | Sets the default item foreground brush. |
bitesofcode/projexui | projexui/widgets/xtreewidget/xtreewidgetdelegate.py | XTreeWidgetDelegate.sizeHint | def sizeHint(self, option, index):
"""
Returns the size hint for the inputed index.
:param option | <QStyleOptionViewItem>
index | <QModelIndex>
:return <QtCore.QSize>
"""
size = super(XTreeWidgetDelegate, self).s... | python | def sizeHint(self, option, index):
"""
Returns the size hint for the inputed index.
:param option | <QStyleOptionViewItem>
index | <QModelIndex>
:return <QtCore.QSize>
"""
size = super(XTreeWidgetDelegate, self).s... | [
"def",
"sizeHint",
"(",
"self",
",",
"option",
",",
"index",
")",
":",
"size",
"=",
"super",
"(",
"XTreeWidgetDelegate",
",",
"self",
")",
".",
"sizeHint",
"(",
"option",
",",
"index",
")",
"tree",
"=",
"self",
".",
"parent",
"(",
")",
"item",
"=",
... | Returns the size hint for the inputed index.
:param option | <QStyleOptionViewItem>
index | <QModelIndex>
:return <QtCore.QSize> | [
"Returns",
"the",
"size",
"hint",
"for",
"the",
"inputed",
"index",
".",
":",
"param",
"option",
"|",
"<QStyleOptionViewItem",
">",
"index",
"|",
"<QModelIndex",
">",
":",
"return",
"<QtCore",
".",
"QSize",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xtreewidget/xtreewidgetdelegate.py#L748-L770 | train | Returns the size hint for the inputed index. |
bitesofcode/projexui | projexui/widgets/xmdiarea.py | XMdiArea.addSubWindow | def addSubWindow(self, widget, windowFlags=0):
"""
Creates a new sub window for this widget, specifically
creating an XMdiSubWindow class.
:param widget | <QtGui.QWidget>
windowFlags | <QtCore.Qt.WindowFlags>
:return <XM... | python | def addSubWindow(self, widget, windowFlags=0):
"""
Creates a new sub window for this widget, specifically
creating an XMdiSubWindow class.
:param widget | <QtGui.QWidget>
windowFlags | <QtCore.Qt.WindowFlags>
:return <XM... | [
"def",
"addSubWindow",
"(",
"self",
",",
"widget",
",",
"windowFlags",
"=",
"0",
")",
":",
"if",
"not",
"widget",
":",
"return",
"0",
"childFocus",
"=",
"widget",
".",
"focusWidget",
"(",
")",
"# child is already a sub window\r",
"if",
"not",
"isinstance",
"... | Creates a new sub window for this widget, specifically
creating an XMdiSubWindow class.
:param widget | <QtGui.QWidget>
windowFlags | <QtCore.Qt.WindowFlags>
:return <XMdiSubWindow> | [
"Creates",
"a",
"new",
"sub",
"window",
"for",
"this",
"widget",
"specifically",
"creating",
"an",
"XMdiSubWindow",
"class",
".",
":",
"param",
"widget",
"|",
"<QtGui",
".",
"QWidget",
">",
"windowFlags",
"|",
"<QtCore",
".",
"Qt",
".",
"WindowFlags",
">",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xmdiarea.py#L217-L243 | train | Add a new sub window for this widget. |
bitesofcode/projexui | projexui/widgets/xratingslider.py | XRatingSlider.adjustMinimumWidth | def adjustMinimumWidth( self ):
"""
Modifies the minimum width to factor in the size of the pixmaps and the
number for the maximum.
"""
pw = self.pixmapSize().width()
# allow 1 pixel space between the icons
self.setMinimumWidth(pw * self.maximum()... | python | def adjustMinimumWidth( self ):
"""
Modifies the minimum width to factor in the size of the pixmaps and the
number for the maximum.
"""
pw = self.pixmapSize().width()
# allow 1 pixel space between the icons
self.setMinimumWidth(pw * self.maximum()... | [
"def",
"adjustMinimumWidth",
"(",
"self",
")",
":",
"pw",
"=",
"self",
".",
"pixmapSize",
"(",
")",
".",
"width",
"(",
")",
"# allow 1 pixel space between the icons\r",
"self",
".",
"setMinimumWidth",
"(",
"pw",
"*",
"self",
".",
"maximum",
"(",
")",
"+",
... | Modifies the minimum width to factor in the size of the pixmaps and the
number for the maximum. | [
"Modifies",
"the",
"minimum",
"width",
"to",
"factor",
"in",
"the",
"size",
"of",
"the",
"pixmaps",
"and",
"the",
"number",
"for",
"the",
"maximum",
"."
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xratingslider.py#L44-L52 | train | Adjusts the minimum width of the icon based on the size of the pixmaps and the maximum. |
bitesofcode/projexui | projexui/widgets/xratingslider.py | XRatingSlider.mousePressEvent | def mousePressEvent( self, event ):
"""
Sets the value for the slider at the event position.
:param event | <QMouseEvent>
"""
self.setValue(self.valueAt(event.pos().x())) | python | def mousePressEvent( self, event ):
"""
Sets the value for the slider at the event position.
:param event | <QMouseEvent>
"""
self.setValue(self.valueAt(event.pos().x())) | [
"def",
"mousePressEvent",
"(",
"self",
",",
"event",
")",
":",
"self",
".",
"setValue",
"(",
"self",
".",
"valueAt",
"(",
"event",
".",
"pos",
"(",
")",
".",
"x",
"(",
")",
")",
")"
] | Sets the value for the slider at the event position.
:param event | <QMouseEvent> | [
"Sets",
"the",
"value",
"for",
"the",
"slider",
"at",
"the",
"event",
"position",
".",
":",
"param",
"event",
"|",
"<QMouseEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xratingslider.py#L78-L84 | train | Sets the value for the slider at the given mouse event position. |
bitesofcode/projexui | projexui/widgets/xratingslider.py | XRatingSlider.mouseMoveEvent | def mouseMoveEvent( self, event ):
"""
Sets the value for the slider at the event position.
:param event | <QMouseEvent>
"""
self.setValue(self.valueAt(event.pos().x())) | python | def mouseMoveEvent( self, event ):
"""
Sets the value for the slider at the event position.
:param event | <QMouseEvent>
"""
self.setValue(self.valueAt(event.pos().x())) | [
"def",
"mouseMoveEvent",
"(",
"self",
",",
"event",
")",
":",
"self",
".",
"setValue",
"(",
"self",
".",
"valueAt",
"(",
"event",
".",
"pos",
"(",
")",
".",
"x",
"(",
")",
")",
")"
] | Sets the value for the slider at the event position.
:param event | <QMouseEvent> | [
"Sets",
"the",
"value",
"for",
"the",
"slider",
"at",
"the",
"event",
"position",
".",
":",
"param",
"event",
"|",
"<QMouseEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xratingslider.py#L86-L92 | train | Sets the value for the slider at the event position. |
bitesofcode/projexui | projexui/widgets/xratingslider.py | XRatingSlider.paintEvent | def paintEvent(self, event):
"""
Paints the widget based on its values
:param event | <QPaintEvent>
"""
with XPainter(self) as painter:
count = self.maximum() - self.minimum()
value = self.value()
w ... | python | def paintEvent(self, event):
"""
Paints the widget based on its values
:param event | <QPaintEvent>
"""
with XPainter(self) as painter:
count = self.maximum() - self.minimum()
value = self.value()
w ... | [
"def",
"paintEvent",
"(",
"self",
",",
"event",
")",
":",
"with",
"XPainter",
"(",
"self",
")",
"as",
"painter",
":",
"count",
"=",
"self",
".",
"maximum",
"(",
")",
"-",
"self",
".",
"minimum",
"(",
")",
"value",
"=",
"self",
".",
"value",
"(",
... | Paints the widget based on its values
:param event | <QPaintEvent> | [
"Paints",
"the",
"widget",
"based",
"on",
"its",
"values",
":",
"param",
"event",
"|",
"<QPaintEvent",
">"
] | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xratingslider.py#L94-L119 | train | Paints the widget based on its values |
bitesofcode/projexui | projexui/widgets/xratingslider.py | XRatingSlider.setMaximum | def setMaximum( self, value ):
"""
Sets the maximum value for this slider - this will also adjust the
minimum size value to match the width of the icons by the number for
the maximu.
:param value | <int>
"""
super(XRatingSlider, self).setMaxi... | python | def setMaximum( self, value ):
"""
Sets the maximum value for this slider - this will also adjust the
minimum size value to match the width of the icons by the number for
the maximu.
:param value | <int>
"""
super(XRatingSlider, self).setMaxi... | [
"def",
"setMaximum",
"(",
"self",
",",
"value",
")",
":",
"super",
"(",
"XRatingSlider",
",",
"self",
")",
".",
"setMaximum",
"(",
"value",
")",
"self",
".",
"adjustMinimumWidth",
"(",
")"
] | Sets the maximum value for this slider - this will also adjust the
minimum size value to match the width of the icons by the number for
the maximu.
:param value | <int> | [
"Sets",
"the",
"maximum",
"value",
"for",
"this",
"slider",
"-",
"this",
"will",
"also",
"adjust",
"the",
"minimum",
"size",
"value",
"to",
"match",
"the",
"width",
"of",
"the",
"icons",
"by",
"the",
"number",
"for",
"the",
"maximu",
".",
":",
"param",
... | f18a73bec84df90b034ca69b9deea118dbedfc4d | https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xratingslider.py#L129-L139 | train | Sets the maximum value for this slider. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.