kurldrag.h
/* This file is part of the KDE project
Copyright (C) 2000 David Faure <faure@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef __KURLDRAG_H
#define __KURLDRAG_H
#include <qstringlist.h>
#include <qdragobject.h>
#include <kurl.h>
#include "kdelibs_export.h"
class QMimeSource;
class KURLDragPrivate;
class KDECORE_EXPORT KURLDrag : public QUriDrag
{
public:
KURLDrag( const KURL::List &urls, QWidget* dragSource = 0, const char * name = 0 );
KURLDrag( const KURL::List &urls, const QMap<QString, QString>& metaData,
QWidget* dragSource = 0, const char * name = 0 );
virtual ~KURLDrag();
void setExportAsText( bool exp );
static KURLDrag * newDrag( const KURL::List &urls, QWidget* dragSource = 0, const char * name = 0 ) KDE_DEPRECATED;
static KURLDrag * newDrag( const KURL::List &urls, const QMap<QString, QString>& metaData,
QWidget* dragSource = 0, const char * name = 0 ) KDE_DEPRECATED;
QMap<QString, QString> &metaData() { return m_metaData; }
static bool decode( const QMimeSource *e, KURL::List &urls );
static bool decode( const QMimeSource *e, KURL::List &urls, QMap<QString,QString>& metaData );
static QString urlToString(const KURL &url);
static KURL stringToUrl(const QCString &s);
#ifdef Q_WS_QWS
static bool decode( QStringList const &e, KURL::List &uris );
#endif
virtual const char * format( int i ) const;
virtual QByteArray encodedData( const char* mime ) const;
protected:
KURLDrag( const QStrList & urls, const QMap<QString,QString>& metaData,
QWidget * dragSource, const char* name ) KDE_DEPRECATED;
private:
void init(const KURL::List &urls);
QStrList m_urls;
QMap<QString,QString> m_metaData;
KURLDragPrivate* d;
};
#endif
KURL
Represents and parses a URL.
Definition: kurl.h:127
KURLDrag::metaData
QMap< QString, QString > & metaData()
Meta-data to associate with those URLs.
Definition: kurldrag.h:100
KURL::List
KURL::List is a QValueList that contains KURLs with a few convenience methods.
Definition: kurl.h:187
KURLDrag
This class is to be used instead of QUriDrag when using KURL.
Definition: kurldrag.h:44

KDE Home | KDE Accessibility Home | Description of Access Keys