// qclipboard.sip generated by MetaSIP on Fri Sep 28 17:07:47 2007 // // This file is part of the QtGui Python extension module. // // Copyright (c) 2007 // Phil Thompson // // This file is part of PyQt. // // This copy of PyQt is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 as published by // the Free Software Foundation and appearing in the file LICENSE included in the // packaging of this file. // // PyQt is supplied in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more // details. // // You should have received a copy of the GNU General Public License along with // PyQt; see the file LICENSE. If not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. class QClipboard : QObject { %TypeHeaderCode #include %End QClipboard(QObject *parent /TransferThis/); virtual ~QClipboard(); public: enum Mode { Clipboard, Selection, %If (Qt_4_2_0 -) FindBuffer, %End }; void clear(QClipboard::Mode mode = QClipboard::Clipboard); %If (Qt_4_2_0 -) bool supportsFindBuffer() const; %End bool supportsSelection() const; bool ownsClipboard() const; %If (Qt_4_2_0 -) bool ownsFindBuffer() const; %End bool ownsSelection() const; QString text(QClipboard::Mode mode = QClipboard::Clipboard) const; QString text(QString &subtype, QClipboard::Mode mode = QClipboard::Clipboard) const; void setText(const QString &, QClipboard::Mode mode = QClipboard::Clipboard); const QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard) const; void setMimeData(QMimeData *data /GetWrapper/, QClipboard::Mode mode = QClipboard::Clipboard); %MethodCode Py_BEGIN_ALLOW_THREADS sipCpp->setMimeData(a0, a1); Py_END_ALLOW_THREADS // Transfer ownership to C++ and make sure the Python object stays alive by // giving it a reference to itself. The cycle will be broken by QMimeData's // virtual dtor. sipTransferTo(a0Wrapper, a0Wrapper); %End QImage image(QClipboard::Mode mode = QClipboard::Clipboard) const; QPixmap pixmap(QClipboard::Mode mode = QClipboard::Clipboard) const; void setImage(const QImage &, QClipboard::Mode mode = QClipboard::Clipboard); void setPixmap(const QPixmap &, QClipboard::Mode mode = QClipboard::Clipboard); signals: %If (Qt_4_2_0 -) void changed(QClipboard::Mode mode); %End void dataChanged(); %If (Qt_4_2_0 -) void findBufferChanged(); %End void selectionChanged(); protected: virtual void connectNotify(const char *); virtual bool event(QEvent *); private: QClipboard(const QClipboard &); };