kurldrag.h Source File (kdecore Library)

| # kdecore Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | 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 class QMimeSource;
    00027
    00028 class KURLDragPrivate;
    00043 class KURLDrag : public QUriDrag
    00044 {
    00045 public:
    00055   KURLDrag( const KURL::List &urls, QWidget* dragSource, const char * name );
    00065   KURLDrag( const KURL::List &urls, const QMap<QString, QString>& metaData,
    00066             QWidget* dragSource, const char * name );
    00067
    00068   virtual ~KURLDrag();
    00069
    00073   static KURLDrag * newDrag( const KURL::List &urls, QWidget* dragSource = 0, const char * name = 0 );
    00074
    00078   static KURLDrag * newDrag( const KURL::List &urls, const QMap<QString, QString>& metaData,
    00079                              QWidget* dragSource = 0, const char * name = 0 );
    00080
    00088   QMap<QString, QString> &metaData() { return m_metaData; }
    00089
    00097   static bool decode( const QMimeSource *e, KURL::List &urls );
    00098
    00108   static bool decode( const QMimeSource *e, KURL::List &urls, QMap<QString,QString>& metaData );
    00109
    00110 #ifdef Q_WS_QWS
    00111
    00115   static bool decode( QStringList const &e, KURL::List &uris );
    00116 #endif
    00117
    00118 protected:
    00122   KURLDrag( const QStrList & urls, const QMap<QString,QString>& metaData,
    00123             QWidget * dragSource, const char* name ) :
    00124       QUriDrag( urls, dragSource, name ), m_urls( urls ), m_metaData( metaData ) {}
    00125
    00126   virtual const char * format( int i ) const;
    00127   virtual QByteArray encodedData( const char* mime ) const;
    00128
    00129 private:
    00130   void init(const KURL::List &urls);
    00131
    00132   QStrList m_urls;
    00133   QMap<QString,QString> m_metaData;
    00134   KURLDragPrivate* d;
    00135 };
    00136
    00137 #endif

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:46:59 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001