Logo Search packages:      
Sourcecode: qt4-x11 version File versions

QClipboard Class Reference

Inheritance diagram for QClipboard:


List of all members.

Detailed Description

The QClipboard class provides access to the window system clipboard.

The clipboard offers a simple mechanism to copy and paste data between applications.

QClipboard supports the same data types that QDrag does, and uses similar mechanisms. For advanced clipboard usage read {Drag and Drop}.

There is a single QClipboard object in an application, accessible as QApplication::clipboard().

Example: doc/src/snippets/code/src_gui_kernel_qclipboard.cpp 0

QClipboard features some convenience functions to access common data types: setText() allows the exchange of Unicode text and setPixmap() and setImage() allows the exchange of QPixmaps and QImages between applications. The setMimeData() function is the ultimate in flexibility: it allows you to add any QMimeData into the clipboard. There are corresponding getters for each of these, e.g. text(), image() and pixmap(). You can clear the clipboard by calling clear().

Definition at line 64 of file qclipboard.h.

Public Types

enum  Mode { Clipboard, Selection, FindBuffer, LastMode = FindBuffer }

Public Slots

void deleteLater ()


void changed (QClipboard::Mode mode)
void dataChanged ()
void destroyed (QObject *=0)
void findBufferChanged ()
void selectionChanged ()

Public Member Functions

bool blockSignals (bool b)
const QObjectListchildren () const
void clear (Mode mode=Clipboard)
bool connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
bool disconnect (const QObject *receiver, const char *member=0)
bool disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0)
void dumpObjectInfo ()
void dumpObjectTree ()
QList< QByteArraydynamicPropertyNames () const
virtual bool eventFilter (QObject *, QEvent *)
template<typename T>
findChild (const QString &aName=QString()) const
template<typename T>
QList< T > findChildren (const QRegExp &re) const
template<typename T>
QList< T > findChildren (const QString &aName=QString()) const
QImage image (Mode mode=Clipboard) const
bool inherits (const char *classname) const
void installEventFilter (QObject *)
bool isWidgetType () const
void killTimer (int id)
const QMimeDatamimeData (Mode mode=Clipboard) const
void moveToThread (QThread *thread)
QString objectName () const
bool ownsClipboard () const
bool ownsFindBuffer () const
bool ownsSelection () const
QObjectparent () const
QPixmap pixmap (Mode mode=Clipboard) const
QVariant property (const char *name) const
void removeEventFilter (QObject *)
void setImage (const QImage &, Mode mode=Clipboard)
void setMimeData (QMimeData *data, Mode mode=Clipboard)
void setObjectName (const QString &name)
void setParent (QObject *)
void setPixmap (const QPixmap &, Mode mode=Clipboard)
bool setProperty (const char *name, const QVariant &value)
void setText (const QString &, Mode mode=Clipboard)
void setUserData (uint id, QObjectUserData *data)
bool signalsBlocked () const
int startTimer (int interval)
bool supportsFindBuffer () const
bool supportsSelection () const
QString text (QString &subtype, Mode mode=Clipboard) const
QString text (Mode mode=Clipboard) const
QThreadthread () const
QObjectUserData * userData (uint id) const

Static Public Member Functions

static bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
static uint registerUserData ()

Protected Member Functions

virtual void childEvent (QChildEvent *)
void connectNotify (const char *)
virtual void customEvent (QEvent *)
virtual void disconnectNotify (const char *signal)
bool event (QEvent *)
int receivers (const char *signal) const
QObjectsender () const
virtual void timerEvent (QTimerEvent *)

Protected Attributes

QObjectData * d_ptr

Static Protected Attributes

static const QMetaObject staticQtMetaObject


QString objectName
 the name of this object

Private Slots

void ownerDestroyed ()

Private Member Functions

void emitChanged (Mode mode)
bool ownsMode (Mode mode) const
 QClipboard (QObject *parent)
bool supportsMode (Mode mode) const
 ~QClipboard ()


class QApplication
class QApplicationPrivate
class QBaseApplication
class QCoreApplication
class QCoreApplicationPrivate
class QDragManager
struct QMetaObject
class QMimeSource
class QThreadData
class QWidget

Related Functions

(Note that these are not member functions.)

qFindChild (const QObject *obj, const QString &name=QString(), T dummy=0)
qFindChild (const QObject *obj, const QString &name)
QList< T > qFindChildren (const QObject *obj, const QString &name=QString(), T dummy=0)
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
QList< T > qFindChildren (const QObject *obj, const QString &name)
T * qobject_cast (QObject *object)
void * qt_find_obj_child (QObject *parent, const char *type, const QString &name)

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index