Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / apps / lib / konq / konqmimedata.h
blob9d4ede968e22775902f396f64e55a3b2c475049e
1 /* This file is part of the KDE projects
2 Copyright (C) 2005 David Faure <faure@kde.org>
4 This library 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, or (at your option) any later version.
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 General Public License for more details.
14 You should have received a copy of the GNU 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.
20 #ifndef KONQMIMEDATA_H
21 #define KONQMIMEDATA_H
23 #include <libkonq_export.h>
24 #include <kurl.h>
25 class QMimeData;
27 /**
28 * This class provides functions for creating and decoding clipboard/drag-n-drop data
29 * of URLs. In particular it ships: (kde) urls, most-local urls, and an "is cut" boolean.
31 class LIBKONQ_EXPORT KonqMimeData
33 public:
34 /**
35 * Populate a QMimeData with urls, and whether they were cut or copied.
37 * @param mimeData pointer to the the mimeData object to be populated.
38 * Must not be 0.
39 * @param kdeURLs list of urls (which can include kde-specific protocols).
40 * This list can be empty if only local urls are being used anyway.
41 * @param mostLocalURLs "most local urls" (which try to resolve those to file:/ where possible),
42 * @param cut if true, the user selected "cut" (saved as application/x-kde-cutselection in the mimedata).
44 static void populateMimeData( QMimeData* mimeData,
45 const KUrl::List& kdeURLs,
46 const KUrl::List& mostLocalURLs,
47 bool cut = false );
49 // TODO other methods for icon positions
51 /**
52 * @return true if the urls in @p mimeData were cut
54 static bool decodeIsCutSelection( const QMimeData *mimeData );
57 #endif /* KONQMIMEDATA_H */