Qt 4.8
qxlibmime.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the plugins of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QTESTLITEMIME_H
43 #define QTESTLITEMIME_H
44 
45 #include <private/qdnd_p.h>
46 
47 #include <QtGui/QClipboard>
48 
49 #include "qxlibintegration.h"
50 #include "qxlibclipboard.h"
51 
52 class QXlibMime : public QInternalMimeData {
53  Q_OBJECT
54 public:
55  QXlibMime();
56  ~QXlibMime();
57 
59  static QString mimeAtomToString(Display *display, Atom a);
60  static bool mimeDataForAtom(Display *display, Atom a, QMimeData *mimeData, QByteArray *data, Atom *atomFormat, int *dataFormat);
61  static QStringList mimeFormatsForAtom(Display *display, Atom a);
62  static Atom mimeStringToAtom(Display *display, const QString &mimeType);
63  static QVariant mimeConvertToFormat(Display *display, Atom a, const QByteArray &data, const QString &format, QVariant::Type requestedType, const QByteArray &encoding);
64  static Atom mimeAtomForFormat(Display *display, const QString &format, QVariant::Type requestedType, const QList<Atom> &atoms, QByteArray *requestedEncoding);
65 };
66 
67 #endif // QTESTLITEMIME_H
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
static QString mimeAtomToString(Display *display, Atom a)
Definition: qxlibmime.cpp:62
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
static bool mimeDataForAtom(Display *display, Atom a, QMimeData *mimeData, QByteArray *data, Atom *atomFormat, int *dataFormat)
Definition: qxlibmime.cpp:107
long ASN1_INTEGER_get ASN1_INTEGER * a
QByteArray data(const QString &mimetype) const
Returns the data stored in the object in the format described by the MIME type specified by mimeType...
Definition: qmimedata.cpp:524
The QString class provides a Unicode character string.
Definition: qstring.h:83
Q_GUI_EXPORT EGLDisplay display()
Definition: qegl.cpp:589
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
Type
This enum type defines the types of variable that a QVariant can contain.
Definition: qvariant.h:95
static QStringList mimeFormatsForAtom(Display *display, Atom a)
Definition: qxlibmime.cpp:82
The QMimeData class provides a container for data that records information about its MIME type...
Definition: qmimedata.h:57
#define Q_OBJECT
Definition: qobjectdefs.h:157
static QVariant mimeConvertToFormat(Display *display, Atom a, const QByteArray &data, const QString &format, QVariant::Type requestedType, const QByteArray &encoding)
Definition: qxlibmime.cpp:195
static Atom mimeStringToAtom(Display *display, const QString &mimeType)
Definition: qxlibmime.cpp:75
struct _XDisplay Display
Definition: qwindowdefs.h:115
static QList< Atom > mimeAtomsForFormat(Display *display, const QString &format)
Definition: qxlibmime.cpp:168
static Atom mimeAtomForFormat(Display *display, const QString &format, QVariant::Type requestedType, const QList< Atom > &atoms, QByteArray *requestedEncoding)
Definition: qxlibmime.cpp:269
The QList class is a template class that provides lists.
Definition: qdatastream.h:62