13#include "private/qstringconverter_p.h"
15#include "private/qguiapplication_p.h"
16#include <qpa/qplatformintegration.h>
17#include <qpa/qplatformclipboard.h>
141QClipboard::~QClipboard()
243 if (
formats.contains(
"text/plain"_L1))
244 subtype =
"plain"_L1;
247 if (
format.startsWith(
"text/"_L1)) {
255 }
else if (!
formats.contains(
"text/"_L1 + subtype)) {
322 return qvariant_cast<QImage>(
data->imageData());
442 if (
src !=
nullptr) {
443 qDebug(
"Data set on unsupported clipboard mode. QMimeData object will be deleted.");
522bool QClipboard::supportsMode(
Mode mode)
const
534bool QClipboard::ownsMode(
Mode mode)
const
544void QClipboard::emitChanged(
Mode mode)
563#include "moc_qclipboard.cpp"
char * data()
\macro QT_NO_CAST_FROM_BYTEARRAY
void setText(const QString &, Mode mode=Clipboard)
Copies text into the clipboard as plain text.
void setPixmap(const QPixmap &, Mode mode=Clipboard)
Copies pixmap into the clipboard.
void setMimeData(QMimeData *data, Mode mode=Clipboard)
Sets the clipboard data to src.
bool ownsClipboard() const
Returns true if this clipboard object owns the clipboard data; otherwise returns false.
void selectionChanged()
This signal is emitted when the selection is changed.
QImage image(Mode mode=Clipboard) const
Returns the clipboard image, or returns a null image if the clipboard does not contain an image or if...
const QMimeData * mimeData(Mode mode=Clipboard) const
Returns a pointer to a QMimeData representation of the current clipboard data (can be \nullptr if the...
bool supportsFindBuffer() const
Returns true if the clipboard supports a separate search buffer; otherwise returns false.
QString text(Mode mode=Clipboard) const
Returns the clipboard text as plain text, or an empty string if the clipboard does not contain any te...
void changed(QClipboard::Mode mode)
QPixmap pixmap(Mode mode=Clipboard) const
Returns the clipboard pixmap, or null if the clipboard does not contain a pixmap.
bool supportsSelection() const
Returns true if the clipboard supports mouse selection; otherwise returns false.
bool ownsFindBuffer() const
void dataChanged()
This signal is emitted when the clipboard data is changed.
void clear(Mode mode=Clipboard)
Clear the clipboard contents.
Mode
\keyword clipboard mode
bool ownsSelection() const
Returns true if this clipboard object owns the mouse selection data; otherwise returns false.
void setImage(const QImage &, Mode mode=Clipboard)
Copies the image into the clipboard.
static QPlatformIntegration * platformIntegration()
void setText(const QString &text)
Sets text as the plain text (MIME type text/plain) used to represent the data.
void setImageData(const QVariant &image)
Sets the data in the object to the given image.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
static Q_CORE_EXPORT std::optional< Encoding > encodingForData(QByteArrayView data, char16_t expectedFirstCharacter=0) noexcept
Returns the encoding for the content of data if it can be determined.
Q_WEAK_OVERLOAD EncodedData< const QByteArray & > decode(const QByteArray &ba)
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QString sliced(qsizetype pos) const
Combined button and popup list for selecting options.
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLsizei GLsizei GLenum format
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent