本文整理汇总了Python中Tc2Config.newPointNone方法的典型用法代码示例。如果您正苦于以下问题:Python Tc2Config.newPointNone方法的具体用法?Python Tc2Config.newPointNone怎么用?Python Tc2Config.newPointNone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tc2Config
的用法示例。
在下文中一共展示了Tc2Config.newPointNone方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: fromConfig
# 需要导入模块: import Tc2Config [as 别名]
# 或者: from Tc2Config import newPointNone [as 别名]
def fromConfig(klass, key):
kws = {}
id = Tc2Config.settingsValue( (key, 'ID'), '').toString()
if id != klass.id():
return None
kws['name'] = Tc2Config.settingsValue( (key, 'Name'), 'None').toString()
size = Tc2Config.settingsValue( (key, 'Size'), Tc2Config.newSizeNone() ).toSize()
if not size.isValid():
size = Tc2Config.newSizeNone()
kws['size'] = size
kws['itemIsExpanded'] = Tc2Config.settingsValue( (key, 'ItemIsExpanded'), False).toBool()
for pointName in klass.PointNames:
point = Tc2Config.settingsValue((key, pointName), Tc2Config.newPointNone()).toPoint()
if not Tc2Config.pointInSize(size, point):
point = Tc2Config.newPointNone()
kws[pointName] = point
return klass(**kws)
示例2: mouseDoubleClickEvent
# 需要导入模块: import Tc2Config [as 别名]
# 或者: from Tc2Config import newPointNone [as 别名]
def mouseDoubleClickEvent(self, event):
if event.button() == QtCore.Qt.LeftButton:
pixmap = self.pixmap()
if pixmap is not None and not pixmap.isNull():
# holding sown Ctrl while double clicking rests the point
if event.modifiers() & QtCore.Qt.ControlModifier:
point = Tc2Config.newPointNone()
else:
point = QtCore.QPoint(event.pos())
Tc2Config.globalObject.widgetScreenshotDoubleClicked.emit(pixmap, point)
示例3: onMouseLeave
# 需要导入模块: import Tc2Config [as 别名]
# 或者: from Tc2Config import newPointNone [as 别名]
def onMouseLeave(self):
pixmap = self.pixmap()
if pixmap is not None and not pixmap.isNull():
point = Tc2Config.newPointNone()
self._giveFeedback(pixmap, point)
示例4: newPoint
# 需要导入模块: import Tc2Config [as 别名]
# 或者: from Tc2Config import newPointNone [as 别名]
def newPoint(point=None, x=None, y=None):
point = Tc2Config.newPointNone() if point is None else point
if x is not None:
point.setX(x)
point.setY(y)
return point