• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDE3Support

  • kde3support
  • kdecore
k3urldrag.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 Copyright (C) 2000 David Faure <faure@kde.org>
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this program; see the file COPYING. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KUrlDRAG_H
21#define KUrlDRAG_H
22
23#include <kde3support_export.h>
24#include <kurl.h>
25
26#include <QtCore/QStringList>
27#include <Qt3Support/Q3ColorDrag>
28
29class QMimeSource;
30
31class K3URLDragPrivate;
46class KDE3SUPPORT_EXPORT K3URLDrag : public Q3UriDrag
47{
48public:
58 K3URLDrag( const KUrl::List &urls, QWidget* dragSource = 0 );
68 K3URLDrag( const KUrl::List &urls, const QMap<QString, QString>& metaData,
69 QWidget* dragSource = 0 );
70
71 virtual ~K3URLDrag();
72
79 void setExportAsText( bool exp );
80
84 static K3URLDrag * newDrag( const KUrl::List &urls, QWidget* dragSource = 0 );
85
89 static K3URLDrag * newDrag( const KUrl::List &urls,
90 const QMap<QString, QString>& metaData,
91 QWidget* dragSource = 0 );
92
100 QMap<QString, QString> &metaData();
101
110 static bool decode( const QMimeSource *e, KUrl::List &urls );
111
122 static bool decode( const QMimeSource *e, KUrl::List &urls, QMap<QString,QString>& metaData );
123
127 static QString urlToString(const KUrl &url);
128
132 static KUrl stringToUrl(const QByteArray &s);
133
134#ifdef Q_WS_QWS
140 static bool decode( QStringList const &e, KUrl::List &uris );
141#endif
142
144 virtual const char * format( int i ) const;
146 virtual QByteArray encodedData( const char* mime ) const;
147
148protected:
152 K3URLDrag( const Q3StrList & urls, const QMap<QString,QString>& metaData,
153 QWidget * dragSource );
154
155private:
156 void init(const KUrl::List &urls);
157
158 Q3StrList m_urls;
159 QMap<QString,QString> m_metaData;
160 K3URLDragPrivate* d;
161};
162
163#endif
164
K3URLDrag
This class is to be used instead of Q3UriDrag when using KUrl.
Definition: k3urldrag.h:47
K3URLDrag::decode
static bool decode(QStringList const &e, KUrl::List &uris)
Convenience method that decodes the contents of e into a list of KUrls for Qt versions without a MIME...
KUrl::List
KUrl
Q3UriDrag
QMap
QWidget
kde3support_export.h
kurl.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDE3Support

Skip menu "KDE3Support"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal