#include "qplatformdefs.h"
#include "qbitmap.h"
#include "qdrag.h"
#include "qpixmap.h"
#include "qevent.h"
#include "qfile.h"
#include "qtextcodec.h"
#include "qapplication.h"
#include "qpoint.h"
#include "qwidget.h"
#include "qbuffer.h"
#include "qimage.h"
#include "qregexp.h"
#include "qdir.h"
#include "qdnd_p.h"
#include "qimagereader.h"
#include "qimagewriter.h"
#include "qdebug.h"
#include <ctype.h>
Include dependency graph for qdnd.cpp:

Go to the source code of this file.
Functions | |
| static QStringList | imageReadMimeFormats () |
| static QStringList | imageWriteMimeFormats () |
Variables | |
| static const char *const | move_xpm [] |
| static const char *const | copy_xpm [] |
| static const char *const | link_xpm [] |
| static QStringList imageReadMimeFormats | ( | ) | [static] |
Definition at line 399 of file qdnd.cpp.
References QList< T >::append(), QList< T >::at(), QString::fromLatin1(), i, QStringList::indexOf(), QList< T >::move(), QList< T >::size(), QImageReader::supportedImageFormats(), and QByteArray::toLower().
Referenced by QInternalMimeData::canReadData(), QInternalMimeData::formats(), QInternalMimeData::hasFormat(), and QInternalMimeData::retrieveData().
00400 { 00401 QStringList formats; 00402 QList<QByteArray> imageFormats = QImageReader::supportedImageFormats(); 00403 for (int i = 0; i < imageFormats.size(); ++i) { 00404 QString format = QLatin1String("image/"); 00405 format += QString::fromLatin1(imageFormats.at(i).toLower()); 00406 formats.append(format); 00407 } 00408 00409 //put png at the front because it is best 00410 int pngIndex = formats.indexOf(QLatin1String("image/png")); 00411 if (pngIndex != -1 && pngIndex != 0) 00412 formats.move(pngIndex, 0); 00413 00414 return formats; 00415 }
Here is the call graph for this function:

| static QStringList imageWriteMimeFormats | ( | ) | [static] |
Definition at line 418 of file qdnd.cpp.
References QList< T >::append(), QList< T >::at(), QString::fromLatin1(), i, QStringList::indexOf(), QList< T >::move(), QList< T >::size(), QImageWriter::supportedImageFormats(), and QByteArray::toLower().
Referenced by QInternalMimeData::formatsHelper(), and QInternalMimeData::hasFormatHelper().
00419 { 00420 QStringList formats; 00421 QList<QByteArray> imageFormats = QImageWriter::supportedImageFormats(); 00422 for (int i = 0; i < imageFormats.size(); ++i) { 00423 QString format = QLatin1String("image/"); 00424 format += QString::fromLatin1(imageFormats.at(i).toLower()); 00425 formats.append(format); 00426 } 00427 00428 //put png at the front because it is best 00429 int pngIndex = formats.indexOf(QLatin1String("image/png")); 00430 if (pngIndex != -1 && pngIndex != 0) 00431 formats.move(pngIndex, 0); 00432 00433 return formats; 00434 }
Here is the call graph for this function:

const char* const copy_xpm[] [static] |
const char* const link_xpm[] [static] |
const char* const move_xpm[] [static] |
Initial value:
{
"11 20 3 1",
". c None",
"a c #FFFFFF",
"X c #000000",
"aa.........",
"aXa........",
"aXXa.......",
"aXXXa......",
"aXXXXa.....",
"aXXXXXa....",
"aXXXXXXa...",
"aXXXXXXXa..",
"aXXXXXXXXa.",
"aXXXXXXXXXa",
"aXXXXXXaaaa",
"aXXXaXXa...",
"aXXaaXXa...",
"aXa..aXXa..",
"aa...aXXa..",
"a.....aXXa.",
"......aXXa.",
".......aXXa",
".......aXXa",
"........aa."}
Definition at line 50 of file qdnd.cpp.
Referenced by QDragManager::QDragManager().
1.5.1