repo
stringlengths
7
55
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
19
28.4k
docstring
stringlengths
1
46.9k
docstring_tokens
listlengths
1
1.97k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
3 values
summary
stringlengths
4
350
bitesofcode/projexui
projexui/widgets/xcalendarwidget/xcalendaritem.py
XCalendarItem.markForRebuild
def markForRebuild( self, state = True ): """ Sets the rebuild state for this item. :param state | <bool> """ self._rebuildRequired = state if ( state ): self.show() self.update()
python
def markForRebuild( self, state = True ): """ Sets the rebuild state for this item. :param state | <bool> """ self._rebuildRequired = state if ( state ): self.show() self.update()
[ "def", "markForRebuild", "(", "self", ",", "state", "=", "True", ")", ":", "self", ".", "_rebuildRequired", "=", "state", "if", "(", "state", ")", ":", "self", ".", "show", "(", ")", "self", ".", "update", "(", ")" ]
Sets the rebuild state for this item. :param state | <bool>
[ "Sets", "the", "rebuild", "state", "for", "this", "item", ".", ":", "param", "state", "|", "<bool", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcalendarwidget/xcalendaritem.py#L193-L202
train
Sets the rebuild state for this item.
bitesofcode/projexui
projexui/widgets/xcalendarwidget/xcalendaritem.py
XCalendarItem.paint
def paint( self, painter, option, widget ): """ Paints this item on the painter. :param painter | <QPainter> option | <QStyleOptionGraphicsItem> widget | <QWidget> """ if ( self._rebuildRequired ): self....
python
def paint( self, painter, option, widget ): """ Paints this item on the painter. :param painter | <QPainter> option | <QStyleOptionGraphicsItem> widget | <QWidget> """ if ( self._rebuildRequired ): self....
[ "def", "paint", "(", "self", ",", "painter", ",", "option", ",", "widget", ")", ":", "if", "(", "self", ".", "_rebuildRequired", ")", ":", "self", ".", "rebuild", "(", ")", "# set the coloring options\r", "painter", ".", "setPen", "(", "self", ".", "bord...
Paints this item on the painter. :param painter | <QPainter> option | <QStyleOptionGraphicsItem> widget | <QWidget>
[ "Paints", "this", "item", "on", "the", "painter", ".", ":", "param", "painter", "|", "<QPainter", ">", "option", "|", "<QStyleOptionGraphicsItem", ">", "widget", "|", "<QWidget", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcalendarwidget/xcalendaritem.py#L204-L238
train
Paints this item on the painter.
bitesofcode/projexui
projexui/widgets/xcalendarwidget/xcalendaritem.py
XCalendarItem.rebuild
def rebuild( self ): """ Rebuilds the current item in the scene. """ self.markForRebuild(False) self._textData = [] if ( self.rebuildBlocked() ): return scene = self.scene() if ( not scene ): ...
python
def rebuild( self ): """ Rebuilds the current item in the scene. """ self.markForRebuild(False) self._textData = [] if ( self.rebuildBlocked() ): return scene = self.scene() if ( not scene ): ...
[ "def", "rebuild", "(", "self", ")", ":", "self", ".", "markForRebuild", "(", "False", ")", "self", ".", "_textData", "=", "[", "]", "if", "(", "self", ".", "rebuildBlocked", "(", ")", ")", ":", "return", "scene", "=", "self", ".", "scene", "(", ")"...
Rebuilds the current item in the scene.
[ "Rebuilds", "the", "current", "item", "in", "the", "scene", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcalendarwidget/xcalendaritem.py#L240-L259
train
Rebuilds the current item in the scene.
bitesofcode/projexui
projexui/widgets/xcalendarwidget/xcalendaritem.py
XCalendarItem.rebuildDay
def rebuildDay( self ): """ Rebuilds the current item in day mode. """ scene = self.scene() if ( not scene ): return # calculate the base information start_date = self.dateStart() end_date = self.dateEnd() min_date...
python
def rebuildDay( self ): """ Rebuilds the current item in day mode. """ scene = self.scene() if ( not scene ): return # calculate the base information start_date = self.dateStart() end_date = self.dateEnd() min_date...
[ "def", "rebuildDay", "(", "self", ")", ":", "scene", "=", "self", ".", "scene", "(", ")", "if", "(", "not", "scene", ")", ":", "return", "# calculate the base information\r", "start_date", "=", "self", ".", "dateStart", "(", ")", "end_date", "=", "self", ...
Rebuilds the current item in day mode.
[ "Rebuilds", "the", "current", "item", "in", "day", "mode", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcalendarwidget/xcalendaritem.py#L261-L334
train
Rebuilds the current item in day mode.
bitesofcode/projexui
projexui/widgets/xcalendarwidget/xcalendaritem.py
XCalendarItem.rebuildMonth
def rebuildMonth( self ): """ Rebuilds the current item in month mode. """ scene = self.scene() if ( not scene ): return start_date = self.dateStart() end_date = self.dateEnd() min_date = scene.minimumDate() m...
python
def rebuildMonth( self ): """ Rebuilds the current item in month mode. """ scene = self.scene() if ( not scene ): return start_date = self.dateStart() end_date = self.dateEnd() min_date = scene.minimumDate() m...
[ "def", "rebuildMonth", "(", "self", ")", ":", "scene", "=", "self", ".", "scene", "(", ")", "if", "(", "not", "scene", ")", ":", "return", "start_date", "=", "self", ".", "dateStart", "(", ")", "end_date", "=", "self", ".", "dateEnd", "(", ")", "mi...
Rebuilds the current item in month mode.
[ "Rebuilds", "the", "current", "item", "in", "month", "mode", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcalendarwidget/xcalendaritem.py#L336-L462
train
Rebuilds the current item in month mode.
bitesofcode/projexui
projexui/widgets/xcalendarwidget/xcalendaritem.py
XCalendarItem.setColor
def setColor( self, color ): """ Convenience method to set the border, fill and highlight colors based on the inputed color. :param color | <QColor> """ # sets the border color as the full value self.setBorderColor(color) #...
python
def setColor( self, color ): """ Convenience method to set the border, fill and highlight colors based on the inputed color. :param color | <QColor> """ # sets the border color as the full value self.setBorderColor(color) #...
[ "def", "setColor", "(", "self", ",", "color", ")", ":", "# sets the border color as the full value\r", "self", ".", "setBorderColor", "(", "color", ")", "# set the highlight color as the color with a 140 % alpha\r", "clr", "=", "QColor", "(", "color", ")", "clr", ".", ...
Convenience method to set the border, fill and highlight colors based on the inputed color. :param color | <QColor>
[ "Convenience", "method", "to", "set", "the", "border", "fill", "and", "highlight", "colors", "based", "on", "the", "inputed", "color", ".", ":", "param", "color", "|", "<QColor", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcalendarwidget/xcalendaritem.py#L482-L500
train
Sets the color of the message based on the inputed color.
bitesofcode/projexui
projexui/widgets/xcalendarwidget/xcalendaritem.py
XCalendarItem.setDateStart
def setDateStart( self, dateStart ): """ Sets the start date for this item. This will automatically push the end date to match the duration for this item. So if the item starts on 1/1/12 and ends on 1/2/12, and the start date is changed to 2/1/12, the end date will change ...
python
def setDateStart( self, dateStart ): """ Sets the start date for this item. This will automatically push the end date to match the duration for this item. So if the item starts on 1/1/12 and ends on 1/2/12, and the start date is changed to 2/1/12, the end date will change ...
[ "def", "setDateStart", "(", "self", ",", "dateStart", ")", ":", "dateStart", "=", "QDate", "(", "dateStart", ")", "duration", "=", "self", ".", "duration", "(", ")", "self", ".", "_dateStart", "=", "dateStart", "self", ".", "_dateEnd", "=", "dateStart", ...
Sets the start date for this item. This will automatically push the end date to match the duration for this item. So if the item starts on 1/1/12 and ends on 1/2/12, and the start date is changed to 2/1/12, the end date will change to 2/2/12. To affect the duration of the item, u...
[ "Sets", "the", "start", "date", "for", "this", "item", ".", "This", "will", "automatically", "push", "the", "end", "date", "to", "match", "the", "duration", "for", "this", "item", ".", "So", "if", "the", "item", "starts", "on", "1", "/", "1", "/", "1...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcalendarwidget/xcalendaritem.py#L536-L551
train
Sets the start date for this item.
bitesofcode/projexui
projexui/widgets/xcalendarwidget/xcalendaritem.py
XCalendarItem.setDateEnd
def setDateEnd( self, dateEnd ): """ Sets the end date for this item. This method will only affect the start date if the end date is set to occur before its start, in which case it will set the start date as the same date. (1 day duration) Otherwise, this method will scal...
python
def setDateEnd( self, dateEnd ): """ Sets the end date for this item. This method will only affect the start date if the end date is set to occur before its start, in which case it will set the start date as the same date. (1 day duration) Otherwise, this method will scal...
[ "def", "setDateEnd", "(", "self", ",", "dateEnd", ")", ":", "dateEnd", "=", "QDate", "(", "dateEnd", ")", "if", "(", "dateEnd", "<", "self", ".", "_dateStart", ")", ":", "self", ".", "_dateStart", "=", "dateEnd", "self", ".", "_dateEnd", "=", "dateEnd"...
Sets the end date for this item. This method will only affect the start date if the end date is set to occur before its start, in which case it will set the start date as the same date. (1 day duration) Otherwise, this method will scale the duration of the event. :param ...
[ "Sets", "the", "end", "date", "for", "this", "item", ".", "This", "method", "will", "only", "affect", "the", "start", "date", "if", "the", "end", "date", "is", "set", "to", "occur", "before", "its", "start", "in", "which", "case", "it", "will", "set", ...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcalendarwidget/xcalendaritem.py#L553-L567
train
Sets the end date for this item.
bitesofcode/projexui
projexui/widgets/xcalendarwidget/xcalendaritem.py
XCalendarItem.setDuration
def setDuration( self, duration ): """ Changes the number of days that this item represents. This will move the end date the appropriate number of days away from the start date. The duration is calculated as the 1 plus the number of days from start to end, so a duration of ...
python
def setDuration( self, duration ): """ Changes the number of days that this item represents. This will move the end date the appropriate number of days away from the start date. The duration is calculated as the 1 plus the number of days from start to end, so a duration of ...
[ "def", "setDuration", "(", "self", ",", "duration", ")", ":", "if", "(", "duration", "<=", "0", ")", ":", "return", "self", ".", "_dateEnd", "=", "self", ".", "_dateStart", ".", "addDays", "(", "duration", "-", "1", ")", "self", ".", "markForRebuild", ...
Changes the number of days that this item represents. This will move the end date the appropriate number of days away from the start date. The duration is calculated as the 1 plus the number of days from start to end, so a duration of 1 will have the same start and end date. The du...
[ "Changes", "the", "number", "of", "days", "that", "this", "item", "represents", ".", "This", "will", "move", "the", "end", "date", "the", "appropriate", "number", "of", "days", "away", "from", "the", "start", "date", ".", "The", "duration", "is", "calculat...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcalendarwidget/xcalendaritem.py#L577-L591
train
Sets the duration of the item.
bitesofcode/projexui
projexui/widgets/xcalendarwidget/xcalendaritem.py
XCalendarItem.setLength
def setLength( self, length ): """ Sets the length of time between the start and end times. The inputed number should represent the number of minutes in between them, and will be automatically rounded to the nearest 15 minutes. :param length | <int> ...
python
def setLength( self, length ): """ Sets the length of time between the start and end times. The inputed number should represent the number of minutes in between them, and will be automatically rounded to the nearest 15 minutes. :param length | <int> ...
[ "def", "setLength", "(", "self", ",", "length", ")", ":", "self", ".", "_timeEnd", "=", "self", ".", "_timeStart", ".", "addSecs", "(", "(", "length", "-", "length", "%", "15", ")", "*", "60", ")", "self", ".", "markForRebuild", "(", ")" ]
Sets the length of time between the start and end times. The inputed number should represent the number of minutes in between them, and will be automatically rounded to the nearest 15 minutes. :param length | <int>
[ "Sets", "the", "length", "of", "time", "between", "the", "start", "and", "end", "times", ".", "The", "inputed", "number", "should", "represent", "the", "number", "of", "minutes", "in", "between", "them", "and", "will", "be", "automatically", "rounded", "to",...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcalendarwidget/xcalendaritem.py#L593-L602
train
Sets the length of the time between the start and end times.
bitesofcode/projexui
projexui/widgets/xcalendarwidget/xcalendaritem.py
XCalendarItem.setTimeEnd
def setTimeEnd( self, timeEnd ): """ Sets the end time for this item. This method will only affect the start time if the end time is set to occur before its start, in which case it will set the start time as 60 minutes before. Otherwise, this method will scale the duration...
python
def setTimeEnd( self, timeEnd ): """ Sets the end time for this item. This method will only affect the start time if the end time is set to occur before its start, in which case it will set the start time as 60 minutes before. Otherwise, this method will scale the duration...
[ "def", "setTimeEnd", "(", "self", ",", "timeEnd", ")", ":", "timeEnd", "=", "QTime", "(", "timeEnd", ")", "if", "(", "timeEnd", "<", "self", ".", "_timeStart", ")", ":", "self", ".", "_timeStart", "=", "timeEnd", ".", "addSecs", "(", "-", "60", "*", ...
Sets the end time for this item. This method will only affect the start time if the end time is set to occur before its start, in which case it will set the start time as 60 minutes before. Otherwise, this method will scale the duration of the event. :param timeEnd |...
[ "Sets", "the", "end", "time", "for", "this", "item", ".", "This", "method", "will", "only", "affect", "the", "start", "time", "if", "the", "end", "time", "is", "set", "to", "occur", "before", "its", "start", "in", "which", "case", "it", "will", "set", ...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcalendarwidget/xcalendaritem.py#L613-L627
train
Sets the end time for this item.
bitesofcode/projexui
projexui/widgets/xcalendarwidget/xcalendaritem.py
XCalendarItem.setTimeStart
def setTimeStart( self, timeStart ): """ Sets the start time for this item. This will automatically push the end time to match the length for this item. So if the item starts at 11a and ends on 1p, and the start time is changed to 12p the end time will change to 2p. To af...
python
def setTimeStart( self, timeStart ): """ Sets the start time for this item. This will automatically push the end time to match the length for this item. So if the item starts at 11a and ends on 1p, and the start time is changed to 12p the end time will change to 2p. To af...
[ "def", "setTimeStart", "(", "self", ",", "timeStart", ")", ":", "timeStart", "=", "QTime", "(", "timeStart", ")", "length", "=", "self", ".", "length", "(", ")", "# in minutes\r", "self", ".", "_timeStart", "=", "timeStart", "self", ".", "_timeEnd", "=", ...
Sets the start time for this item. This will automatically push the end time to match the length for this item. So if the item starts at 11a and ends on 1p, and the start time is changed to 12p the end time will change to 2p. To affect the length of the item, use either setLength...
[ "Sets", "the", "start", "time", "for", "this", "item", ".", "This", "will", "automatically", "push", "the", "end", "time", "to", "match", "the", "length", "for", "this", "item", ".", "So", "if", "the", "item", "starts", "at", "11a", "and", "ends", "on"...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xcalendarwidget/xcalendaritem.py#L629-L644
train
Sets the start time for this item.
bitesofcode/projexui
projexui/wizards/xscaffoldwizard/xscaffoldwizard.py
XScaffoldPropertiesPage.propertyWidgetMap
def propertyWidgetMap(self): """ Returns the mapping for this page between its widgets and its scaffold property. :return {<projex.scaffold.Property>: <QtGui.QWidget>, ..} """ out = {} scaffold = self.scaffold() # initialize...
python
def propertyWidgetMap(self): """ Returns the mapping for this page between its widgets and its scaffold property. :return {<projex.scaffold.Property>: <QtGui.QWidget>, ..} """ out = {} scaffold = self.scaffold() # initialize...
[ "def", "propertyWidgetMap", "(", "self", ")", ":", "out", "=", "{", "}", "scaffold", "=", "self", ".", "scaffold", "(", ")", "# initialize the scaffold properties\r", "for", "widget", "in", "self", ".", "findChildren", "(", "QtGui", ".", "QWidget", ")", ":",...
Returns the mapping for this page between its widgets and its scaffold property. :return {<projex.scaffold.Property>: <QtGui.QWidget>, ..}
[ "Returns", "the", "mapping", "for", "this", "page", "between", "its", "widgets", "and", "its", "scaffold", "property", ".", ":", "return", "{", "<projex", ".", "scaffold", ".", "Property", ">", ":", "<QtGui", ".", "QWidget", ">", "..", "}" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/wizards/xscaffoldwizard/xscaffoldwizard.py#L136-L156
train
Returns the mapping between the widgets and their scaffold properties.
bitesofcode/projexui
projexui/wizards/xscaffoldwizard/xscaffoldwizard.py
XScaffoldPropertiesPage.validatePage
def validatePage(self): """ Validates the page against the scaffold information, setting the values along the way. """ widgets = self.propertyWidgetMap() failed = '' for prop, widget in widgets.items(): val, success = projexui.widgetValue(widge...
python
def validatePage(self): """ Validates the page against the scaffold information, setting the values along the way. """ widgets = self.propertyWidgetMap() failed = '' for prop, widget in widgets.items(): val, success = projexui.widgetValue(widge...
[ "def", "validatePage", "(", "self", ")", ":", "widgets", "=", "self", ".", "propertyWidgetMap", "(", ")", "failed", "=", "''", "for", "prop", ",", "widget", "in", "widgets", ".", "items", "(", ")", ":", "val", ",", "success", "=", "projexui", ".", "w...
Validates the page against the scaffold information, setting the values along the way.
[ "Validates", "the", "page", "against", "the", "scaffold", "information", "setting", "the", "values", "along", "the", "way", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/wizards/xscaffoldwizard/xscaffoldwizard.py#L166-L203
train
Validates the page against the scaffold information setting the ecords values along the way.
bitesofcode/projexui
projexui/wizards/xscaffoldwizard/xscaffoldwizard.py
XScaffoldElementItem.save
def save(self): """ Saves the state for this item to the scaffold. """ enabled = self.checkState(0) == QtCore.Qt.Checked self._element.set('name', nativestring(self.text(0))) self._element.set('enabled', nativestring(enabled)) for child in self.ch...
python
def save(self): """ Saves the state for this item to the scaffold. """ enabled = self.checkState(0) == QtCore.Qt.Checked self._element.set('name', nativestring(self.text(0))) self._element.set('enabled', nativestring(enabled)) for child in self.ch...
[ "def", "save", "(", "self", ")", ":", "enabled", "=", "self", ".", "checkState", "(", "0", ")", "==", "QtCore", ".", "Qt", ".", "Checked", "self", ".", "_element", ".", "set", "(", "'name'", ",", "nativestring", "(", "self", ".", "text", "(", "0", ...
Saves the state for this item to the scaffold.
[ "Saves", "the", "state", "for", "this", "item", "to", "the", "scaffold", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/wizards/xscaffoldwizard/xscaffoldwizard.py#L241-L250
train
Saves the state of this item to the scaffold.
bitesofcode/projexui
projexui/wizards/xscaffoldwizard/xscaffoldwizard.py
XScaffoldElementItem.update
def update(self, enabled=None): """ Updates this item based on the interface. """ if enabled is None: enabled = self.checkState(0) == QtCore.Qt.Checked elif not enabled or self._element.get('enabled', 'True') != 'True': self.setCheckState(0, QtCore....
python
def update(self, enabled=None): """ Updates this item based on the interface. """ if enabled is None: enabled = self.checkState(0) == QtCore.Qt.Checked elif not enabled or self._element.get('enabled', 'True') != 'True': self.setCheckState(0, QtCore....
[ "def", "update", "(", "self", ",", "enabled", "=", "None", ")", ":", "if", "enabled", "is", "None", ":", "enabled", "=", "self", ".", "checkState", "(", "0", ")", "==", "QtCore", ".", "Qt", ".", "Checked", "elif", "not", "enabled", "or", "self", "....
Updates this item based on the interface.
[ "Updates", "this", "item", "based", "on", "the", "interface", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/wizards/xscaffoldwizard/xscaffoldwizard.py#L252-L269
train
Updates this item based on the interface.
bitesofcode/projexui
projexui/wizards/xscaffoldwizard/xscaffoldwizard.py
XScaffoldStructurePage.initializePage
def initializePage(self): """ Initializes the page based on the current structure information. """ tree = self.uiStructureTREE tree.blockSignals(True) tree.setUpdatesEnabled(False) self.uiStructureTREE.clear() xstruct = self.scaffold().structure() ...
python
def initializePage(self): """ Initializes the page based on the current structure information. """ tree = self.uiStructureTREE tree.blockSignals(True) tree.setUpdatesEnabled(False) self.uiStructureTREE.clear() xstruct = self.scaffold().structure() ...
[ "def", "initializePage", "(", "self", ")", ":", "tree", "=", "self", ".", "uiStructureTREE", "tree", ".", "blockSignals", "(", "True", ")", "tree", ".", "setUpdatesEnabled", "(", "False", ")", "self", ".", "uiStructureTREE", ".", "clear", "(", ")", "xstruc...
Initializes the page based on the current structure information.
[ "Initializes", "the", "page", "based", "on", "the", "current", "structure", "information", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/wizards/xscaffoldwizard/xscaffoldwizard.py#L290-L305
train
Initializes the page based on the current structure information.
bitesofcode/projexui
projexui/wizards/xscaffoldwizard/xscaffoldwizard.py
XScaffoldStructurePage.validatePage
def validatePage(self): """ Finishes up the structure information for this wizard by building the scaffold. """ path = self.uiOutputPATH.filepath() for item in self.uiStructureTREE.topLevelItems(): item.save() try: ...
python
def validatePage(self): """ Finishes up the structure information for this wizard by building the scaffold. """ path = self.uiOutputPATH.filepath() for item in self.uiStructureTREE.topLevelItems(): item.save() try: ...
[ "def", "validatePage", "(", "self", ")", ":", "path", "=", "self", ".", "uiOutputPATH", ".", "filepath", "(", ")", "for", "item", "in", "self", ".", "uiStructureTREE", ".", "topLevelItems", "(", ")", ":", "item", ".", "save", "(", ")", "try", ":", "s...
Finishes up the structure information for this wizard by building the scaffold.
[ "Finishes", "up", "the", "structure", "information", "for", "this", "wizard", "by", "building", "the", "scaffold", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/wizards/xscaffoldwizard/xscaffoldwizard.py#L315-L331
train
Validates the structure information for this wizard by building the scaffold.
viatoriche/microservices
examples/http/basic.py
second_params_two
def second_params_two(test, two): """Second resource * POST: return [test, two, request data] * GET: return [test, two] """ if request.method == 'POST': return [test, two, request.data] return {'result': [test, two]}
python
def second_params_two(test, two): """Second resource * POST: return [test, two, request data] * GET: return [test, two] """ if request.method == 'POST': return [test, two, request.data] return {'result': [test, two]}
[ "def", "second_params_two", "(", "test", ",", "two", ")", ":", "if", "request", ".", "method", "==", "'POST'", ":", "return", "[", "test", ",", "two", ",", "request", ".", "data", "]", "return", "{", "'result'", ":", "[", "test", ",", "two", "]", "...
Second resource * POST: return [test, two, request data] * GET: return [test, two]
[ "Second", "resource" ]
3510563edd15dc6131b8a948d6062856cd904ac7
https://github.com/viatoriche/microservices/blob/3510563edd15dc6131b8a948d6062856cd904ac7/examples/http/basic.py#L51-L59
train
Second resource params
bitesofcode/projexui
projexui/widgets/xorbcolumnedit/xorbcolumnedit.py
XOrbColumnEdit.label
def label( self ): """ Returns the label for this widget. Varies per type, not all types have labels. :return <str> """ if ( self._editor and hasattr(self._editor, 'label') ): return self._editor.label() return ''
python
def label( self ): """ Returns the label for this widget. Varies per type, not all types have labels. :return <str> """ if ( self._editor and hasattr(self._editor, 'label') ): return self._editor.label() return ''
[ "def", "label", "(", "self", ")", ":", "if", "(", "self", ".", "_editor", "and", "hasattr", "(", "self", ".", "_editor", ",", "'label'", ")", ")", ":", "return", "self", ".", "_editor", ".", "label", "(", ")", "return", "''" ]
Returns the label for this widget. Varies per type, not all types have labels. :return <str>
[ "Returns", "the", "label", "for", "this", "widget", ".", "Varies", "per", "type", "not", "all", "types", "have", "labels", ".", ":", "return", "<str", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbcolumnedit/xorbcolumnedit.py#L98-L107
train
Returns the label for this widget.
bitesofcode/projexui
projexui/widgets/xorbcolumnedit/xorbcolumnedit.py
XOrbColumnEdit.isReadOnly
def isReadOnly( self ): """ Returns the read only for this widget from the editor. Differs per type, not all types support read only. :param text | <str> """ if ( self._editor and hasattr(self._editor, 'isReadOnly') ): return self._editor.isReadO...
python
def isReadOnly( self ): """ Returns the read only for this widget from the editor. Differs per type, not all types support read only. :param text | <str> """ if ( self._editor and hasattr(self._editor, 'isReadOnly') ): return self._editor.isReadO...
[ "def", "isReadOnly", "(", "self", ")", ":", "if", "(", "self", ".", "_editor", "and", "hasattr", "(", "self", ".", "_editor", ",", "'isReadOnly'", ")", ")", ":", "return", "self", ".", "_editor", ".", "isReadOnly", "(", ")", "return", "False" ]
Returns the read only for this widget from the editor. Differs per type, not all types support read only. :param text | <str>
[ "Returns", "the", "read", "only", "for", "this", "widget", "from", "the", "editor", ".", "Differs", "per", "type", "not", "all", "types", "support", "read", "only", ".", ":", "param", "text", "|", "<str", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbcolumnedit/xorbcolumnedit.py#L109-L118
train
Returns whether this widget is read only.
bitesofcode/projexui
projexui/widgets/xorbcolumnedit/xorbcolumnedit.py
XOrbColumnEdit.rebuild
def rebuild( self ): """ Clears out all the child widgets from this widget and creates the widget that best matches the column properties for this edit. """ plugins.init() self.blockSignals(True) self.setUpdatesEnabled(False) #...
python
def rebuild( self ): """ Clears out all the child widgets from this widget and creates the widget that best matches the column properties for this edit. """ plugins.init() self.blockSignals(True) self.setUpdatesEnabled(False) #...
[ "def", "rebuild", "(", "self", ")", ":", "plugins", ".", "init", "(", ")", "self", ".", "blockSignals", "(", "True", ")", "self", ".", "setUpdatesEnabled", "(", "False", ")", "# clear the old editor\r", "if", "(", "self", ".", "_editor", ")", ":", "self"...
Clears out all the child widgets from this widget and creates the widget that best matches the column properties for this edit.
[ "Clears", "out", "all", "the", "child", "widgets", "from", "this", "widget", "and", "creates", "the", "widget", "that", "best", "matches", "the", "column", "properties", "for", "this", "edit", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbcolumnedit/xorbcolumnedit.py#L120-L144
train
Rebuilds the widget with the most appropriate properties for this edit.
bitesofcode/projexui
projexui/widgets/xorbcolumnedit/xorbcolumnedit.py
XOrbColumnEdit.setColumn
def setColumn( self, column ): """ Sets the column instance for this edit to the given column. :param column | <orb.Column> """ if ( not column ): return self._columnName = column.name() if ( column.columnType() !=...
python
def setColumn( self, column ): """ Sets the column instance for this edit to the given column. :param column | <orb.Column> """ if ( not column ): return self._columnName = column.name() if ( column.columnType() !=...
[ "def", "setColumn", "(", "self", ",", "column", ")", ":", "if", "(", "not", "column", ")", ":", "return", "self", ".", "_columnName", "=", "column", ".", "name", "(", ")", "if", "(", "column", ".", "columnType", "(", ")", "!=", "ColumnType", ".", "...
Sets the column instance for this edit to the given column. :param column | <orb.Column>
[ "Sets", "the", "column", "instance", "for", "this", "edit", "to", "the", "given", "column", ".", ":", "param", "column", "|", "<orb", ".", "Column", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbcolumnedit/xorbcolumnedit.py#L146-L162
train
Sets the column instance for this edit to the given column.
bitesofcode/projexui
projexui/widgets/xorbcolumnedit/xorbcolumnedit.py
XOrbColumnEdit.setColumnType
def setColumnType( self, columnType ): """ Sets the column type for this widget to the inputed type value. This will reset the widget to use one of the plugins for editing the value of the column. :param columnType | <orb.ColumnType> """ if (...
python
def setColumnType( self, columnType ): """ Sets the column type for this widget to the inputed type value. This will reset the widget to use one of the plugins for editing the value of the column. :param columnType | <orb.ColumnType> """ if (...
[ "def", "setColumnType", "(", "self", ",", "columnType", ")", ":", "if", "(", "columnType", "==", "self", ".", "_columnType", ")", ":", "return", "False", "self", ".", "_columnType", "=", "columnType", "self", ".", "rebuild", "(", ")", "return", "True" ]
Sets the column type for this widget to the inputed type value. This will reset the widget to use one of the plugins for editing the value of the column. :param columnType | <orb.ColumnType>
[ "Sets", "the", "column", "type", "for", "this", "widget", "to", "the", "inputed", "type", "value", ".", "This", "will", "reset", "the", "widget", "to", "use", "one", "of", "the", "plugins", "for", "editing", "the", "value", "of", "the", "column", ".", ...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbcolumnedit/xorbcolumnedit.py#L173-L186
train
Sets the column type for this widget to the inputed type value.
bitesofcode/projexui
projexui/widgets/xorbcolumnedit/xorbcolumnedit.py
XOrbColumnEdit.setColumnTypeText
def setColumnTypeText( self, columnTypeText ): """ Sets the column type for this widget based on the inputed text. :param columnTypeText | <str> """ if ( not ColumnType ): return False try: columnType = ColumnType[n...
python
def setColumnTypeText( self, columnTypeText ): """ Sets the column type for this widget based on the inputed text. :param columnTypeText | <str> """ if ( not ColumnType ): return False try: columnType = ColumnType[n...
[ "def", "setColumnTypeText", "(", "self", ",", "columnTypeText", ")", ":", "if", "(", "not", "ColumnType", ")", ":", "return", "False", "try", ":", "columnType", "=", "ColumnType", "[", "nativestring", "(", "columnTypeText", ")", "]", "except", "KeyError", ":...
Sets the column type for this widget based on the inputed text. :param columnTypeText | <str>
[ "Sets", "the", "column", "type", "for", "this", "widget", "based", "on", "the", "inputed", "text", ".", ":", "param", "columnTypeText", "|", "<str", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbcolumnedit/xorbcolumnedit.py#L189-L203
train
Sets the column type for this widget based on the inputed text.
bitesofcode/projexui
projexui/widgets/xorbcolumnedit/xorbcolumnedit.py
XOrbColumnEdit.setLabel
def setLabel( self, text ): """ Sets the label for this widget to the inputed text. Differs per type. :param text | <str> """ if ( self._editor and hasattr(self._editor, 'setLabel') ): self._editor.setLabel(text) return True return F...
python
def setLabel( self, text ): """ Sets the label for this widget to the inputed text. Differs per type. :param text | <str> """ if ( self._editor and hasattr(self._editor, 'setLabel') ): self._editor.setLabel(text) return True return F...
[ "def", "setLabel", "(", "self", ",", "text", ")", ":", "if", "(", "self", ".", "_editor", "and", "hasattr", "(", "self", ".", "_editor", ",", "'setLabel'", ")", ")", ":", "self", ".", "_editor", ".", "setLabel", "(", "text", ")", "return", "True", ...
Sets the label for this widget to the inputed text. Differs per type. :param text | <str>
[ "Sets", "the", "label", "for", "this", "widget", "to", "the", "inputed", "text", ".", "Differs", "per", "type", ".", ":", "param", "text", "|", "<str", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbcolumnedit/xorbcolumnedit.py#L205-L214
train
Sets the label for this widget to the inputed text.
bitesofcode/projexui
projexui/widgets/xorbcolumnedit/xorbcolumnedit.py
XOrbColumnEdit.setReadOnly
def setReadOnly( self, state ): """ Sets the read only for this widget to the inputed state. Differs per type, not all types support read only. :param text | <str> """ if ( self._editor and hasattr(self._editor, 'setReadOnly') ): self._editor.s...
python
def setReadOnly( self, state ): """ Sets the read only for this widget to the inputed state. Differs per type, not all types support read only. :param text | <str> """ if ( self._editor and hasattr(self._editor, 'setReadOnly') ): self._editor.s...
[ "def", "setReadOnly", "(", "self", ",", "state", ")", ":", "if", "(", "self", ".", "_editor", "and", "hasattr", "(", "self", ".", "_editor", ",", "'setReadOnly'", ")", ")", ":", "self", ".", "_editor", ".", "setReadOnly", "(", "state", ")", "return", ...
Sets the read only for this widget to the inputed state. Differs per type, not all types support read only. :param text | <str>
[ "Sets", "the", "read", "only", "for", "this", "widget", "to", "the", "inputed", "state", ".", "Differs", "per", "type", "not", "all", "types", "support", "read", "only", ".", ":", "param", "text", "|", "<str", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbcolumnedit/xorbcolumnedit.py#L216-L226
train
Sets the read only for this widget to the inputed state.
bitesofcode/projexui
projexui/widgets/xorbcolumnedit/xorbcolumnedit.py
XOrbColumnEdit.setValue
def setValue( self, value ): """ Sets the value for this edit to the inputed value. :param value | <variant> """ if ( self._editor ): self._editor.setValue(value) return True return False
python
def setValue( self, value ): """ Sets the value for this edit to the inputed value. :param value | <variant> """ if ( self._editor ): self._editor.setValue(value) return True return False
[ "def", "setValue", "(", "self", ",", "value", ")", ":", "if", "(", "self", ".", "_editor", ")", ":", "self", ".", "_editor", ".", "setValue", "(", "value", ")", "return", "True", "return", "False" ]
Sets the value for this edit to the inputed value. :param value | <variant>
[ "Sets", "the", "value", "for", "this", "edit", "to", "the", "inputed", "value", ".", ":", "param", "value", "|", "<variant", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xorbcolumnedit/xorbcolumnedit.py#L229-L238
train
Sets the value for this edit to the inputed value.
bitesofcode/projexui
projexui/windows/xdkwindow/xdkwindow.py
XdkWindow.addContentsWidget
def addContentsWidget( self ): """ Adds a new contents widget tab into the contents tab. :return <QWebView> """ curr_widget = self.currentContentsWidget() widget = QWebView(self) page = widget.page() page.setLinkDelegationPolicy(page....
python
def addContentsWidget( self ): """ Adds a new contents widget tab into the contents tab. :return <QWebView> """ curr_widget = self.currentContentsWidget() widget = QWebView(self) page = widget.page() page.setLinkDelegationPolicy(page....
[ "def", "addContentsWidget", "(", "self", ")", ":", "curr_widget", "=", "self", ".", "currentContentsWidget", "(", ")", "widget", "=", "QWebView", "(", "self", ")", "page", "=", "widget", ".", "page", "(", ")", "page", ".", "setLinkDelegationPolicy", "(", "...
Adds a new contents widget tab into the contents tab. :return <QWebView>
[ "Adds", "a", "new", "contents", "widget", "tab", "into", "the", "contents", "tab", ".", ":", "return", "<QWebView", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/windows/xdkwindow/xdkwindow.py#L220-L244
train
Adds a new contents widget into the contents tab. Returns the newly added widget.
bitesofcode/projexui
projexui/windows/xdkwindow/xdkwindow.py
XdkWindow.closeContentsWidget
def closeContentsWidget( self ): """ Closes the current contents widget. """ widget = self.currentContentsWidget() if ( not widget ): return widget.close() widget.setParent(None) widget.deleteLater()
python
def closeContentsWidget( self ): """ Closes the current contents widget. """ widget = self.currentContentsWidget() if ( not widget ): return widget.close() widget.setParent(None) widget.deleteLater()
[ "def", "closeContentsWidget", "(", "self", ")", ":", "widget", "=", "self", ".", "currentContentsWidget", "(", ")", "if", "(", "not", "widget", ")", ":", "return", "widget", ".", "close", "(", ")", "widget", ".", "setParent", "(", "None", ")", "widget", ...
Closes the current contents widget.
[ "Closes", "the", "current", "contents", "widget", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/windows/xdkwindow/xdkwindow.py#L246-L256
train
Closes the current contents widget.
bitesofcode/projexui
projexui/windows/xdkwindow/xdkwindow.py
XdkWindow.copyText
def copyText( self ): """ Copies the selected text to the clipboard. """ view = self.currentWebView() QApplication.clipboard().setText(view.page().selectedText())
python
def copyText( self ): """ Copies the selected text to the clipboard. """ view = self.currentWebView() QApplication.clipboard().setText(view.page().selectedText())
[ "def", "copyText", "(", "self", ")", ":", "view", "=", "self", ".", "currentWebView", "(", ")", "QApplication", ".", "clipboard", "(", ")", ".", "setText", "(", "view", ".", "page", "(", ")", ".", "selectedText", "(", ")", ")" ]
Copies the selected text to the clipboard.
[ "Copies", "the", "selected", "text", "to", "the", "clipboard", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/windows/xdkwindow/xdkwindow.py#L258-L263
train
Copies the selected text to the clipboard.
bitesofcode/projexui
projexui/windows/xdkwindow/xdkwindow.py
XdkWindow.currentContentsWidget
def currentContentsWidget( self, autoadd = False ): """ Returns the current contents widget based on the cached index. If \ no widget is specified and autoadd is True, then a new widget will \ be added to the tab. :param autoadd | <bool> :r...
python
def currentContentsWidget( self, autoadd = False ): """ Returns the current contents widget based on the cached index. If \ no widget is specified and autoadd is True, then a new widget will \ be added to the tab. :param autoadd | <bool> :r...
[ "def", "currentContentsWidget", "(", "self", ",", "autoadd", "=", "False", ")", ":", "widget", "=", "self", ".", "uiContentsTAB", ".", "widget", "(", "self", ".", "currentContentsIndex", "(", ")", ")", "if", "(", "not", "isinstance", "(", "widget", ",", ...
Returns the current contents widget based on the cached index. If \ no widget is specified and autoadd is True, then a new widget will \ be added to the tab. :param autoadd | <bool> :return <QWebView>
[ "Returns", "the", "current", "contents", "widget", "based", "on", "the", "cached", "index", ".", "If", "\\", "no", "widget", "is", "specified", "and", "autoadd", "is", "True", "then", "a", "new", "widget", "will", "\\", "be", "added", "to", "the", "tab",...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/windows/xdkwindow/xdkwindow.py#L273-L290
train
Returns the current contents widget based on the cached index.
bitesofcode/projexui
projexui/windows/xdkwindow/xdkwindow.py
XdkWindow.findPrev
def findPrev( self ): """ Looks for the previous occurance of the current search text. """ text = self.uiFindTXT.text() view = self.currentWebView() options = QWebPage.FindWrapsAroundDocument options |= QWebPage.FindBackward if...
python
def findPrev( self ): """ Looks for the previous occurance of the current search text. """ text = self.uiFindTXT.text() view = self.currentWebView() options = QWebPage.FindWrapsAroundDocument options |= QWebPage.FindBackward if...
[ "def", "findPrev", "(", "self", ")", ":", "text", "=", "self", ".", "uiFindTXT", ".", "text", "(", ")", "view", "=", "self", ".", "currentWebView", "(", ")", "options", "=", "QWebPage", ".", "FindWrapsAroundDocument", "options", "|=", "QWebPage", ".", "F...
Looks for the previous occurance of the current search text.
[ "Looks", "for", "the", "previous", "occurance", "of", "the", "current", "search", "text", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/windows/xdkwindow/xdkwindow.py#L322-L335
train
Looks for the previous occurance of the current search text.
bitesofcode/projexui
projexui/windows/xdkwindow/xdkwindow.py
XdkWindow.findXdk
def findXdk( self, name ): """ Looks up the xdk item based on the current name. :param name | <str> :return <XdkItem> || None """ for i in range(self.uiContentsTREE.topLevelItemCount()): item = self.uiContentsTREE.topLevelItem(i) ...
python
def findXdk( self, name ): """ Looks up the xdk item based on the current name. :param name | <str> :return <XdkItem> || None """ for i in range(self.uiContentsTREE.topLevelItemCount()): item = self.uiContentsTREE.topLevelItem(i) ...
[ "def", "findXdk", "(", "self", ",", "name", ")", ":", "for", "i", "in", "range", "(", "self", ".", "uiContentsTREE", ".", "topLevelItemCount", "(", ")", ")", ":", "item", "=", "self", ".", "uiContentsTREE", ".", "topLevelItem", "(", "i", ")", "if", "...
Looks up the xdk item based on the current name. :param name | <str> :return <XdkItem> || None
[ "Looks", "up", "the", "xdk", "item", "based", "on", "the", "current", "name", ".", ":", "param", "name", "|", "<str", ">", ":", "return", "<XdkItem", ">", "||", "None" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/windows/xdkwindow/xdkwindow.py#L337-L349
train
Searches up the xdk item based on the current name.
bitesofcode/projexui
projexui/windows/xdkwindow/xdkwindow.py
XdkWindow.gotoItem
def gotoItem(self, path): """ Goes to a particular path within the XDK. :param path | <str> """ if not path: return sections = nativestring(path).split('/') check = projex.text.underscore(sections[0]) ...
python
def gotoItem(self, path): """ Goes to a particular path within the XDK. :param path | <str> """ if not path: return sections = nativestring(path).split('/') check = projex.text.underscore(sections[0]) ...
[ "def", "gotoItem", "(", "self", ",", "path", ")", ":", "if", "not", "path", ":", "return", "sections", "=", "nativestring", "(", "path", ")", ".", "split", "(", "'/'", ")", "check", "=", "projex", ".", "text", ".", "underscore", "(", "sections", "[",...
Goes to a particular path within the XDK. :param path | <str>
[ "Goes", "to", "a", "particular", "path", "within", "the", "XDK", ".", ":", "param", "path", "|", "<str", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/windows/xdkwindow/xdkwindow.py#L385-L401
train
Goes to a particular path within the XDK.
bitesofcode/projexui
projexui/windows/xdkwindow/xdkwindow.py
XdkWindow.loadedFilenames
def loadedFilenames( self ): """ Returns a list of all the xdk files that are currently loaded. :return [<str>, ..] """ output = [] for i in range(self.uiContentsTREE.topLevelItemCount()): item = self.uiContentsTREE.topLevelItem(i) out...
python
def loadedFilenames( self ): """ Returns a list of all the xdk files that are currently loaded. :return [<str>, ..] """ output = [] for i in range(self.uiContentsTREE.topLevelItemCount()): item = self.uiContentsTREE.topLevelItem(i) out...
[ "def", "loadedFilenames", "(", "self", ")", ":", "output", "=", "[", "]", "for", "i", "in", "range", "(", "self", ".", "uiContentsTREE", ".", "topLevelItemCount", "(", ")", ")", ":", "item", "=", "self", ".", "uiContentsTREE", ".", "topLevelItem", "(", ...
Returns a list of all the xdk files that are currently loaded. :return [<str>, ..]
[ "Returns", "a", "list", "of", "all", "the", "xdk", "files", "that", "are", "currently", "loaded", ".", ":", "return", "[", "<str", ">", "..", "]" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/windows/xdkwindow/xdkwindow.py#L412-L422
train
Returns a list of all the xdk files that are currently loaded.
bitesofcode/projexui
projexui/windows/xdkwindow/xdkwindow.py
XdkWindow.loadFilename
def loadFilename( self, filename = '' ): """ Loads a new XDK file into the system. :param filename | <str> :return <bool> | success """ if ( not (filename and isinstance(filename, basestring)) ): filename = QFileDialog.getOpenFileNam...
python
def loadFilename( self, filename = '' ): """ Loads a new XDK file into the system. :param filename | <str> :return <bool> | success """ if ( not (filename and isinstance(filename, basestring)) ): filename = QFileDialog.getOpenFileNam...
[ "def", "loadFilename", "(", "self", ",", "filename", "=", "''", ")", ":", "if", "(", "not", "(", "filename", "and", "isinstance", "(", "filename", ",", "basestring", ")", ")", ")", ":", "filename", "=", "QFileDialog", ".", "getOpenFileName", "(", "self",...
Loads a new XDK file into the system. :param filename | <str> :return <bool> | success
[ "Loads", "a", "new", "XDK", "file", "into", "the", "system", ".", ":", "param", "filename", "|", "<str", ">", ":", "return", "<bool", ">", "|", "success" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/windows/xdkwindow/xdkwindow.py#L424-L453
train
Loads a new XDK file into the system.
bitesofcode/projexui
projexui/windows/xdkwindow/xdkwindow.py
XdkWindow.refreshFromIndex
def refreshFromIndex( self ): """ Refreshes the documentation from the selected index item. """ item = self.uiIndexTREE.currentItem() if ( not item ): return self.gotoUrl(item.toolTip(0))
python
def refreshFromIndex( self ): """ Refreshes the documentation from the selected index item. """ item = self.uiIndexTREE.currentItem() if ( not item ): return self.gotoUrl(item.toolTip(0))
[ "def", "refreshFromIndex", "(", "self", ")", ":", "item", "=", "self", ".", "uiIndexTREE", ".", "currentItem", "(", ")", "if", "(", "not", "item", ")", ":", "return", "self", ".", "gotoUrl", "(", "item", ".", "toolTip", "(", "0", ")", ")" ]
Refreshes the documentation from the selected index item.
[ "Refreshes", "the", "documentation", "from", "the", "selected", "index", "item", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/windows/xdkwindow/xdkwindow.py#L455-L463
train
Refreshes the documentation from the selected index item.
bitesofcode/projexui
projexui/windows/xdkwindow/xdkwindow.py
XdkWindow.refreshContents
def refreshContents( self ): """ Refreshes the contents tab with the latest selection from the browser. """ item = self.uiContentsTREE.currentItem() if not isinstance(item, XdkEntryItem): return item.load() url = item.url() if url:...
python
def refreshContents( self ): """ Refreshes the contents tab with the latest selection from the browser. """ item = self.uiContentsTREE.currentItem() if not isinstance(item, XdkEntryItem): return item.load() url = item.url() if url:...
[ "def", "refreshContents", "(", "self", ")", ":", "item", "=", "self", ".", "uiContentsTREE", ".", "currentItem", "(", ")", "if", "not", "isinstance", "(", "item", ",", "XdkEntryItem", ")", ":", "return", "item", ".", "load", "(", ")", "url", "=", "item...
Refreshes the contents tab with the latest selection from the browser.
[ "Refreshes", "the", "contents", "tab", "with", "the", "latest", "selection", "from", "the", "browser", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/windows/xdkwindow/xdkwindow.py#L465-L476
train
Refreshes the contents tab with the latest selection from the browser.
bitesofcode/projexui
projexui/windows/xdkwindow/xdkwindow.py
XdkWindow.refreshUi
def refreshUi( self ): """ Refreshes the interface based on the current settings. """ widget = self.uiContentsTAB.currentWidget() is_content = isinstance(widget, QWebView) if is_content: self._currentContentsIndex = self.uiContentsTAB.currentInd...
python
def refreshUi( self ): """ Refreshes the interface based on the current settings. """ widget = self.uiContentsTAB.currentWidget() is_content = isinstance(widget, QWebView) if is_content: self._currentContentsIndex = self.uiContentsTAB.currentInd...
[ "def", "refreshUi", "(", "self", ")", ":", "widget", "=", "self", ".", "uiContentsTAB", ".", "currentWidget", "(", ")", "is_content", "=", "isinstance", "(", "widget", ",", "QWebView", ")", "if", "is_content", ":", "self", ".", "_currentContentsIndex", "=", ...
Refreshes the interface based on the current settings.
[ "Refreshes", "the", "interface", "based", "on", "the", "current", "settings", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/windows/xdkwindow/xdkwindow.py#L478-L501
train
Refreshes the interface based on the current settings.
bitesofcode/projexui
projexui/windows/xdkwindow/xdkwindow.py
XdkWindow.search
def search( self ): """ Looks up the current search terms from the xdk files that are loaded. """ QApplication.instance().setOverrideCursor(Qt.WaitCursor) terms = nativestring(self.uiSearchTXT.text()) html = [] entry_html = '<a h...
python
def search( self ): """ Looks up the current search terms from the xdk files that are loaded. """ QApplication.instance().setOverrideCursor(Qt.WaitCursor) terms = nativestring(self.uiSearchTXT.text()) html = [] entry_html = '<a h...
[ "def", "search", "(", "self", ")", ":", "QApplication", ".", "instance", "(", ")", ".", "setOverrideCursor", "(", "Qt", ".", "WaitCursor", ")", "terms", "=", "nativestring", "(", "self", ".", "uiSearchTXT", ".", "text", "(", ")", ")", "html", "=", "[",...
Looks up the current search terms from the xdk files that are loaded.
[ "Looks", "up", "the", "current", "search", "terms", "from", "the", "xdk", "files", "that", "are", "loaded", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/windows/xdkwindow/xdkwindow.py#L503-L529
train
Search the current set of items.
bitesofcode/projexui
projexui/windows/xdkwindow/xdkwindow.py
XdkWindow.browse
def browse( parent, filename = '' ): """ Creates a new XdkWidnow for browsing an XDK file. :param parent | <QWidget> filename | <str> """ dlg = XdkWindow(parent) dlg.show() if ( filename ): dlg.loadFil...
python
def browse( parent, filename = '' ): """ Creates a new XdkWidnow for browsing an XDK file. :param parent | <QWidget> filename | <str> """ dlg = XdkWindow(parent) dlg.show() if ( filename ): dlg.loadFil...
[ "def", "browse", "(", "parent", ",", "filename", "=", "''", ")", ":", "dlg", "=", "XdkWindow", "(", "parent", ")", "dlg", ".", "show", "(", ")", "if", "(", "filename", ")", ":", "dlg", ".", "loadFilename", "(", "filename", ")" ]
Creates a new XdkWidnow for browsing an XDK file. :param parent | <QWidget> filename | <str>
[ "Creates", "a", "new", "XdkWidnow", "for", "browsing", "an", "XDK", "file", ".", ":", "param", "parent", "|", "<QWidget", ">", "filename", "|", "<str", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/windows/xdkwindow/xdkwindow.py#L552-L563
train
Browsing an XDK file
intelsdi-x/snap-plugin-lib-py
snap_plugin/v1/config_map.py
ConfigMap.clear
def clear(self): "Removes all entries from the config map" self._pb.IntMap.clear() self._pb.StringMap.clear() self._pb.FloatMap.clear() self._pb.BoolMap.clear()
python
def clear(self): "Removes all entries from the config map" self._pb.IntMap.clear() self._pb.StringMap.clear() self._pb.FloatMap.clear() self._pb.BoolMap.clear()
[ "def", "clear", "(", "self", ")", ":", "self", ".", "_pb", ".", "IntMap", ".", "clear", "(", ")", "self", ".", "_pb", ".", "StringMap", ".", "clear", "(", ")", "self", ".", "_pb", ".", "FloatMap", ".", "clear", "(", ")", "self", ".", "_pb", "."...
Removes all entries from the config map
[ "Removes", "all", "entries", "from", "the", "config", "map" ]
8da5d00ac5f9d2b48a7239563ac7788209891ca4
https://github.com/intelsdi-x/snap-plugin-lib-py/blob/8da5d00ac5f9d2b48a7239563ac7788209891ca4/snap_plugin/v1/config_map.py#L129-L134
train
Removes all entries from the config map
intelsdi-x/snap-plugin-lib-py
snap_plugin/v1/config_map.py
ConfigMap.update
def update(self, *args, **kwargs): """Update ConfigMap from mapping/iterable. If the key exists the entry is updated else it is added. Args: *args: variable length argument list. A valid argument is a two item tuple/list. The first item is the key and the second i...
python
def update(self, *args, **kwargs): """Update ConfigMap from mapping/iterable. If the key exists the entry is updated else it is added. Args: *args: variable length argument list. A valid argument is a two item tuple/list. The first item is the key and the second i...
[ "def", "update", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "for", "k", ",", "v", "in", "args", ":", "self", "[", "k", "]", "=", "v", "for", "k", ",", "v", "in", "kwargs", ".", "items", "(", ")", ":", "self", "[", "...
Update ConfigMap from mapping/iterable. If the key exists the entry is updated else it is added. Args: *args: variable length argument list. A valid argument is a two item tuple/list. The first item is the key and the second is the value. **kwargs: Arbitrary k...
[ "Update", "ConfigMap", "from", "mapping", "/", "iterable", "." ]
8da5d00ac5f9d2b48a7239563ac7788209891ca4
https://github.com/intelsdi-x/snap-plugin-lib-py/blob/8da5d00ac5f9d2b48a7239563ac7788209891ca4/snap_plugin/v1/config_map.py#L144-L157
train
Update the ConfigMap from mapping and iterable.
intelsdi-x/snap-plugin-lib-py
snap_plugin/v1/config_map.py
ConfigMap.keys
def keys(self): "Returns a list of ConfigMap keys." return (list(self._pb.IntMap.keys()) + list(self._pb.StringMap.keys()) + list(self._pb.FloatMap.keys()) + list(self._pb.BoolMap.keys()))
python
def keys(self): "Returns a list of ConfigMap keys." return (list(self._pb.IntMap.keys()) + list(self._pb.StringMap.keys()) + list(self._pb.FloatMap.keys()) + list(self._pb.BoolMap.keys()))
[ "def", "keys", "(", "self", ")", ":", "return", "(", "list", "(", "self", ".", "_pb", ".", "IntMap", ".", "keys", "(", ")", ")", "+", "list", "(", "self", ".", "_pb", ".", "StringMap", ".", "keys", "(", ")", ")", "+", "list", "(", "self", "."...
Returns a list of ConfigMap keys.
[ "Returns", "a", "list", "of", "ConfigMap", "keys", "." ]
8da5d00ac5f9d2b48a7239563ac7788209891ca4
https://github.com/intelsdi-x/snap-plugin-lib-py/blob/8da5d00ac5f9d2b48a7239563ac7788209891ca4/snap_plugin/v1/config_map.py#L159-L162
train
Returns a list of ConfigMap keys.
intelsdi-x/snap-plugin-lib-py
snap_plugin/v1/config_map.py
ConfigMap.values
def values(self): "Returns a list of ConfigMap values." return (list(self._pb.IntMap.values()) + list(self._pb.StringMap.values()) + list(self._pb.FloatMap.values()) + list(self._pb.BoolMap.values()))
python
def values(self): "Returns a list of ConfigMap values." return (list(self._pb.IntMap.values()) + list(self._pb.StringMap.values()) + list(self._pb.FloatMap.values()) + list(self._pb.BoolMap.values()))
[ "def", "values", "(", "self", ")", ":", "return", "(", "list", "(", "self", ".", "_pb", ".", "IntMap", ".", "values", "(", ")", ")", "+", "list", "(", "self", ".", "_pb", ".", "StringMap", ".", "values", "(", ")", ")", "+", "list", "(", "self",...
Returns a list of ConfigMap values.
[ "Returns", "a", "list", "of", "ConfigMap", "values", "." ]
8da5d00ac5f9d2b48a7239563ac7788209891ca4
https://github.com/intelsdi-x/snap-plugin-lib-py/blob/8da5d00ac5f9d2b48a7239563ac7788209891ca4/snap_plugin/v1/config_map.py#L164-L167
train
Returns a list of ConfigMap values.
intelsdi-x/snap-plugin-lib-py
snap_plugin/v1/config_map.py
ConfigMap.iteritems
def iteritems(self): "Returns an iterator over the items of ConfigMap." return chain(self._pb.StringMap.items(), self._pb.IntMap.items(), self._pb.FloatMap.items(), self._pb.BoolMap.items())
python
def iteritems(self): "Returns an iterator over the items of ConfigMap." return chain(self._pb.StringMap.items(), self._pb.IntMap.items(), self._pb.FloatMap.items(), self._pb.BoolMap.items())
[ "def", "iteritems", "(", "self", ")", ":", "return", "chain", "(", "self", ".", "_pb", ".", "StringMap", ".", "items", "(", ")", ",", "self", ".", "_pb", ".", "IntMap", ".", "items", "(", ")", ",", "self", ".", "_pb", ".", "FloatMap", ".", "items...
Returns an iterator over the items of ConfigMap.
[ "Returns", "an", "iterator", "over", "the", "items", "of", "ConfigMap", "." ]
8da5d00ac5f9d2b48a7239563ac7788209891ca4
https://github.com/intelsdi-x/snap-plugin-lib-py/blob/8da5d00ac5f9d2b48a7239563ac7788209891ca4/snap_plugin/v1/config_map.py#L169-L174
train
Returns an iterator over the items of ConfigMap.
intelsdi-x/snap-plugin-lib-py
snap_plugin/v1/config_map.py
ConfigMap.itervalues
def itervalues(self): "Returns an iterator over the values of ConfigMap." return chain(self._pb.StringMap.values(), self._pb.IntMap.values(), self._pb.FloatMap.values(), self._pb.BoolMap.values())
python
def itervalues(self): "Returns an iterator over the values of ConfigMap." return chain(self._pb.StringMap.values(), self._pb.IntMap.values(), self._pb.FloatMap.values(), self._pb.BoolMap.values())
[ "def", "itervalues", "(", "self", ")", ":", "return", "chain", "(", "self", ".", "_pb", ".", "StringMap", ".", "values", "(", ")", ",", "self", ".", "_pb", ".", "IntMap", ".", "values", "(", ")", ",", "self", ".", "_pb", ".", "FloatMap", ".", "va...
Returns an iterator over the values of ConfigMap.
[ "Returns", "an", "iterator", "over", "the", "values", "of", "ConfigMap", "." ]
8da5d00ac5f9d2b48a7239563ac7788209891ca4
https://github.com/intelsdi-x/snap-plugin-lib-py/blob/8da5d00ac5f9d2b48a7239563ac7788209891ca4/snap_plugin/v1/config_map.py#L176-L181
train
Returns an iterator over the values of ConfigMap.
intelsdi-x/snap-plugin-lib-py
snap_plugin/v1/config_map.py
ConfigMap.iterkeys
def iterkeys(self): "Returns an iterator over the keys of ConfigMap." return chain(self._pb.StringMap.keys(), self._pb.IntMap.keys(), self._pb.FloatMap.keys(), self._pb.BoolMap.keys())
python
def iterkeys(self): "Returns an iterator over the keys of ConfigMap." return chain(self._pb.StringMap.keys(), self._pb.IntMap.keys(), self._pb.FloatMap.keys(), self._pb.BoolMap.keys())
[ "def", "iterkeys", "(", "self", ")", ":", "return", "chain", "(", "self", ".", "_pb", ".", "StringMap", ".", "keys", "(", ")", ",", "self", ".", "_pb", ".", "IntMap", ".", "keys", "(", ")", ",", "self", ".", "_pb", ".", "FloatMap", ".", "keys", ...
Returns an iterator over the keys of ConfigMap.
[ "Returns", "an", "iterator", "over", "the", "keys", "of", "ConfigMap", "." ]
8da5d00ac5f9d2b48a7239563ac7788209891ca4
https://github.com/intelsdi-x/snap-plugin-lib-py/blob/8da5d00ac5f9d2b48a7239563ac7788209891ca4/snap_plugin/v1/config_map.py#L183-L188
train
Returns an iterator over the keys of ConfigMap.
intelsdi-x/snap-plugin-lib-py
snap_plugin/v1/config_map.py
ConfigMap.items
def items(self): "Returns a list of (key, value) pairs as 2-tuples." return (list(self._pb.IntMap.items()) + list(self._pb.StringMap.items()) + list(self._pb.FloatMap.items()) + list(self._pb.BoolMap.items()))
python
def items(self): "Returns a list of (key, value) pairs as 2-tuples." return (list(self._pb.IntMap.items()) + list(self._pb.StringMap.items()) + list(self._pb.FloatMap.items()) + list(self._pb.BoolMap.items()))
[ "def", "items", "(", "self", ")", ":", "return", "(", "list", "(", "self", ".", "_pb", ".", "IntMap", ".", "items", "(", ")", ")", "+", "list", "(", "self", ".", "_pb", ".", "StringMap", ".", "items", "(", ")", ")", "+", "list", "(", "self", ...
Returns a list of (key, value) pairs as 2-tuples.
[ "Returns", "a", "list", "of", "(", "key", "value", ")", "pairs", "as", "2", "-", "tuples", "." ]
8da5d00ac5f9d2b48a7239563ac7788209891ca4
https://github.com/intelsdi-x/snap-plugin-lib-py/blob/8da5d00ac5f9d2b48a7239563ac7788209891ca4/snap_plugin/v1/config_map.py#L190-L193
train
Returns a list of ( key value ) pairs as 2 - tuples.
intelsdi-x/snap-plugin-lib-py
snap_plugin/v1/config_map.py
ConfigMap.pop
def pop(self, key, default=None): """Remove specified key and return the corresponding value. If key is not found, default is returned if given, otherwise KeyError is raised. """ if key not in self: if default is not None: return default ...
python
def pop(self, key, default=None): """Remove specified key and return the corresponding value. If key is not found, default is returned if given, otherwise KeyError is raised. """ if key not in self: if default is not None: return default ...
[ "def", "pop", "(", "self", ",", "key", ",", "default", "=", "None", ")", ":", "if", "key", "not", "in", "self", ":", "if", "default", "is", "not", "None", ":", "return", "default", "raise", "KeyError", "(", "key", ")", "for", "map", "in", "[", "s...
Remove specified key and return the corresponding value. If key is not found, default is returned if given, otherwise KeyError is raised.
[ "Remove", "specified", "key", "and", "return", "the", "corresponding", "value", ".", "If", "key", "is", "not", "found", "default", "is", "returned", "if", "given", "otherwise", "KeyError", "is", "raised", "." ]
8da5d00ac5f9d2b48a7239563ac7788209891ca4
https://github.com/intelsdi-x/snap-plugin-lib-py/blob/8da5d00ac5f9d2b48a7239563ac7788209891ca4/snap_plugin/v1/config_map.py#L195-L207
train
Removes specified key and return the corresponding value.
bitesofcode/projexui
projexui/xorbworker.py
XOrbWorker.interrupt
def interrupt(self): """ Interrupts the current database from processing. """ if self._database and self._databaseThreadId: # support Orb 2 interruption capabilities try: self._database.interrupt(self._databaseThreadId) except A...
python
def interrupt(self): """ Interrupts the current database from processing. """ if self._database and self._databaseThreadId: # support Orb 2 interruption capabilities try: self._database.interrupt(self._databaseThreadId) except A...
[ "def", "interrupt", "(", "self", ")", ":", "if", "self", ".", "_database", "and", "self", ".", "_databaseThreadId", ":", "# support Orb 2 interruption capabilities\r", "try", ":", "self", ".", "_database", ".", "interrupt", "(", "self", ".", "_databaseThreadId", ...
Interrupts the current database from processing.
[ "Interrupts", "the", "current", "database", "from", "processing", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xorbworker.py#L121-L133
train
Interrupts the current database from processing.
bitesofcode/projexui
projexui/xorbworker.py
XOrbWorker.setDatabase
def setDatabase(self, database): """ Sets the database associated with this thread to the inputed database. :param database | <orb.Database> """ self._database = database if self.thread(): tid = threading.current_thread().ident ...
python
def setDatabase(self, database): """ Sets the database associated with this thread to the inputed database. :param database | <orb.Database> """ self._database = database if self.thread(): tid = threading.current_thread().ident ...
[ "def", "setDatabase", "(", "self", ",", "database", ")", ":", "self", ".", "_database", "=", "database", "if", "self", ".", "thread", "(", ")", ":", "tid", "=", "threading", ".", "current_thread", "(", ")", ".", "ident", "self", ".", "_databaseThreadId",...
Sets the database associated with this thread to the inputed database. :param database | <orb.Database>
[ "Sets", "the", "database", "associated", "with", "this", "thread", "to", "the", "inputed", "database", ".", ":", "param", "database", "|", "<orb", ".", "Database", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xorbworker.py#L135-L144
train
Sets the database associated with this thread to the inputed database.
bitesofcode/projexui
projexui/xorbworker.py
XOrbWorker.waitUntilFinished
def waitUntilFinished(self): """ Processes the main thread until the loading process has finished. This is a way to force the main thread to be synchronous in its execution. """ QtCore.QCoreApplication.processEvents() while self.isLoading(): QtCore.QCo...
python
def waitUntilFinished(self): """ Processes the main thread until the loading process has finished. This is a way to force the main thread to be synchronous in its execution. """ QtCore.QCoreApplication.processEvents() while self.isLoading(): QtCore.QCo...
[ "def", "waitUntilFinished", "(", "self", ")", ":", "QtCore", ".", "QCoreApplication", ".", "processEvents", "(", ")", "while", "self", ".", "isLoading", "(", ")", ":", "QtCore", ".", "QCoreApplication", ".", "processEvents", "(", ")" ]
Processes the main thread until the loading process has finished. This is a way to force the main thread to be synchronous in its execution.
[ "Processes", "the", "main", "thread", "until", "the", "loading", "process", "has", "finished", ".", "This", "is", "a", "way", "to", "force", "the", "main", "thread", "to", "be", "synchronous", "in", "its", "execution", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xorbworker.py#L153-L160
train
Waits until the main thread is finished.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.assignAlignment
def assignAlignment(self, action): """ Sets the current alignment for the editor. """ if self._actions['align_left'] == action: self.setAlignment(Qt.AlignLeft) elif self._actions['align_right'] == action: self.setAlignment(Qt.AlignRight) el...
python
def assignAlignment(self, action): """ Sets the current alignment for the editor. """ if self._actions['align_left'] == action: self.setAlignment(Qt.AlignLeft) elif self._actions['align_right'] == action: self.setAlignment(Qt.AlignRight) el...
[ "def", "assignAlignment", "(", "self", ",", "action", ")", ":", "if", "self", ".", "_actions", "[", "'align_left'", "]", "==", "action", ":", "self", ".", "setAlignment", "(", "Qt", ".", "AlignLeft", ")", "elif", "self", ".", "_actions", "[", "'align_rig...
Sets the current alignment for the editor.
[ "Sets", "the", "current", "alignment", "for", "the", "editor", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L165-L176
train
Assigns the alignment for the given action to the current instance.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.assignFont
def assignFont(self): """ Assigns the font family and point size settings from the font picker widget. """ font = self.currentFont() font.setFamily(self._fontPickerWidget.currentFamily()) font.setPointSize(self._fontPickerWidget.pointSize()) self.s...
python
def assignFont(self): """ Assigns the font family and point size settings from the font picker widget. """ font = self.currentFont() font.setFamily(self._fontPickerWidget.currentFamily()) font.setPointSize(self._fontPickerWidget.pointSize()) self.s...
[ "def", "assignFont", "(", "self", ")", ":", "font", "=", "self", ".", "currentFont", "(", ")", "font", ".", "setFamily", "(", "self", ".", "_fontPickerWidget", ".", "currentFamily", "(", ")", ")", "font", ".", "setPointSize", "(", "self", ".", "_fontPick...
Assigns the font family and point size settings from the font picker widget.
[ "Assigns", "the", "font", "family", "and", "point", "size", "settings", "from", "the", "font", "picker", "widget", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L178-L186
train
Assigns the font family and point size settings from the font picker widget.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.blockSignals
def blockSignals(self, state): """ Propagates the block signals for this editor down to the text editor. :param state | <bool> """ super(XRichTextEdit, self).blockSignals(state) self.uiEditTXT.blockSignals(state)
python
def blockSignals(self, state): """ Propagates the block signals for this editor down to the text editor. :param state | <bool> """ super(XRichTextEdit, self).blockSignals(state) self.uiEditTXT.blockSignals(state)
[ "def", "blockSignals", "(", "self", ",", "state", ")", ":", "super", "(", "XRichTextEdit", ",", "self", ")", ".", "blockSignals", "(", "state", ")", "self", ".", "uiEditTXT", ".", "blockSignals", "(", "state", ")" ]
Propagates the block signals for this editor down to the text editor. :param state | <bool>
[ "Propagates", "the", "block", "signals", "for", "this", "editor", "down", "to", "the", "text", "editor", ".", ":", "param", "state", "|", "<bool", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L188-L196
train
Sets the state of the block signals for this editor down to the text
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.eventFilter
def eventFilter(self, object, event): """ Listens for tab/backtab to modify list information. :param event | <QKeyPressEvent> """ if event.type() != event.KeyPress: return super(XRichTextEdit, self).eventFilter(object, event) cu...
python
def eventFilter(self, object, event): """ Listens for tab/backtab to modify list information. :param event | <QKeyPressEvent> """ if event.type() != event.KeyPress: return super(XRichTextEdit, self).eventFilter(object, event) cu...
[ "def", "eventFilter", "(", "self", ",", "object", ",", "event", ")", ":", "if", "event", ".", "type", "(", ")", "!=", "event", ".", "KeyPress", ":", "return", "super", "(", "XRichTextEdit", ",", "self", ")", ".", "eventFilter", "(", "object", ",", "e...
Listens for tab/backtab to modify list information. :param event | <QKeyPressEvent>
[ "Listens", "for", "tab", "/", "backtab", "to", "modify", "list", "information", ".", ":", "param", "event", "|", "<QKeyPressEvent", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L238-L315
train
Returns True if event should be handled by the appropriate eventFilter method.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.insertOrderedList
def insertOrderedList(self): """ Inserts an ordered list into the editor. """ cursor = self.editor().textCursor() currlist = cursor.currentList() new_style = QTextListFormat.ListDecimal indent = 1 if currlist: format = currli...
python
def insertOrderedList(self): """ Inserts an ordered list into the editor. """ cursor = self.editor().textCursor() currlist = cursor.currentList() new_style = QTextListFormat.ListDecimal indent = 1 if currlist: format = currli...
[ "def", "insertOrderedList", "(", "self", ")", ":", "cursor", "=", "self", ".", "editor", "(", ")", ".", "textCursor", "(", ")", "currlist", "=", "cursor", ".", "currentList", "(", ")", "new_style", "=", "QTextListFormat", ".", "ListDecimal", "indent", "=",...
Inserts an ordered list into the editor.
[ "Inserts", "an", "ordered", "list", "into", "the", "editor", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L374-L402
train
Inserts an ordered list into the editor.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.insertUnorderedList
def insertUnorderedList(self): """ Inserts an ordered list into the editor. """ cursor = self.editor().textCursor() currlist = cursor.currentList() new_style = QTextListFormat.ListDisc indent = 1 if currlist: format = currlis...
python
def insertUnorderedList(self): """ Inserts an ordered list into the editor. """ cursor = self.editor().textCursor() currlist = cursor.currentList() new_style = QTextListFormat.ListDisc indent = 1 if currlist: format = currlis...
[ "def", "insertUnorderedList", "(", "self", ")", ":", "cursor", "=", "self", ".", "editor", "(", ")", ".", "textCursor", "(", ")", "currlist", "=", "cursor", ".", "currentList", "(", ")", "new_style", "=", "QTextListFormat", ".", "ListDisc", "indent", "=", ...
Inserts an ordered list into the editor.
[ "Inserts", "an", "ordered", "list", "into", "the", "editor", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L413-L439
train
Inserts an unordered list into the editor.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.pickTextBackgroundColor
def pickTextBackgroundColor(self): """ Prompts the user to select a text color. """ clr = QColorDialog.getColor(self.textBackgroundColor(), self.window(), 'Pick Background Color') if clr.isVa...
python
def pickTextBackgroundColor(self): """ Prompts the user to select a text color. """ clr = QColorDialog.getColor(self.textBackgroundColor(), self.window(), 'Pick Background Color') if clr.isVa...
[ "def", "pickTextBackgroundColor", "(", "self", ")", ":", "clr", "=", "QColorDialog", ".", "getColor", "(", "self", ".", "textBackgroundColor", "(", ")", ",", "self", ".", "window", "(", ")", ",", "'Pick Background Color'", ")", "if", "clr", ".", "isValid", ...
Prompts the user to select a text color.
[ "Prompts", "the", "user", "to", "select", "a", "text", "color", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L442-L451
train
Prompts the user to select a text color.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.pickTextColor
def pickTextColor(self): """ Prompts the user to select a text color. """ clr = QColorDialog.getColor(self.textColor(), self.window(), 'Pick Text Color') if clr.isValid(): self.s...
python
def pickTextColor(self): """ Prompts the user to select a text color. """ clr = QColorDialog.getColor(self.textColor(), self.window(), 'Pick Text Color') if clr.isValid(): self.s...
[ "def", "pickTextColor", "(", "self", ")", ":", "clr", "=", "QColorDialog", ".", "getColor", "(", "self", ".", "textColor", "(", ")", ",", "self", ".", "window", "(", ")", ",", "'Pick Text Color'", ")", "if", "clr", ".", "isValid", "(", ")", ":", "sel...
Prompts the user to select a text color.
[ "Prompts", "the", "user", "to", "select", "a", "text", "color", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L454-L463
train
Prompts the user to select a text color.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.refreshUi
def refreshUi(self): """ Matches the UI state to the current cursor positioning. """ font = self.currentFont() for name in ('underline', 'bold', 'italic', 'strikeOut'): getter = getattr(font, name) act = self._actions[name] ac...
python
def refreshUi(self): """ Matches the UI state to the current cursor positioning. """ font = self.currentFont() for name in ('underline', 'bold', 'italic', 'strikeOut'): getter = getattr(font, name) act = self._actions[name] ac...
[ "def", "refreshUi", "(", "self", ")", ":", "font", "=", "self", ".", "currentFont", "(", ")", "for", "name", "in", "(", "'underline'", ",", "'bold'", ",", "'italic'", ",", "'strikeOut'", ")", ":", "getter", "=", "getattr", "(", "font", ",", "name", "...
Matches the UI state to the current cursor positioning.
[ "Matches", "the", "UI", "state", "to", "the", "current", "cursor", "positioning", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L465-L476
train
Refreshes the UI for the current cursor positioning.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.refreshAlignmentUi
def refreshAlignmentUi(self): """ Refreshes the alignment UI information. """ align = self.alignment() for name, value in (('align_left', Qt.AlignLeft), ('align_right', Qt.AlignRight), ('align_center', Qt.AlignHCenter...
python
def refreshAlignmentUi(self): """ Refreshes the alignment UI information. """ align = self.alignment() for name, value in (('align_left', Qt.AlignLeft), ('align_right', Qt.AlignRight), ('align_center', Qt.AlignHCenter...
[ "def", "refreshAlignmentUi", "(", "self", ")", ":", "align", "=", "self", ".", "alignment", "(", ")", "for", "name", ",", "value", "in", "(", "(", "'align_left'", ",", "Qt", ".", "AlignLeft", ")", ",", "(", "'align_right'", ",", "Qt", ".", "AlignRight"...
Refreshes the alignment UI information.
[ "Refreshes", "the", "alignment", "UI", "information", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L478-L491
train
Refreshes the alignment UI information.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.setAlignment
def setAlignment(self, align): """ Sets the current alignment for this editor. :param align | <Qt.Align> """ self.blockSignals(True) self.editor().setAlignment(align) self.blockSignals(False) self.refreshAlignmentUi()
python
def setAlignment(self, align): """ Sets the current alignment for this editor. :param align | <Qt.Align> """ self.blockSignals(True) self.editor().setAlignment(align) self.blockSignals(False) self.refreshAlignmentUi()
[ "def", "setAlignment", "(", "self", ",", "align", ")", ":", "self", ".", "blockSignals", "(", "True", ")", "self", ".", "editor", "(", ")", ".", "setAlignment", "(", "align", ")", "self", ".", "blockSignals", "(", "False", ")", "self", ".", "refreshAli...
Sets the current alignment for this editor. :param align | <Qt.Align>
[ "Sets", "the", "current", "alignment", "for", "this", "editor", ".", ":", "param", "align", "|", "<Qt", ".", "Align", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L493-L502
train
Sets the current alignment for this editor.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.setCurrentFont
def setCurrentFont(self, font): """ Sets the current font for the editor to the inputed font. :param font | <QFont> """ self.blockSignals(True) self.editor().setCurrentFont(font) self.blockSignals(False) self.refreshUi()
python
def setCurrentFont(self, font): """ Sets the current font for the editor to the inputed font. :param font | <QFont> """ self.blockSignals(True) self.editor().setCurrentFont(font) self.blockSignals(False) self.refreshUi()
[ "def", "setCurrentFont", "(", "self", ",", "font", ")", ":", "self", ".", "blockSignals", "(", "True", ")", "self", ".", "editor", "(", ")", ".", "setCurrentFont", "(", "font", ")", "self", ".", "blockSignals", "(", "False", ")", "self", ".", "refreshU...
Sets the current font for the editor to the inputed font. :param font | <QFont>
[ "Sets", "the", "current", "font", "for", "the", "editor", "to", "the", "inputed", "font", ".", ":", "param", "font", "|", "<QFont", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L505-L514
train
Sets the current font for the editor.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.setFontBold
def setFontBold(self, state): """ Toggles whether or not the text is currently bold. :param state | <bool> """ if state: weight = QFont.Bold else: weight = QFont.Normal self.setFontWeight(weight)
python
def setFontBold(self, state): """ Toggles whether or not the text is currently bold. :param state | <bool> """ if state: weight = QFont.Bold else: weight = QFont.Normal self.setFontWeight(weight)
[ "def", "setFontBold", "(", "self", ",", "state", ")", ":", "if", "state", ":", "weight", "=", "QFont", ".", "Bold", "else", ":", "weight", "=", "QFont", ".", "Normal", "self", ".", "setFontWeight", "(", "weight", ")" ]
Toggles whether or not the text is currently bold. :param state | <bool>
[ "Toggles", "whether", "or", "not", "the", "text", "is", "currently", "bold", ".", ":", "param", "state", "|", "<bool", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L534-L545
train
Sets the font bold for the current locale.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.setFontFamily
def setFontFamily(self, family): """ Sets the current font family to the inputed family. :param family | <str> """ self.blockSignals(True) self.editor().setFontFamily(family) self.blockSignals(False)
python
def setFontFamily(self, family): """ Sets the current font family to the inputed family. :param family | <str> """ self.blockSignals(True) self.editor().setFontFamily(family) self.blockSignals(False)
[ "def", "setFontFamily", "(", "self", ",", "family", ")", ":", "self", ".", "blockSignals", "(", "True", ")", "self", ".", "editor", "(", ")", ".", "setFontFamily", "(", "family", ")", "self", ".", "blockSignals", "(", "False", ")" ]
Sets the current font family to the inputed family. :param family | <str>
[ "Sets", "the", "current", "font", "family", "to", "the", "inputed", "family", ".", ":", "param", "family", "|", "<str", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L548-L556
train
Sets the current font family to the inputed family.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.setFontItalic
def setFontItalic(self, state): """ Toggles whehter or not the text is currently italic. :param state | <bool> """ font = self.currentFont() font.setItalic(state) self.setCurrentFont(font)
python
def setFontItalic(self, state): """ Toggles whehter or not the text is currently italic. :param state | <bool> """ font = self.currentFont() font.setItalic(state) self.setCurrentFont(font)
[ "def", "setFontItalic", "(", "self", ",", "state", ")", ":", "font", "=", "self", ".", "currentFont", "(", ")", "font", ".", "setItalic", "(", "state", ")", "self", ".", "setCurrentFont", "(", "font", ")" ]
Toggles whehter or not the text is currently italic. :param state | <bool>
[ "Toggles", "whehter", "or", "not", "the", "text", "is", "currently", "italic", ".", ":", "param", "state", "|", "<bool", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L559-L567
train
Sets the font italic or not.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.setFontPointSize
def setFontPointSize(self, size): """ Sets the point size of the current font to the inputed size. :param size | <int> """ self.blockSignals(True) self.editor().setFontPointSize(size) self.blockSignals(False)
python
def setFontPointSize(self, size): """ Sets the point size of the current font to the inputed size. :param size | <int> """ self.blockSignals(True) self.editor().setFontPointSize(size) self.blockSignals(False)
[ "def", "setFontPointSize", "(", "self", ",", "size", ")", ":", "self", ".", "blockSignals", "(", "True", ")", "self", ".", "editor", "(", ")", ".", "setFontPointSize", "(", "size", ")", "self", ".", "blockSignals", "(", "False", ")" ]
Sets the point size of the current font to the inputed size. :param size | <int>
[ "Sets", "the", "point", "size", "of", "the", "current", "font", "to", "the", "inputed", "size", ".", ":", "param", "size", "|", "<int", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L570-L578
train
Sets the point size of the current font.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.setFontStrikeOut
def setFontStrikeOut(self, strikeOut): """ Sets whether or not this editor is currently striking out the text. :param strikeOut | <bool> """ font = self.currentFont() font.setStrikeOut(strikeOut) self.setCurrentFont(font)
python
def setFontStrikeOut(self, strikeOut): """ Sets whether or not this editor is currently striking out the text. :param strikeOut | <bool> """ font = self.currentFont() font.setStrikeOut(strikeOut) self.setCurrentFont(font)
[ "def", "setFontStrikeOut", "(", "self", ",", "strikeOut", ")", ":", "font", "=", "self", ".", "currentFont", "(", ")", "font", ".", "setStrikeOut", "(", "strikeOut", ")", "self", ".", "setCurrentFont", "(", "font", ")" ]
Sets whether or not this editor is currently striking out the text. :param strikeOut | <bool>
[ "Sets", "whether", "or", "not", "this", "editor", "is", "currently", "striking", "out", "the", "text", ".", ":", "param", "strikeOut", "|", "<bool", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L581-L589
train
Sets whether or not this editor is currently striking out the text.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.setFontUnderline
def setFontUnderline(self, state): """ Sets whether or not this editor is currently in underline state. :param state | <bool> """ font = self.currentFont() font.setUnderline(state) self.setCurrentFont(font)
python
def setFontUnderline(self, state): """ Sets whether or not this editor is currently in underline state. :param state | <bool> """ font = self.currentFont() font.setUnderline(state) self.setCurrentFont(font)
[ "def", "setFontUnderline", "(", "self", ",", "state", ")", ":", "font", "=", "self", ".", "currentFont", "(", ")", "font", ".", "setUnderline", "(", "state", ")", "self", ".", "setCurrentFont", "(", "font", ")" ]
Sets whether or not this editor is currently in underline state. :param state | <bool>
[ "Sets", "whether", "or", "not", "this", "editor", "is", "currently", "in", "underline", "state", ".", ":", "param", "state", "|", "<bool", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L592-L600
train
Sets whether or not this editor is currently underlined.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.setFontWeight
def setFontWeight(self, weight): """ Sets the font weight for this editor to the inputed weight. :param weight | <QFont.Weight> """ font = self.currentFont() font.setWeight(weight) self.setCurrentFont(font)
python
def setFontWeight(self, weight): """ Sets the font weight for this editor to the inputed weight. :param weight | <QFont.Weight> """ font = self.currentFont() font.setWeight(weight) self.setCurrentFont(font)
[ "def", "setFontWeight", "(", "self", ",", "weight", ")", ":", "font", "=", "self", ".", "currentFont", "(", ")", "font", ".", "setWeight", "(", "weight", ")", "self", ".", "setCurrentFont", "(", "font", ")" ]
Sets the font weight for this editor to the inputed weight. :param weight | <QFont.Weight>
[ "Sets", "the", "font", "weight", "for", "this", "editor", "to", "the", "inputed", "weight", ".", ":", "param", "weight", "|", "<QFont", ".", "Weight", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L603-L611
train
Sets the font weight for this editor to the inputed weight.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.toDiv
def toDiv(self, style='document'): """ Returns the text as paragaphed HTML vs. a full HTML document page. :return <str> """ if not self.editor().toPlainText(): return '' html = self.editor().document().toHtml(self.encoding()) ...
python
def toDiv(self, style='document'): """ Returns the text as paragaphed HTML vs. a full HTML document page. :return <str> """ if not self.editor().toPlainText(): return '' html = self.editor().document().toHtml(self.encoding()) ...
[ "def", "toDiv", "(", "self", ",", "style", "=", "'document'", ")", ":", "if", "not", "self", ".", "editor", "(", ")", ".", "toPlainText", "(", ")", ":", "return", "''", "html", "=", "self", ".", "editor", "(", ")", ".", "document", "(", ")", ".",...
Returns the text as paragaphed HTML vs. a full HTML document page. :return <str>
[ "Returns", "the", "text", "as", "paragaphed", "HTML", "vs", ".", "a", "full", "HTML", "document", "page", ".", ":", "return", "<str", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L656-L688
train
Returns the text as paragaphed HTML vs. a full HTML document page.
bitesofcode/projexui
projexui/widgets/xrichtextedit/xrichtextedit.py
XRichTextEdit.updateFontPicker
def updateFontPicker(self): """ Updates the font picker widget to the current font settings. """ font = self.currentFont() self._fontPickerWidget.setPointSize(font.pointSize()) self._fontPickerWidget.setCurrentFamily(font.family())
python
def updateFontPicker(self): """ Updates the font picker widget to the current font settings. """ font = self.currentFont() self._fontPickerWidget.setPointSize(font.pointSize()) self._fontPickerWidget.setCurrentFamily(font.family())
[ "def", "updateFontPicker", "(", "self", ")", ":", "font", "=", "self", ".", "currentFont", "(", ")", "self", ".", "_fontPickerWidget", ".", "setPointSize", "(", "font", ".", "pointSize", "(", ")", ")", "self", ".", "_fontPickerWidget", ".", "setCurrentFamily...
Updates the font picker widget to the current font settings.
[ "Updates", "the", "font", "picker", "widget", "to", "the", "current", "font", "settings", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xrichtextedit/xrichtextedit.py#L708-L714
train
Updates the font picker widget to the current font settings.
bitesofcode/projexui
projexui/xapplication.py
XApplication.exec_
def exec_(self): """ Runs the main application for this instance and returns the success value. :return <int> """ # create the tray icon if self.autoCreateTrayIcon() and not self.trayIcon(): try: window = self.top...
python
def exec_(self): """ Runs the main application for this instance and returns the success value. :return <int> """ # create the tray icon if self.autoCreateTrayIcon() and not self.trayIcon(): try: window = self.top...
[ "def", "exec_", "(", "self", ")", ":", "# create the tray icon\r", "if", "self", ".", "autoCreateTrayIcon", "(", ")", "and", "not", "self", ".", "trayIcon", "(", ")", ":", "try", ":", "window", "=", "self", ".", "topLevelWindows", "(", ")", "[", "0", "...
Runs the main application for this instance and returns the success value. :return <int>
[ "Runs", "the", "main", "application", "for", "this", "instance", "and", "returns", "the", "success", "value", ".", ":", "return", "<int", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xapplication.py#L93-L131
train
Runs the main application for this instance and returns the success value.
bitesofcode/projexui
projexui/xapplication.py
XApplication.findWalkthrough
def findWalkthrough(self, name): """ Looks up the walkthrough based on the given name. :param name | <str> """ for walkthrough in self._walkthroughs: if walkthrough.name() == name: return walkthrough return None
python
def findWalkthrough(self, name): """ Looks up the walkthrough based on the given name. :param name | <str> """ for walkthrough in self._walkthroughs: if walkthrough.name() == name: return walkthrough return None
[ "def", "findWalkthrough", "(", "self", ",", "name", ")", ":", "for", "walkthrough", "in", "self", ".", "_walkthroughs", ":", "if", "walkthrough", ".", "name", "(", ")", "==", "name", ":", "return", "walkthrough", "return", "None" ]
Looks up the walkthrough based on the given name. :param name | <str>
[ "Looks", "up", "the", "walkthrough", "based", "on", "the", "given", "name", ".", ":", "param", "name", "|", "<str", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xapplication.py#L133-L142
train
Returns the first walkthrough with the given name or None if no walkthrough exists.
bitesofcode/projexui
projexui/xapplication.py
XApplication.registerTopLevelWindow
def registerTopLevelWindow(self, window): """ Registers a top level window for this application. :param window | <QtGui.QMainWindow> """ # set the main window for this instance if not self._topLevelWindows: self.setPalette(window.palette(...
python
def registerTopLevelWindow(self, window): """ Registers a top level window for this application. :param window | <QtGui.QMainWindow> """ # set the main window for this instance if not self._topLevelWindows: self.setPalette(window.palette(...
[ "def", "registerTopLevelWindow", "(", "self", ",", "window", ")", ":", "# set the main window for this instance\r", "if", "not", "self", ".", "_topLevelWindows", ":", "self", ".", "setPalette", "(", "window", ".", "palette", "(", ")", ")", "self", ".", "setWindo...
Registers a top level window for this application. :param window | <QtGui.QMainWindow>
[ "Registers", "a", "top", "level", "window", "for", "this", "application", ".", ":", "param", "window", "|", "<QtGui", ".", "QMainWindow", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xapplication.py#L199-L213
train
Registers a top level window for this application.
bitesofcode/projexui
projexui/xapplication.py
XApplication.registerWalkthrough
def registerWalkthrough(self, walkthrough): """ Registers the inputed walkthrough to the system. :param walkthrough | <XWalkthrough> """ if not walkthrough in self._walkthroughs: self._walkthroughs.append(walkthrough)
python
def registerWalkthrough(self, walkthrough): """ Registers the inputed walkthrough to the system. :param walkthrough | <XWalkthrough> """ if not walkthrough in self._walkthroughs: self._walkthroughs.append(walkthrough)
[ "def", "registerWalkthrough", "(", "self", ",", "walkthrough", ")", ":", "if", "not", "walkthrough", "in", "self", ".", "_walkthroughs", ":", "self", ".", "_walkthroughs", ".", "append", "(", "walkthrough", ")" ]
Registers the inputed walkthrough to the system. :param walkthrough | <XWalkthrough>
[ "Registers", "the", "inputed", "walkthrough", "to", "the", "system", ".", ":", "param", "walkthrough", "|", "<XWalkthrough", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xapplication.py#L215-L222
train
Registers the inputed walkthrough to the system.
bitesofcode/projexui
projexui/xapplication.py
XApplication.setupSplash
def setupSplash(self, pixmap, align=None, color='white', cls=None): """ Sets up a splash screen for the application for the given pixmap. :param pixmap | <QtGui.QPixmap> align | <QtCore.Qt.Alignment> color | <QtGui.QColor> ...
python
def setupSplash(self, pixmap, align=None, color='white', cls=None): """ Sets up a splash screen for the application for the given pixmap. :param pixmap | <QtGui.QPixmap> align | <QtCore.Qt.Alignment> color | <QtGui.QColor> ...
[ "def", "setupSplash", "(", "self", ",", "pixmap", ",", "align", "=", "None", ",", "color", "=", "'white'", ",", "cls", "=", "None", ")", ":", "if", "cls", "is", "None", ":", "cls", "=", "XLoggerSplashScreen", "if", "align", "is", "None", ":", "align"...
Sets up a splash screen for the application for the given pixmap. :param pixmap | <QtGui.QPixmap> align | <QtCore.Qt.Alignment> color | <QtGui.QColor> cls | <subclass of QtGui.QSplashScreen> :return <QtGui...
[ "Sets", "up", "a", "splash", "screen", "for", "the", "application", "for", "the", "given", "pixmap", ".", ":", "param", "pixmap", "|", "<QtGui", ".", "QPixmap", ">", "align", "|", "<QtCore", ".", "Qt", ".", "Alignment", ">", "color", "|", "<QtGui", "."...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xapplication.py#L236-L260
train
Sets up a splash screen for the application for the given pixmap.
bitesofcode/projexui
projexui/xapplication.py
XApplication.setStoragePath
def setStoragePath(self, location, path): """ Returns the path associated with this application and user for the given location. :param location | <QtGui.QDesktopServices.StandardLocation> path | <str> || None :return <str> ...
python
def setStoragePath(self, location, path): """ Returns the path associated with this application and user for the given location. :param location | <QtGui.QDesktopServices.StandardLocation> path | <str> || None :return <str> ...
[ "def", "setStoragePath", "(", "self", ",", "location", ",", "path", ")", ":", "if", "not", "path", ":", "self", ".", "_storagePaths", ".", "pop", "(", "location", ",", "None", ")", "else", ":", "self", ".", "_storagePaths", "[", "location", "]", "=", ...
Returns the path associated with this application and user for the given location. :param location | <QtGui.QDesktopServices.StandardLocation> path | <str> || None :return <str>
[ "Returns", "the", "path", "associated", "with", "this", "application", "and", "user", "for", "the", "given", "location", ".", ":", "param", "location", "|", "<QtGui", ".", "QDesktopServices", ".", "StandardLocation", ">", "path", "|", "<str", ">", "||", "Non...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xapplication.py#L359-L372
train
Sets the path associated with this application and user for the given location.
bitesofcode/projexui
projexui/xapplication.py
XApplication.showMessage
def showMessage(self, title, message, icon=QtGui.QSystemTrayIcon.Information, timeout=10000): """ Displays a message to the user via the tray icon. :param title | <str> me...
python
def showMessage(self, title, message, icon=QtGui.QSystemTrayIcon.Information, timeout=10000): """ Displays a message to the user via the tray icon. :param title | <str> me...
[ "def", "showMessage", "(", "self", ",", "title", ",", "message", ",", "icon", "=", "QtGui", ".", "QSystemTrayIcon", ".", "Information", ",", "timeout", "=", "10000", ")", ":", "tray", "=", "self", ".", "trayIcon", "(", ")", "if", "tray", ":", "tray", ...
Displays a message to the user via the tray icon. :param title | <str> message | <str> icon | <QtGui.QSystemTrayIcon.MessageIcon> timeout | <int>
[ "Displays", "a", "message", "to", "the", "user", "via", "the", "tray", "icon", ".", ":", "param", "title", "|", "<str", ">", "message", "|", "<str", ">", "icon", "|", "<QtGui", ".", "QSystemTrayIcon", ".", "MessageIcon", ">", "timeout", "|", "<int", ">...
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xapplication.py#L390-L405
train
Show a message to the user via the tray icon.
bitesofcode/projexui
projexui/xapplication.py
XApplication.showWalkthrough
def showWalkthrough(self, walkthrough, force=False): """ Emits the walkthroughRequested signal to display the given walkthrough information. This can be either a string name for a standard walkthrough, or an actual walkthrough instance. :param walkthrough | ...
python
def showWalkthrough(self, walkthrough, force=False): """ Emits the walkthroughRequested signal to display the given walkthrough information. This can be either a string name for a standard walkthrough, or an actual walkthrough instance. :param walkthrough | ...
[ "def", "showWalkthrough", "(", "self", ",", "walkthrough", ",", "force", "=", "False", ")", ":", "if", "type", "(", "walkthrough", ")", "in", "(", "str", ",", "unicode", ")", ":", "walkthrough", "=", "self", ".", "findWalkthrough", "(", "walkthrough", ")...
Emits the walkthroughRequested signal to display the given walkthrough information. This can be either a string name for a standard walkthrough, or an actual walkthrough instance. :param walkthrough | <str> || <XWalkthrough>
[ "Emits", "the", "walkthroughRequested", "signal", "to", "display", "the", "given", "walkthrough", "information", ".", "This", "can", "be", "either", "a", "string", "name", "for", "a", "standard", "walkthrough", "or", "an", "actual", "walkthrough", "instance", "....
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xapplication.py#L407-L419
train
Emits the walkthroughRequested signal to display the given walkthrough information.
bitesofcode/projexui
projexui/xapplication.py
XApplication.storagePath
def storagePath(self, location): """ Returns the path associated with this application and user for the given location. :param location | <QtGui.QDesktopServices.StandardLocation> :return <str> """ default = nativestring(QtGui.Q...
python
def storagePath(self, location): """ Returns the path associated with this application and user for the given location. :param location | <QtGui.QDesktopServices.StandardLocation> :return <str> """ default = nativestring(QtGui.Q...
[ "def", "storagePath", "(", "self", ",", "location", ")", ":", "default", "=", "nativestring", "(", "QtGui", ".", "QDesktopServices", ".", "storageLocation", "(", "location", ")", ")", "return", "self", ".", "_storagePaths", ".", "get", "(", "location", ",", ...
Returns the path associated with this application and user for the given location. :param location | <QtGui.QDesktopServices.StandardLocation> :return <str>
[ "Returns", "the", "path", "associated", "with", "this", "application", "and", "user", "for", "the", "given", "location", ".", ":", "param", "location", "|", "<QtGui", ".", "QDesktopServices", ".", "StandardLocation", ">", ":", "return", "<str", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xapplication.py#L436-L446
train
Returns the path associated with this application and user for the given location.
bitesofcode/projexui
projexui/xapplication.py
XApplication.systemSettings
def systemSettings(self): """ Returns the settings associated with this application for all users. :return <projexui.xsettings.XSettings> """ if not self._systemSettings: if self.isCompiled(): settings = QtCore.QSettings(XSettings....
python
def systemSettings(self): """ Returns the settings associated with this application for all users. :return <projexui.xsettings.XSettings> """ if not self._systemSettings: if self.isCompiled(): settings = QtCore.QSettings(XSettings....
[ "def", "systemSettings", "(", "self", ")", ":", "if", "not", "self", ".", "_systemSettings", ":", "if", "self", ".", "isCompiled", "(", ")", ":", "settings", "=", "QtCore", ".", "QSettings", "(", "XSettings", ".", "IniFormat", ",", "XSettings", ".", "Sys...
Returns the settings associated with this application for all users. :return <projexui.xsettings.XSettings>
[ "Returns", "the", "settings", "associated", "with", "this", "application", "for", "all", "users", ".", ":", "return", "<projexui", ".", "xsettings", ".", "XSettings", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xapplication.py#L448-L473
train
Returns the system settings for this application for all users.
bitesofcode/projexui
projexui/xapplication.py
XApplication.topLevelWindows
def topLevelWindows(self): """ Returns a list of the top level windows for this application. :return [<QtGui.QMainWindow>, ..] """ out = [] clean = [] for ref in self._topLevelWindows: window = ref() if window is not ...
python
def topLevelWindows(self): """ Returns a list of the top level windows for this application. :return [<QtGui.QMainWindow>, ..] """ out = [] clean = [] for ref in self._topLevelWindows: window = ref() if window is not ...
[ "def", "topLevelWindows", "(", "self", ")", ":", "out", "=", "[", "]", "clean", "=", "[", "]", "for", "ref", "in", "self", ".", "_topLevelWindows", ":", "window", "=", "ref", "(", ")", "if", "window", "is", "not", "None", ":", "clean", ".", "append...
Returns a list of the top level windows for this application. :return [<QtGui.QMainWindow>, ..]
[ "Returns", "a", "list", "of", "the", "top", "level", "windows", "for", "this", "application", ".", ":", "return", "[", "<QtGui", ".", "QMainWindow", ">", "..", "]" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xapplication.py#L475-L490
train
Returns a list of all top level windows for this application.
bitesofcode/projexui
projexui/xapplication.py
XApplication.unregisterWalkthrough
def unregisterWalkthrough(self, walkthrough): """ Unregisters the inputed walkthrough from the application walkthroug list. :param walkthrough | <XWalkthrough> """ if type(walkthrough) in (str, unicode): walkthrough = self.findWalkthrough...
python
def unregisterWalkthrough(self, walkthrough): """ Unregisters the inputed walkthrough from the application walkthroug list. :param walkthrough | <XWalkthrough> """ if type(walkthrough) in (str, unicode): walkthrough = self.findWalkthrough...
[ "def", "unregisterWalkthrough", "(", "self", ",", "walkthrough", ")", ":", "if", "type", "(", "walkthrough", ")", "in", "(", "str", ",", "unicode", ")", ":", "walkthrough", "=", "self", ".", "findWalkthrough", "(", "walkthrough", ")", "try", ":", "self", ...
Unregisters the inputed walkthrough from the application walkthroug list. :param walkthrough | <XWalkthrough>
[ "Unregisters", "the", "inputed", "walkthrough", "from", "the", "application", "walkthroug", "list", ".", ":", "param", "walkthrough", "|", "<XWalkthrough", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xapplication.py#L492-L505
train
Unregisters the inputed walkthrough from the application walkthroug list.
bitesofcode/projexui
projexui/xapplication.py
XApplication.userSettings
def userSettings(self): """ Returns the settings associated with this application per user. :return <QtCore.QSettings> """ if not self._userSettings: name = self.applicationName() if not self.isCompiled(): name + '.dev...
python
def userSettings(self): """ Returns the settings associated with this application per user. :return <QtCore.QSettings> """ if not self._userSettings: name = self.applicationName() if not self.isCompiled(): name + '.dev...
[ "def", "userSettings", "(", "self", ")", ":", "if", "not", "self", ".", "_userSettings", ":", "name", "=", "self", ".", "applicationName", "(", ")", "if", "not", "self", ".", "isCompiled", "(", ")", ":", "name", "+", "'.dev'", "self", ".", "_userSettin...
Returns the settings associated with this application per user. :return <QtCore.QSettings>
[ "Returns", "the", "settings", "associated", "with", "this", "application", "per", "user", ".", ":", "return", "<QtCore", ".", "QSettings", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/xapplication.py#L507-L523
train
Returns the settings associated with this application per user.
bitesofcode/projexui
projexui/widgets/xchartwidget/xchartwidgetitem.py
XChartWidgetItem.addPoint
def addPoint( self, x, y ): """ Adds a new chart point to this item. :param x | <variant> y | <variant> """ self._points.append((x, y)) self._dirty = True
python
def addPoint( self, x, y ): """ Adds a new chart point to this item. :param x | <variant> y | <variant> """ self._points.append((x, y)) self._dirty = True
[ "def", "addPoint", "(", "self", ",", "x", ",", "y", ")", ":", "self", ".", "_points", ".", "append", "(", "(", "x", ",", "y", ")", ")", "self", ".", "_dirty", "=", "True" ]
Adds a new chart point to this item. :param x | <variant> y | <variant>
[ "Adds", "a", "new", "chart", "point", "to", "this", "item", ".", ":", "param", "x", "|", "<variant", ">", "y", "|", "<variant", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartwidgetitem.py#L70-L78
train
Adds a new chart point to this item.
bitesofcode/projexui
projexui/widgets/xchartwidget/xchartwidgetitem.py
XChartWidgetItem.chartType
def chartType( self ): """ Returns the chart type for this item. If no type is explicitely set, then the scenes chart type will be utilized. :return <XChartScene.Type> """ if ( self._chartType ): return self._chartType ...
python
def chartType( self ): """ Returns the chart type for this item. If no type is explicitely set, then the scenes chart type will be utilized. :return <XChartScene.Type> """ if ( self._chartType ): return self._chartType ...
[ "def", "chartType", "(", "self", ")", ":", "if", "(", "self", ".", "_chartType", ")", ":", "return", "self", ".", "_chartType", "scene", "=", "self", ".", "scene", "(", ")", "if", "(", "not", "scene", ")", ":", "return", "0", "return", "scene", "."...
Returns the chart type for this item. If no type is explicitely set, then the scenes chart type will be utilized. :return <XChartScene.Type>
[ "Returns", "the", "chart", "type", "for", "this", "item", ".", "If", "no", "type", "is", "explicitely", "set", "then", "the", "scenes", "chart", "type", "will", "be", "utilized", ".", ":", "return", "<XChartScene", ".", "Type", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartwidgetitem.py#L96-L110
train
Returns the chart type for this item.
bitesofcode/projexui
projexui/widgets/xchartwidget/xchartwidgetitem.py
XChartWidgetItem.dragData
def dragData(self, x=None, y=None): """ Returns any drag information that will be used from this chart item. :return <QMimeData> || None """ # look for specific drag information for this item first = (x, y) second = (x, None) third ...
python
def dragData(self, x=None, y=None): """ Returns any drag information that will be used from this chart item. :return <QMimeData> || None """ # look for specific drag information for this item first = (x, y) second = (x, None) third ...
[ "def", "dragData", "(", "self", ",", "x", "=", "None", ",", "y", "=", "None", ")", ":", "# look for specific drag information for this item\r", "first", "=", "(", "x", ",", "y", ")", "second", "=", "(", "x", ",", "None", ")", "third", "=", "(", "None",...
Returns any drag information that will be used from this chart item. :return <QMimeData> || None
[ "Returns", "any", "drag", "information", "that", "will", "be", "used", "from", "this", "chart", "item", ".", ":", "return", "<QMimeData", ">", "||", "None" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartwidgetitem.py#L127-L144
train
Returns any drag information that will be used from this chart item.
bitesofcode/projexui
projexui/widgets/xchartwidget/xchartwidgetitem.py
XChartWidgetItem.hoverMoveEvent
def hoverMoveEvent( self, event ): """ Tracks whether or not this item is being hovered. :param event | <QEvent> """ point = event.pos() found_key = '' found = None for key, value, subpath in self._subpaths: if...
python
def hoverMoveEvent( self, event ): """ Tracks whether or not this item is being hovered. :param event | <QEvent> """ point = event.pos() found_key = '' found = None for key, value, subpath in self._subpaths: if...
[ "def", "hoverMoveEvent", "(", "self", ",", "event", ")", ":", "point", "=", "event", ".", "pos", "(", ")", "found_key", "=", "''", "found", "=", "None", "for", "key", ",", "value", ",", "subpath", "in", "self", ".", "_subpaths", ":", "if", "subpath",...
Tracks whether or not this item is being hovered. :param event | <QEvent>
[ "Tracks", "whether", "or", "not", "this", "item", "is", "being", "hovered", ".", ":", "param", "event", "|", "<QEvent", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartwidgetitem.py#L172-L204
train
Updates the tooltip of the currently hovered item.
bitesofcode/projexui
projexui/widgets/xchartwidget/xchartwidgetitem.py
XChartWidgetItem.hoverLeaveEvent
def hoverLeaveEvent( self, event ): """ Tracks whether or not this item is being hovered. :param event | <QEvent> """ super(XChartWidgetItem, self).hoverEnterEvent(event) self._hoveredPath = None self.update()
python
def hoverLeaveEvent( self, event ): """ Tracks whether or not this item is being hovered. :param event | <QEvent> """ super(XChartWidgetItem, self).hoverEnterEvent(event) self._hoveredPath = None self.update()
[ "def", "hoverLeaveEvent", "(", "self", ",", "event", ")", ":", "super", "(", "XChartWidgetItem", ",", "self", ")", ".", "hoverEnterEvent", "(", "event", ")", "self", ".", "_hoveredPath", "=", "None", "self", ".", "update", "(", ")" ]
Tracks whether or not this item is being hovered. :param event | <QEvent>
[ "Tracks", "whether", "or", "not", "this", "item", "is", "being", "hovered", ".", ":", "param", "event", "|", "<QEvent", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartwidgetitem.py#L206-L215
train
Updates the hovered path if the item is being hovered.
bitesofcode/projexui
projexui/widgets/xchartwidget/xchartwidgetitem.py
XChartWidgetItem.keyColor
def keyColor( self, key ): """ Returns a color for the inputed key (used in pie charts). :param key | <str> :return <QColor> """ self._keyColors.setdefault(nativestring(key), self.color()) return self._keyColors[nativestring(key...
python
def keyColor( self, key ): """ Returns a color for the inputed key (used in pie charts). :param key | <str> :return <QColor> """ self._keyColors.setdefault(nativestring(key), self.color()) return self._keyColors[nativestring(key...
[ "def", "keyColor", "(", "self", ",", "key", ")", ":", "self", ".", "_keyColors", ".", "setdefault", "(", "nativestring", "(", "key", ")", ",", "self", ".", "color", "(", ")", ")", "return", "self", ".", "_keyColors", "[", "nativestring", "(", "key", ...
Returns a color for the inputed key (used in pie charts). :param key | <str> :return <QColor>
[ "Returns", "a", "color", "for", "the", "inputed", "key", "(", "used", "in", "pie", "charts", ")", ".", ":", "param", "key", "|", "<str", ">", ":", "return", "<QColor", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartwidgetitem.py#L225-L234
train
Returns a color for the inputed key.
bitesofcode/projexui
projexui/widgets/xchartwidget/xchartwidgetitem.py
XChartWidgetItem.mousePressEvent
def mousePressEvent(self, event): """ Creates the drag event for this item. :param event | <QMousePressEvent> """ near_x, near_y = self.nearestPoint(event.pos()) data = self.dragData(x=near_x, y=near_y) self.startDrag(data) ...
python
def mousePressEvent(self, event): """ Creates the drag event for this item. :param event | <QMousePressEvent> """ near_x, near_y = self.nearestPoint(event.pos()) data = self.dragData(x=near_x, y=near_y) self.startDrag(data) ...
[ "def", "mousePressEvent", "(", "self", ",", "event", ")", ":", "near_x", ",", "near_y", "=", "self", ".", "nearestPoint", "(", "event", ".", "pos", "(", ")", ")", "data", "=", "self", ".", "dragData", "(", "x", "=", "near_x", ",", "y", "=", "near_y...
Creates the drag event for this item. :param event | <QMousePressEvent>
[ "Creates", "the", "drag", "event", "for", "this", "item", ".", ":", "param", "event", "|", "<QMousePressEvent", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartwidgetitem.py#L246-L257
train
Create the drag event for this item.
bitesofcode/projexui
projexui/widgets/xchartwidget/xchartwidgetitem.py
XChartWidgetItem.nearestPoint
def nearestPoint(self, pos): """ Returns the nearest graphing point for this item based on the inputed graph position. :param pos | <QPoint> :return (<variant> x, <variant> y) """ # lookup subpaths for x, y, path in sel...
python
def nearestPoint(self, pos): """ Returns the nearest graphing point for this item based on the inputed graph position. :param pos | <QPoint> :return (<variant> x, <variant> y) """ # lookup subpaths for x, y, path in sel...
[ "def", "nearestPoint", "(", "self", ",", "pos", ")", ":", "# lookup subpaths\r", "for", "x", ",", "y", ",", "path", "in", "self", ".", "_subpaths", ":", "if", "path", ".", "contains", "(", "pos", ")", ":", "return", "(", "x", ",", "y", ")", "return...
Returns the nearest graphing point for this item based on the inputed graph position. :param pos | <QPoint> :return (<variant> x, <variant> y)
[ "Returns", "the", "nearest", "graphing", "point", "for", "this", "item", "based", "on", "the", "inputed", "graph", "position", ".", ":", "param", "pos", "|", "<QPoint", ">", ":", "return", "(", "<variant", ">", "x", "<variant", ">", "y", ")" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartwidgetitem.py#L259-L273
train
Returns the nearest point for this item based on the inputed graph position.
bitesofcode/projexui
projexui/widgets/xchartwidget/xchartwidgetitem.py
XChartWidgetItem.paint
def paint( self, painter, option, widget ): """ Draws this item with the inputed painter. :param painter | <QPainter> rect | <QRect> """ if self._dirty: self.rebuild() scene = self.scene() if n...
python
def paint( self, painter, option, widget ): """ Draws this item with the inputed painter. :param painter | <QPainter> rect | <QRect> """ if self._dirty: self.rebuild() scene = self.scene() if n...
[ "def", "paint", "(", "self", ",", "painter", ",", "option", ",", "widget", ")", ":", "if", "self", ".", "_dirty", ":", "self", ".", "rebuild", "(", ")", "scene", "=", "self", ".", "scene", "(", ")", "if", "not", "scene", ":", "return", "grid", "=...
Draws this item with the inputed painter. :param painter | <QPainter> rect | <QRect>
[ "Draws", "this", "item", "with", "the", "inputed", "painter", ".", ":", "param", "painter", "|", "<QPainter", ">", "rect", "|", "<QRect", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartwidgetitem.py#L283-L400
train
Draws the items in the current scene.
bitesofcode/projexui
projexui/widgets/xchartwidget/xchartwidgetitem.py
XChartWidgetItem.randomColor
def randomColor( self ): """ Generates a random color. :return <QColor> """ r = random.randint(120, 180) g = random.randint(120, 180) b = random.randint(120, 180) return QColor(r, g, b)
python
def randomColor( self ): """ Generates a random color. :return <QColor> """ r = random.randint(120, 180) g = random.randint(120, 180) b = random.randint(120, 180) return QColor(r, g, b)
[ "def", "randomColor", "(", "self", ")", ":", "r", "=", "random", ".", "randint", "(", "120", ",", "180", ")", "g", "=", "random", ".", "randint", "(", "120", ",", "180", ")", "b", "=", "random", ".", "randint", "(", "120", ",", "180", ")", "ret...
Generates a random color. :return <QColor>
[ "Generates", "a", "random", "color", ".", ":", "return", "<QColor", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartwidgetitem.py#L426-L436
train
Generates a random color.
bitesofcode/projexui
projexui/widgets/xchartwidget/xchartwidgetitem.py
XChartWidgetItem.rebuild
def rebuild( self ): """ Rebuilds the item based on the current points. """ scene = self.scene() if not scene: return self._subpaths = [] grid = scene.gridRect() typ = self.chartType() ...
python
def rebuild( self ): """ Rebuilds the item based on the current points. """ scene = self.scene() if not scene: return self._subpaths = [] grid = scene.gridRect() typ = self.chartType() ...
[ "def", "rebuild", "(", "self", ")", ":", "scene", "=", "self", ".", "scene", "(", ")", "if", "not", "scene", ":", "return", "self", ".", "_subpaths", "=", "[", "]", "grid", "=", "scene", ".", "gridRect", "(", ")", "typ", "=", "self", ".", "chartT...
Rebuilds the item based on the current points.
[ "Rebuilds", "the", "item", "based", "on", "the", "current", "points", "." ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartwidgetitem.py#L446-L587
train
Rebuilds the item based on the current points and the current orientation.
bitesofcode/projexui
projexui/widgets/xchartwidget/xchartwidgetitem.py
XChartWidgetItem.setColor
def setColor( self, color ): """ Sets the color for this widget to the inputed color. :param color | <QColor> """ self._color = QColor(color) self.setAlternateColor(self._color.lighter(140))
python
def setColor( self, color ): """ Sets the color for this widget to the inputed color. :param color | <QColor> """ self._color = QColor(color) self.setAlternateColor(self._color.lighter(140))
[ "def", "setColor", "(", "self", ",", "color", ")", ":", "self", ".", "_color", "=", "QColor", "(", "color", ")", "self", ".", "setAlternateColor", "(", "self", ".", "_color", ".", "lighter", "(", "140", ")", ")" ]
Sets the color for this widget to the inputed color. :param color | <QColor>
[ "Sets", "the", "color", "for", "this", "widget", "to", "the", "inputed", "color", ".", ":", "param", "color", "|", "<QColor", ">" ]
f18a73bec84df90b034ca69b9deea118dbedfc4d
https://github.com/bitesofcode/projexui/blob/f18a73bec84df90b034ca69b9deea118dbedfc4d/projexui/widgets/xchartwidget/xchartwidgetitem.py#L615-L622
train
Sets the color for this widget to the inputed color.