kexi

kexidragobjects.h
1/* This file is part of the KDE project
2 Copyright (C) 2002, 2003 Joseph Wenninger <jowenn@kde.org>
3 Copyright (C) 2005 Jaroslaw Staniek <js@iidea.pl>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20
21#ifndef KEXI_DRAGOBJECTS_H_
22#define KEXI_DRAGOBJECTS_H_
23
24#include <tqdragobject.h>
25
26class TQString;
27class TQStringList;
28class TQWidget;
29
31class KEXICORE_EXPORT KexiFieldDrag : public TQStoredDrag
32{
33 public:
35 KexiFieldDrag(const TQString& sourceMimeType, const TQString& sourceName,
36 const TQString& field, TQWidget *parent, const char *name);
37
40 KexiFieldDrag(const TQString& sourceMimeType, const TQString& sourceName,
41 const TQStringList& field, TQWidget *parent=0, const char *name=0);
42
44
45 void addField(const TQString& field);
46
49 static bool canDecodeSingle( TQMimeSource* e );
50
55 static bool canDecodeMultiple( TQMimeSource* e );
56
60 static bool decodeSingle( TQDropEvent* e, TQString& sourceMimeType,
61 TQString& sourceName, TQString& field );
62
66 static bool decodeMultiple( TQDropEvent* e, TQString& sourceMimeType,
67 TQString& sourceName, TQStringList& fields );
68};
69
70class KEXICORE_EXPORT KexiDataProviderDrag : public TQStoredDrag
71{
72 public:
73 KexiDataProviderDrag(const TQString& sourceMimeType, const TQString& sourceName,
74 TQWidget *parent=0, const char *name=0);
75 ~KexiDataProviderDrag() { };
76
77 static bool canDecode( TQDragMoveEvent* e);
78 static bool decode( TQDropEvent* e, TQString& sourceMimeType, TQString& sourceName);
79
80};
81
82#endif
static bool canDecodeMultiple(TQMimeSource *e)
static bool canDecodeSingle(TQMimeSource *e)
KexiFieldDrag(const TQString &sourceMimeType, const TQString &sourceName, const TQString &field, TQWidget *parent, const char *name)
implementation of KexiFieldDrag
static bool decodeSingle(TQDropEvent *e, TQString &sourceMimeType, TQString &sourceName, TQString &field)
static bool decodeMultiple(TQDropEvent *e, TQString &sourceMimeType, TQString &sourceName, TQStringList &fields)