Qyoto  4.0.5
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Properties
QtGui.QClipboard Class Reference

The QClipboard class provides access to the window system clipboard. More...

Inheritance diagram for QtGui.QClipboard:
Collaboration diagram for QtGui.QClipboard:

Public Types

enum  Mode { Clipboard = 0, FindBuffer = 2, LastMode = 2, Selection = 1 }
  More...
 

Public Member Functions

override void CreateProxy ()
 
new void Clear (QClipboard.Mode mode=QClipboard.Mode.Clipboard)
 
 
override bool OnEvent (QEvent arg1)
 
 
new QImage Image (QClipboard.Mode mode=QClipboard.Mode.Clipboard)
 
 
new QMimeData MimeData (QClipboard.Mode mode=QClipboard.Mode.Clipboard)
 
 
new bool OwnsClipboard ()
 
 
new bool OwnsFindBuffer ()
 
 
new bool OwnsSelection ()
 
 
new QPixmap Pixmap (QClipboard.Mode mode=QClipboard.Mode.Clipboard)
 
 
new void SetImage (QImage arg1, QClipboard.Mode mode=QClipboard.Mode.Clipboard)
 
 
new void SetMimeData (QMimeData data, QClipboard.Mode mode=QClipboard.Mode.Clipboard)
 
 
new void SetPixmap (QPixmap arg1, QClipboard.Mode mode=QClipboard.Mode.Clipboard)
 
 
new void SetText (string arg1, QClipboard.Mode mode=QClipboard.Mode.Clipboard)
 
 
new bool SupportsFindBuffer ()
 
 
new bool SupportsSelection ()
 
 
new string Text (QClipboard.Mode mode=QClipboard.Mode.Clipboard)
 
 
new string Text (string subtype, QClipboard.Mode mode=QClipboard.Mode.Clipboard)
 
 
- Public Member Functions inherited from QtCore.QObject
 QObject (QObject parent=null)
 
 
new bool BlockSignals (bool b)
 
 
new
System.Collections.Generic.List
< QObject
Children ()
 
 
new bool Connect (QObject sender, string signal, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection)
 
 
new void DeleteLater ()
 
 
new bool Disconnect (QObject receiver, string member=null)
 
 
new bool Disconnect (string signal=null, QObject receiver=null, string member=null)
 
 
new void DumpObjectInfo ()
 
 
new void DumpObjectTree ()
 
 
new
System.Collections.Generic.List
< QByteArray
DynamicPropertyNames ()
 
 
virtual bool EventFilter (QObject arg1, QEvent arg2)
 
 
new bool Inherits (string classname)
 
 
new void InstallEventFilter (QObject arg1)
 
 
new bool IsWidgetType ()
 
 
new void KillTimer (int id)
 
 
new object Property (string name)
 
 
new void RemoveEventFilter (QObject arg1)
 
 
new bool SetProperty (string name, object value)
 
 
new void SetUserData (uint id, QObjectUserData data)
 
new bool SignalsBlocked ()
 
 
new int StartTimer (int interval)
 
 
new QObjectUserData UserData (uint id)
 
new void Dispose ()
 
- Public Member Functions inherited from QtCore.Qt
delegate QTextStream FuncQTextStreamQTextStream (QTextStream qTextStream)
 
delegate string FuncStringQByteArray (QByteArray qByteArray)
 
delegate QByteArray FuncQByteArrayString (string @string)
 
delegate void ActionQtMsgTypeString (QtMsgType qtMsgType, string @string)
 
delegate QObject FuncQObject ()
 

Static Public Member Functions

static string Tr (string s, string c=null)
 
static string Tr (string s, string c, int n)
 
static string TrUtf8 (string s, string c=null)
 
static string TrUtf8 (string s, string c, int n)
 
- Static Public Member Functions inherited from QtCore.QObject
static bool Connect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod method, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection)
 
 
static bool Connect (QObject sender, string signal, QObject receiver, string member, Qt.ConnectionType arg5=Qt.ConnectionType.AutoConnection)
 
 
static bool Disconnect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod member)
 
 
static bool Disconnect (QObject sender, string signal, QObject receiver, string member)
 
 
static uint RegisterUserData ()
 
static string Tr (string s, string c=null)
 
 
static string Tr (string s, string c, int n)
 
 
static string TrUtf8 (string s, string c=null)
 
 
static string TrUtf8 (string s, string c, int n)
 
 
- Static Public Member Functions inherited from QtCore.Qt
static QDataStream Write (QDataStream s, object p)
 
static QDataStream Write (QDataStream arg1, QSizeF arg2)
 
static QTextStream Write (QTextStream s, Qt.FuncQTextStreamQTextStream f)
 
static QDataStream Write (QDataStream arg1, QPoint arg2)
 
static QDataStream Write (QDataStream arg1, QLineF arg2)
 
static QDataStream Write (QDataStream arg1, QPointF arg2)
 
static QDataStream Write (QDataStream arg1, QChar arg2)
 
static QDataStream Write (QDataStream arg1, QByteArray arg2)
 
static QDataStream Write (QDataStream arg1, QEasingCurve arg2)
 
static QDataStream Write (QDataStream arg1, QRectF arg2)
 
static QDataStream Write (QDataStream arg1, QDateTime arg2)
 
static QDataStream Write (QDataStream arg1, QUrl arg2)
 
static QDataStream Write (QDataStream arg1, QTime arg2)
 
static QDataStream Write (QDataStream arg1, QLocale arg2)
 
static QDataStream Write (QDataStream arg1, QBitArray arg2)
 
static QDataStream Write (QDataStream arg1, QUuid arg2)
 
static QDataStream Write (QDataStream arg1, QLine arg2)
 
static QDataStream Write (QDataStream arg1, QDate arg2)
 
static QDataStream Write (QDataStream @out, QRegExp regExp)
 
static QDataStream Write (QDataStream arg1, QRect arg2)
 
static QDataStream Write (QDataStream arg1, QSize arg2)
 
static QDataStream Write (QDataStream s, QVariant.Type p)
 
static QDataStream Write (QDataStream arg1, string arg2)
 
static QDataStream Write (QDataStream @out, System.Collections.Generic.List< string > list)
 
static QDataStream Read (QDataStream arg1, QChar arg2)
 
static QDataStream Read (QDataStream arg1, QLocale arg2)
 
static QDataStream Read (QDataStream arg1, QRect arg2)
 
static QDataStream Read (QDataStream arg1, QEasingCurve arg2)
 
static QDataStream Read (QDataStream arg1, QDate arg2)
 
static QDataStream Read (QDataStream arg1, QUrl arg2)
 
static QDataStream Read (QDataStream arg1, QUuid arg2)
 
static QTextStream Read (QTextStream s, Qt.FuncQTextStreamQTextStream f)
 
static QDataStream Read (QDataStream arg1, QLineF arg2)
 
static QDataStream Read (QDataStream arg1, QRectF arg2)
 
static QDataStream Read (QDataStream arg1, QPointF arg2)
 
static QDataStream Read (QDataStream arg1, QLine arg2)
 
static QDataStream Read (QDataStream arg1, QBitArray arg2)
 
static QDataStream Read (QDataStream arg1, QSize arg2)
 
static QDataStream Read (QDataStream arg1, QDateTime arg2)
 
static QDataStream Read (QDataStream arg1, QTime arg2)
 
static QDataStream Read (QDataStream arg1, QPoint arg2)
 
static QDataStream Read (QDataStream @in, QRegExp regExp)
 
static QDataStream Read (QDataStream s, object p)
 
static QDataStream Read (QDataStream arg1, QByteArray arg2)
 
static QDataStream Read (QDataStream arg1, QSizeF arg2)
 
static QDataStream Read (QDataStream arg1, string arg2)
 
static QDataStream Read (QDataStream s, QVariant.Type p)
 
static QDataStream Read (QDataStream @in, System.Collections.Generic.List< string > list)
 
static double qAcos (double v)
 
static void qAddPostRoutine (System.Action arg1)
 
static string qAppName ()
 
static double qAsin (double v)
 
static double qAtan (double v)
 
static double qAtan2 (double x, double y)
 
static void qBadAlloc ()
 
static int qCeil (double v)
 
static ushort qChecksum (string s, uint len)
 
static QByteArray qCompress (QByteArray data)
 
static QByteArray qCompress (QByteArray data, int compressionLevel=-1)
 
static QByteArray qCompress (Pointer< byte > data, int nbytes)
 
static QByteArray qCompress (Pointer< byte > data, int nbytes, int compressionLevel=-1)
 
static double qCos (double v)
 
static double qExp (double v)
 
static double qFabs (double v)
 
static double qFastCos (double x)
 
static double qFastSin (double x)
 
static string qFlagLocation (string method)
 
static int qFloor (double v)
 
static bool qFuzzyCompare (double p1, double p2)
 
static bool qFuzzyCompare (float p1, float p2)
 
static bool qFuzzyIsNull (double d)
 
static bool qFuzzyIsNull (float f)
 
static uint qHash (QBitArray key)
 
static uint qHash (QChar key)
 
static uint qHash (QStringRef key)
 
static uint qHash (QUrl url)
 
static uint qHash (QPersistentModelIndex index)
 
static uint qHash (QByteArray key)
 
static uint qHash (QModelIndex index)
 
static uint qHash (uint key)
 
static uint qHash (sbyte key)
 
static uint qHash (byte key)
 
static uint qHash (short key)
 
static uint qHash (NativeLong key)
 
static uint qHash (ushort key)
 
static uint qHash (long key)
 
static uint qHash (ulong key)
 
static uint qHash (int key)
 
static uint qHash (string key)
 
static uint qHash (NativeULong key)
 
static double qInf ()
 
static Qt.ActionQtMsgTypeString qInstallMsgHandler (Qt.ActionQtMsgTypeString arg1)
 
static int qIntCast (float f)
 
static int qIntCast (double f)
 
static bool qIsFinite (double d)
 
static bool qIsFinite (float f)
 
static bool qIsInf (float f)
 
static bool qIsInf (double d)
 
static bool qIsNaN (float f)
 
static bool qIsNaN (double d)
 
static bool qIsNull (float f)
 
static bool qIsNull (double d)
 
static double qLn (double v)
 
static double qPow (double x, double y)
 
static double qQNaN ()
 
static void qRegisterStaticPluginInstanceFunction (Qt.FuncQObject function)
 
static void qRemovePostRoutine (System.Action arg1)
 
static int qRound (double d)
 
static long qRound64 (double d)
 
static double qSNaN ()
 
static bool qSharedBuild ()
 
static double qSin (double v)
 
static double qSqrt (double v)
 
static bool qStringComparisonHelper (QStringRef s1, string s2)
 
static double qTan (double v)
 
static QByteArray qUncompress (QByteArray data)
 
static QByteArray qUncompress (Pointer< byte > data, int nbytes)
 
static string qVersion ()
 
static void Qbswap_helper (Pointer< byte > src, Pointer< byte > dest, int size)
 
static QByteArray Qgetenv (string varName)
 
static bool Qputenv (string varName, QByteArray value)
 
static int Qrand ()
 
static void Qsrand (uint seed)
 
static int Qstrcmp (QByteArray str1, QByteArray str2)
 
static int Qstrcmp (QByteArray str1, string str2)
 
static int Qstrcmp (string str1, QByteArray str2)
 
static int Qstrcmp (string str1, string str2)
 
static Pointer< sbyte > Qstrcpy (Pointer< sbyte > dst, string src)
 
static Pointer< sbyte > Qstrdup (string arg1)
 
static int Qstricmp (string arg1, string arg2)
 
static uint Qstrlen (string str)
 
static int Qstrncmp (string str1, string str2, uint len)
 
static Pointer< sbyte > Qstrncpy (Pointer< sbyte > dst, string src, uint len)
 
static int Qstrnicmp (string arg1, string arg2, uint len)
 
static uint Qstrnlen (string str, uint maxlen)
 
static string QtTrId (string id, int n=-1)
 

Protected Member Functions

 QClipboard (System.Type dummy)
 
new void OnChanged (QClipboard.Mode mode)
 
 
override void ConnectNotify (string arg1)
 
 
new void OnDataChanged ()
 
 
new void OnFindBufferChanged ()
 
 
new void OnSelectionChanged ()
 
 
- Protected Member Functions inherited from QtCore.QObject
 QObject (System.Type dummy)
 
virtual void OnChildEvent (QChildEvent arg1)
 
 
virtual void OnCustomEvent (QEvent arg1)
 
 
new void OnDestroyed (QObject arg1=null)
 
 
virtual void DisconnectNotify (string signal)
 
 
new int Receivers (string signal)
 
 
new QObject Sender ()
 
 
new int SenderSignalIndex ()
 
 
virtual void OnTimerEvent (QTimerEvent arg1)
 
 

Properties

Slot< QClipboard.ModeChanged
 
 
Slot SelectionChanged
 
 
Slot FindBufferChanged
 
 
Slot DataChanged
 
 
static new QMetaObject StaticMetaObject [get]
 
new IQClipboardSignals Emit [get]
 
- Properties inherited from QtCore.QObject
virtual EventHandler
< QEventArgs< QChildEvent > > 
ChildEvent
 
 
virtual EventHandler
< QEventArgs< QEvent > > 
CustomEvent
 
 
virtual EventHandler
< QEventArgs< QEvent > > 
Event
 
 
virtual EventHandler
< QEventArgs< QTimerEvent > > 
TimerEvent
 
 
Slot< QObjectDestroyedQObject
 
Slot Destroyed
 
 
new QObject Parent [get, set]
 
 
virtual System.IntPtr SmokeObject [get, set]
 
new string ObjectName [get, set]
 
 
static new QMetaObject StaticMetaObject [get]
 
 
static new QMetaObject StaticQtMetaObject [get]
 
new IQObjectSignals Emit [get]
 

Additional Inherited Members

- Protected Attributes inherited from QtCore.QObject
object Q_EMIT = null
 
SmokeInvocation interceptor
 
readonly List< QEventHandler > eventFilters = new List<QEventHandler>()
 

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:

QClipboard *clipboard = QApplication::clipboard();

QString originalText = clipboard->text();

...

clipboard->setText(newText);

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().

A typical example of the use of these functions follows:

void DropArea::paste()

{

const QClipboard *clipboard = QApplication::clipboard();

const QMimeData *mimeData = clipboard->mimeData();

if (mimeData->hasImage()) {

setPixmap(qvariant_cast<QPixmap>(mimeData->imageData()));

} else if (mimeData->hasHtml()) {

setText(mimeData->html());

setTextFormat(Qt::RichText);

} else if (mimeData->hasText()) {

setText(mimeData->text());

setTextFormat(Qt::PlainText);

} else {

setText(tr("Cannot display data"));

}

Notes for X11 Users

The X11 Window System has the concept of a separate selection and clipboard. When text is selected, it is immediately available as the global mouse selection. The global mouse selection may later be copied to the clipboard. By convention, the middle mouse button is used to paste the global mouse selection.

X11 also has the concept of ownership; if you change the selection within a window, X11 will only notify the owner and the previous owner of the change, i.e. it will not notify all applications that the selection or clipboard data changed.

Lastly, the X11 clipboard is event driven, i.e. the clipboard will not function properly if the event loop is not running. Similarly, it is recommended that the contents of the clipboard are stored or retrieved in direct response to user-input events, e.g. mouse button or key presses and releases. You should not store or retrieve the clipboard contents in response to timer or non-user-input events.

Since there is no standard way to copy and paste files between applications on X11, various MIME types and conventions are currently in use. For instance, Nautilus expects files to be supplied with a x-special/gnome-copied-files MIME type with data beginning with the cut/copy action, a newline character, and the URL of the file.

Notes for Mac OS X Users

Mac OS X supports a separate find buffer that holds the current search string in Find operations. This find clipboard can be accessed by specifying the FindBuffer mode.

Notes for Windows and Mac OS X Users

Windows and Mac OS X do not support the global mouse selection; they only supports the global clipboard, i.e. they only add text to the clipboard when an explicit copy or cut is made.

Windows and Mac OS X does not have the concept of ownership; the clipboard is a fully global resource so all applications are notified of changes.

See also QApplication.

Member Enumeration Documentation

This enum type is used to control which part of the system clipboard is used by QClipboard::mimeData(), QClipboard::setMimeData() and related functions.

See also QClipboard::supportsSelection().

Enumerator:
Clipboard 

Indicates that data should be stored and retrieved from the global clipboard.

FindBuffer 

Indicates that data should be stored and retrieved from the Find buffer. This mode is used for holding search strings on Mac OS X.

LastMode 
Selection 

Indicates that data should be stored and retrieved from the global mouse selection. Support for Selection is provided only on systems with a global mouse selection (e.g. X11).

Constructor & Destructor Documentation

QtGui.QClipboard.QClipboard ( System.Type  dummy)
protected

Member Function Documentation

new void QtGui.QClipboard.Clear ( QClipboard.Mode  mode = QClipboard.Mode.Clipboard)

Clear the clipboard contents.

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, this function clears the global clipboard contents. If mode is QClipboard::Selection, this function clears the global mouse selection contents. If mode is QClipboard::FindBuffer, this function clears the search string buffer.

See also QClipboard::Mode and supportsSelection().

override void QtGui.QClipboard.ConnectNotify ( string  signal)
protectedvirtual

This virtual function is called when something has been connected to signal in this object.

If you want to compare signal with a specific signal, use QLatin1String and the SIGNAL() macro as follows:

if (QLatin1String(signal) == SIGNAL(valueChanged(int))) {

// signal is valueChanged(int)

}

If the signal contains multiple parameters or parameters that contain spaces, call QMetaObject::normalizedSignature() on the result of the SIGNAL() macro.

Warning: This function violates the object-oriented principle of modularity. However, it might be useful when you need to perform expensive initialization only if something is connected to a signal.

See also connect() and disconnectNotify().

Reimplemented from QtCore.QObject.

override void QtGui.QClipboard.CreateProxy ( )
virtual

Reimplemented from QtCore.QObject.

new QImage QtGui.QClipboard.Image ( QClipboard.Mode  mode = QClipboard.Mode.Clipboard)

Returns the clipboard image, or returns a null image if the clipboard does not contain an image or if it contains an image in an unsupported image format.

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, the image is retrieved from the global clipboard. If mode is QClipboard::Selection, the image is retrieved from the global mouse selection.

See also setImage(), pixmap(), mimeData(), and QImage::isNull().

new QMimeData QtGui.QClipboard.MimeData ( QClipboard.Mode  mode = QClipboard.Mode.Clipboard)

Returns a reference to a QMimeData representation of the current clipboard data.

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, the data is retrieved from the global clipboard. If mode is QClipboard::Selection, the data is retrieved from the global mouse selection. If mode is QClipboard::FindBuffer, the data is retrieved from the search string buffer.

The text(), image(), and pixmap() functions are simpler wrappers for retrieving text, image, and pixmap data.

See also setMimeData().

new void QtGui.QClipboard.OnChanged ( QClipboard.Mode  mode)
protected

This signal is emitted when the data for the given clipboard mode is changed.

This function was introduced in Qt 4.2.

See also dataChanged(), selectionChanged(), and findBufferChanged().

new void QtGui.QClipboard.OnDataChanged ( )
protected

This signal is emitted when the clipboard data is changed.

On Mac OS X and with Qt version 4.3 or higher, clipboard changes made by other applications will only be detected when the application is activated.

See also findBufferChanged(), selectionChanged(), and changed().

override bool QtGui.QClipboard.OnEvent ( QEvent  arg1)
virtual

Reimplemented from QObject::event().

Reimplemented from QtCore.QObject.

new void QtGui.QClipboard.OnFindBufferChanged ( )
protected

This signal is emitted when the find buffer is changed. This only applies to Mac OS X.

With Qt version 4.3 or higher, clipboard changes made by other applications will only be detected when the application is activated.

This function was introduced in Qt 4.2.

See also dataChanged(), selectionChanged(), and changed().

new void QtGui.QClipboard.OnSelectionChanged ( )
protected

This signal is emitted when the selection is changed. This only applies to windowing systems that support selections, e.g. X11. Windows and Mac OS X don't support selections.

See also dataChanged(), findBufferChanged(), and changed().

new bool QtGui.QClipboard.OwnsClipboard ( )

Returns true if this clipboard object owns the clipboard data; otherwise returns false.

new bool QtGui.QClipboard.OwnsFindBuffer ( )

Returns true if this clipboard object owns the find buffer data; otherwise returns false.

This function was introduced in Qt 4.2.

new bool QtGui.QClipboard.OwnsSelection ( )

Returns true if this clipboard object owns the mouse selection data; otherwise returns false.

new QPixmap QtGui.QClipboard.Pixmap ( QClipboard.Mode  mode = QClipboard.Mode.Clipboard)

Returns the clipboard pixmap, or null if the clipboard does not contain a pixmap. Note that this can lose information. For example, if the image is 24-bit and the display is 8-bit, the result is converted to 8 bits, and if the image has an alpha channel, the result just has a mask.

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, the pixmap is retrieved from the global clipboard. If mode is QClipboard::Selection, the pixmap is retrieved from the global mouse selection.

See also setPixmap(), image(), mimeData(), and QPixmap::convertFromImage().

new void QtGui.QClipboard.SetImage ( QImage  arg1,
QClipboard.Mode  mode = QClipboard.Mode.Clipboard 
)

Copies the image into the clipboard.

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, the image is stored in the global clipboard. If mode is QClipboard::Selection, the data is stored in the global mouse selection.

This is shorthand for:

QMimeData *data = new QMimeData;

data->setImageData(image);

clipboard->setMimeData(data, mode);

See also image(), setPixmap(), and setMimeData().

new void QtGui.QClipboard.SetMimeData ( QMimeData  data,
QClipboard.Mode  mode = QClipboard.Mode.Clipboard 
)

Sets the clipboard data to src. Ownership of the data is transferred to the clipboard. If you want to remove the data either call clear() or call setMimeData() again with new data.

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, the data is stored in the global clipboard. If mode is QClipboard::Selection, the data is stored in the global mouse selection. If mode is QClipboard::FindBuffer, the data is stored in the search string buffer.

The setText(), setImage() and setPixmap() functions are simpler wrappers for setting text, image and pixmap data respectively.

See also mimeData().

new void QtGui.QClipboard.SetPixmap ( QPixmap  arg1,
QClipboard.Mode  mode = QClipboard.Mode.Clipboard 
)

Copies pixmap into the clipboard. Note that this is slower than setImage() because it needs to convert the QPixmap to a QImage first.

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, the pixmap is stored in the global clipboard. If mode is QClipboard::Selection, the pixmap is stored in the global mouse selection.

See also pixmap(), setImage(), and setMimeData().

new void QtGui.QClipboard.SetText ( string  arg1,
QClipboard.Mode  mode = QClipboard.Mode.Clipboard 
)

Copies text into the clipboard as plain text.

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, the text is stored in the global clipboard. If mode is QClipboard::Selection, the text is stored in the global mouse selection. If mode is QClipboard::FindBuffer, the text is stored in the search string buffer.

See also text() and setMimeData().

new bool QtGui.QClipboard.SupportsFindBuffer ( )

Returns true if the clipboard supports a separate search buffer; otherwise returns false.

new bool QtGui.QClipboard.SupportsSelection ( )

Returns true if the clipboard supports mouse selection; otherwise returns false.

new string QtGui.QClipboard.Text ( QClipboard.Mode  mode = QClipboard.Mode.Clipboard)

Returns the clipboard text as plain text, or an empty string if the clipboard does not contain any text.

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, the text is retrieved from the global clipboard. If mode is QClipboard::Selection, the text is retrieved from the global mouse selection. If mode is QClipboard::FindBuffer, the text is retrieved from the search string buffer.

See also setText() and mimeData().

new string QtGui.QClipboard.Text ( string  subtype,
QClipboard.Mode  mode = QClipboard.Mode.Clipboard 
)

This is an overloaded function.

Returns the clipboard text in subtype subtype, or an empty string if the clipboard does not contain any text. If subtype is null, any subtype is acceptable, and subtype is set to the chosen subtype.

The mode argument is used to control which part of the system clipboard is used. If mode is QClipboard::Clipboard, the text is retrieved from the global clipboard. If mode is QClipboard::Selection, the text is retrieved from the global mouse selection.

Common values for subtype are "plain" and "html".

Note that calling this function repeatedly, for instance from a key event handler, may be slow. In such cases, you should use the dataChanged() signal instead.

See also setText() and mimeData().

static string QtGui.QClipboard.Tr ( string  s,
string  c = null 
)
static
static string QtGui.QClipboard.Tr ( string  s,
string  c,
int  n 
)
static
static string QtGui.QClipboard.TrUtf8 ( string  s,
string  c = null 
)
static
static string QtGui.QClipboard.TrUtf8 ( string  s,
string  c,
int  n 
)
static

Property Documentation

Slot<QClipboard.Mode> QtGui.QClipboard.Changed
addremove

This signal is emitted when the data for the given clipboard mode is changed.

This function was introduced in Qt 4.2.

See also dataChanged(), selectionChanged(), and findBufferChanged().

Slot QtGui.QClipboard.DataChanged
addremove

This signal is emitted when the clipboard data is changed.

On Mac OS X and with Qt version 4.3 or higher, clipboard changes made by other applications will only be detected when the application is activated.

See also findBufferChanged(), selectionChanged(), and changed().

new IQClipboardSignals QtGui.QClipboard.Emit
getprotected
Slot QtGui.QClipboard.FindBufferChanged
addremove

This signal is emitted when the find buffer is changed. This only applies to Mac OS X.

With Qt version 4.3 or higher, clipboard changes made by other applications will only be detected when the application is activated.

This function was introduced in Qt 4.2.

See also dataChanged(), selectionChanged(), and changed().

Slot QtGui.QClipboard.SelectionChanged
addremove

This signal is emitted when the selection is changed. This only applies to windowing systems that support selections, e.g. X11. Windows and Mac OS X don't support selections.

See also dataChanged(), findBufferChanged(), and changed().

new QMetaObject QtGui.QClipboard.StaticMetaObject
staticget