source: trunk/src/gui/kernel/qmime_pm.cpp@ 322

Last change on this file since 322 was 321, checked in by Dmitry A. Kuminov, 16 years ago

gui/kernel: Prototyped QPMMime and QClipboard helpers.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 3.9 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4** Contact: Qt Software Information ([email protected])
5**
6** Copyright (C) 2009 netlabs.org. OS/2 parts.
7**
8** This file is part of the QtGui module of the Qt Toolkit.
9**
10** $QT_BEGIN_LICENSE:LGPL$
11** Commercial Usage
12** Licensees holding valid Qt Commercial licenses may use this file in
13** accordance with the Qt Commercial License Agreement provided with the
14** Software or, alternatively, in accordance with the terms contained in
15** a written agreement between you and Nokia.
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, Nokia gives you certain
26** additional rights. These rights are described in the Nokia Qt LGPL
27** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
28** package.
29**
30** GNU General Public License Usage
31** Alternatively, this file may be used under the terms of the GNU
32** General Public License version 3.0 as published by the Free Software
33** Foundation and appearing in the file LICENSE.GPL included in the
34** packaging of this file. Please review the following information to
35** ensure the GNU General Public License version 3.0 requirements will be
36** met: http://www.gnu.org/copyleft/gpl.html.
37**
38** If you are unsure which license is appropriate for your use, please
39** contact the sales department at [email protected].
40** $QT_END_LICENSE$
41**
42****************************************************************************/
43
44#include "qmime.h"
45
46#include "qimagereader.h"
47#include "qimagewriter.h"
48#include "qdatastream.h"
49#include "qbuffer.h"
50#include "qt_os2.h"
51#include "qapplication_p.h"
52#include "qtextcodec.h"
53#include "qregexp.h"
54#include "qalgorithms.h"
55#include "qmap.h"
56#include "qdnd_p.h"
57#include "qurl.h"
58#include "qvariant.h"
59#include "qtextdocument.h"
60#include "qdir.h"
61
62QT_BEGIN_NAMESPACE
63
64/*!
65 \class QPMMime
66 \brief The QMPMime class maps open-standard MIME to OS/2 PM Clipboard
67 formats.
68 \ingroup io
69 \ingroup draganddrop
70 \ingroup misc
71
72 Qt's drag-and-drop and clipboard facilities use the MIME standard.
73 On X11, this maps trivially to the Xdnd protocol, but on OS/2
74 although some applications use MIME types to describe clipboard
75 formats, others use arbitrary non-standardized naming conventions,
76 or unnamed built-in formats of the Presentation Manager.
77
78 By instantiating subclasses of QPMMime that provide conversions between OS/2
79 PM Clipboard and MIME formats, you can convert proprietary clipboard formats
80 to MIME formats.
81
82 Qt has predefined support for the following PM Clipboard formats:
83
84 \table
85 \header \o PM Format \o Equivalent MIME type
86 \row \o \c CF_TEXT \o \c text/plain
87 \row \o \c CF_BITMAP \o \c{image/xyz}, where \c xyz is
88 a \l{QImageWriter::supportedImageFormats()}{Qt image format}
89 \endtable
90
91 An example use of this class would be to map the PM Metafile
92 clipboard format (\c CF_METAFILE) to and from the MIME type
93 \c{image/x-metafile}. This conversion might simply be adding or removing a
94 header, or even just passing on the data. See \l{Drag and Drop} for more
95 information on choosing and definition MIME types.
96
97 You can check if a MIME type is convertible using canConvertFromMime() and
98 can perform conversions with convertToMime() and convertFromMime().
99*/
100
101// @todo lots of stuff...
102
103QPMMime::QPMMime()
104{
105}
106
107QPMMime::~QPMMime()
108{
109}
110
111QT_END_NAMESPACE
Note: See TracBrowser for help on using the repository browser.