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)
def __init__(self, parent=None): super(SkClipboardProxy, self).__init__(parent) self.__d = _SkClipboardProxy(self) QApplication.clipboard().dataChanged.connect(lambda: self.textChanged.emit(self.text))
def gettext(): """Not reliable when the clipboard is busy @return unicode """ return QApplication.clipboard().text()
def __init__(self): QApplication.clipboard().dataChanged.connect( self._onDataChanged)
def setimage(v): """ @param v QImage """ QApplication.clipboard().setImage(v)
def getimage(v): """ @return QImage """ return QApplication.clipboard().image()
def setpixmap(v): """ @param v QPixmap """ QApplication.clipboard().setPixmap(v)
def getpixmap(v): """ @return QPixmap """ return QApplication.clipboard().pixmap()
def settext(v): """Not reliable when the clipboard is busy @param v unicode """ QApplication.clipboard().setText(v)