# kdecore Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# kurldrag.h

    00001 /* This file is part of the KDE project
    00002    Copyright (C) 2000 David Faure <faure@kde.org>
    00003
    00004    This program is free software; you can redistribute it and/or
    00005    modify it under the terms of the GNU Library General Public
    00006    License as published by the Free Software Foundation; either
    00007    version 2 of the License.
    00008
    00009    This program is distributed in the hope that it will be useful,
    00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00012    Library General Public License for more details.
    00013
    00014    You should have received a copy of the GNU Library General Public License
    00015    along with this program; see the file COPYING.  If not, write to
    00016    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00017    Boston, MA 02111-1307, USA.
    00018 */
    00019
    00020 #ifndef __KURLDRAG_H
    00021 #define __KURLDRAG_H
    00022
    00023 #include <qstringlist.h>
    00024 #include <qdragobject.h>
    00025 #include <kurl.h>
    00026 #include "kdelibs_export.h"
    00027 class QMimeSource;
    00028
    00029 class KURLDragPrivate;
    00044 class KDECORE_EXPORT KURLDrag : public QUriDrag
    00045 {
    00046 public:
    00057   KURLDrag( const KURL::List &urls, QWidget* dragSource = 0, const char * name = 0 );
    00068   KURLDrag( const KURL::List &urls, const QMap<QString, QString>& metaData,
    00069             QWidget* dragSource = 0, const char * name = 0 );
    00070
    00071   virtual ~KURLDrag();
    00072
    00080   void setExportAsText( bool exp );
    00081
    00085   static KURLDrag * newDrag( const KURL::List &urls, QWidget* dragSource = 0, const char * name = 0 ) KDE_DEPRECATED;
    00086
    00090   static KURLDrag * newDrag( const KURL::List &urls, const QMap<QString, QString>& metaData,
    00091                              QWidget* dragSource = 0, const char * name = 0 ) KDE_DEPRECATED;
    00092
    00100   QMap<QString, QString> &metaData() { return m_metaData; }
    00101
    00110   static bool decode( const QMimeSource *e, KURL::List &urls );
    00111
    00122   static bool decode( const QMimeSource *e, KURL::List &urls, QMap<QString,QString>& metaData );
    00123
    00128   static QString urlToString(const KURL &url);
    00129
    00134   static KURL stringToUrl(const QCString &s);
    00135
    00136 #ifdef Q_WS_QWS
    00137
    00142   static bool decode( QStringList const &e, KURL::List &uris );
    00143 #endif
    00144
    00145 protected:
    00149   KURLDrag( const QStrList & urls, const QMap<QString,QString>& metaData,
    00150             QWidget * dragSource, const char* name ) KDE_DEPRECATED;
    00151
    00152   virtual const char * format( int i ) const;
    00153   virtual QByteArray encodedData( const char* mime ) const;
    00154
    00155 private:
    00156   void init(const KURL::List &urls);
    00157
    00158   QStrList m_urls;
    00159   QMap<QString,QString> m_metaData;
    00160   KURLDragPrivate* d;
    00161 };
    00162
    00163 #endif

This file is part of the documentation for kdecore Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:18:12 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003