示例#1
0
class SkClipboardProxy(QObject):
  def __init__(self, parent=None):
    super(SkClipboardProxy, self).__init__(parent)
    self.__d = _SkClipboardProxy(self)

    QApplication.clipboard().dataChanged.connect(lambda:
        self.textChanged.emit(self.text))

  textChanged = Signal(unicode)
  text = Property(unicode,
      lambda _: QApplication.clipboard().text(),
      lambda _, v: QApplication.clipboard().setText(v),
      notify=textChanged)
示例#2
0
  def __init__(self, parent=None):
    super(SkClipboardProxy, self).__init__(parent)
    self.__d = _SkClipboardProxy(self)

    QApplication.clipboard().dataChanged.connect(lambda:
        self.textChanged.emit(self.text))
示例#3
0
def gettext():
    """Not reliable when the clipboard is busy
  @return  unicode
  """
    return QApplication.clipboard().text()
示例#4
0
 def __init__(self):
   QApplication.clipboard().dataChanged.connect(
       self._onDataChanged)
示例#5
0
def setimage(v):
    """
  @param  v  QImage
  """
    QApplication.clipboard().setImage(v)
示例#6
0
def getimage(v):
    """
  @return  QImage
  """
    return QApplication.clipboard().image()
示例#7
0
def setpixmap(v):
    """
  @param  v  QPixmap
  """
    QApplication.clipboard().setPixmap(v)
示例#8
0
def getpixmap(v):
    """
  @return  QPixmap
  """
    return QApplication.clipboard().pixmap()
示例#9
0
 def settext(v):
     """Not reliable when the clipboard is busy
 @param  v  unicode
 """
     QApplication.clipboard().setText(v)