kexi

kexidragobjects.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2002, 2003 Joseph Wenninger <jowenn@kde.org>
00003    Copyright (C) 2005 Jaroslaw Staniek <js@iidea.pl>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KEXI_DRAGOBJECTS_H_
00022 #define KEXI_DRAGOBJECTS_H_
00023 
00024 #include <qdragobject.h>
00025 
00026 class QString;
00027 class QStringList;
00028 class QWidget;
00029 
00031 class KEXICORE_EXPORT KexiFieldDrag : public QStoredDrag
00032 {
00033     public:
00035         KexiFieldDrag(const QString& sourceMimeType, const QString& sourceName, 
00036             const QString& field, QWidget *parent, const char *name);
00037 
00040         KexiFieldDrag(const QString& sourceMimeType, const QString& sourceName, 
00041             const QStringList& field, QWidget *parent=0, const char *name=0);
00042 
00043         ~KexiFieldDrag();
00044 
00045         void addField(const QString& field);
00046 
00049         static bool canDecodeSingle( QMimeSource* e );
00050 
00055         static bool canDecodeMultiple( QMimeSource* e );
00056 
00060         static bool decodeSingle( QDropEvent* e, QString& sourceMimeType, 
00061             QString& sourceName, QString& field );
00062 
00066         static bool decodeMultiple( QDropEvent* e, QString& sourceMimeType, 
00067             QString& sourceName, QStringList& fields );
00068 };
00069 
00070 class KEXICORE_EXPORT KexiDataProviderDrag : public QStoredDrag
00071 {
00072     public:
00073         KexiDataProviderDrag(const QString& sourceMimeType, const QString& sourceName, 
00074         QWidget *parent=0, const char *name=0);
00075         ~KexiDataProviderDrag() { };
00076 
00077         static bool canDecode( QDragMoveEvent* e);
00078         static bool decode( QDropEvent* e, QString& sourceMimeType, QString& sourceName);
00079 
00080 };
00081 
00082 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys