konq_drag.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __konqdrag_h__
00020 #define __konqdrag_h__
00021
00022 #include <qdragobject.h>
00023 #include <qrect.h>
00024 #include <qstring.h>
00025 #include <qiconview.h>
00026
00027 #include <libkonq_export.h>
00028
00029 #include <kurl.h>
00030
00031
00032
00033
00034
00035
00036
00037
00038 class LIBKONQ_EXPORT KonqIconDrag : public QIconDrag
00039 {
00040 Q_OBJECT
00041
00042 public:
00043 KonqIconDrag( QWidget * dragSource, const char* name = 0 );
00044 virtual ~KonqIconDrag() {}
00045
00046 const char* format( int i ) const;
00047 QByteArray encodedData( const char* mime ) const;
00048
00049 void append( const QIconDragItem &item, const QRect &pr,
00050 const QRect &tr, const QString &url );
00051
00052 void setMoveSelection( bool move ) { m_bCutSelection = move; }
00053
00054 static bool canDecode( const QMimeSource* e );
00055
00056 protected:
00057 QStringList urls;
00058 bool m_bCutSelection;
00059 };
00060
00061
00062 class LIBKONQ_EXPORT KonqDrag : public QUriDrag
00063 {
00064 public:
00065 static KonqDrag * newDrag( const KURL::List & urls, bool move, QWidget * dragSource = 0, const char* name = 0 );
00066
00067 protected:
00068 KonqDrag( const QStrList & urls, bool move, QWidget * dragSource, const char* name );
00069
00070 public:
00071 virtual ~KonqDrag() {}
00072
00073 virtual const char* format( int i ) const;
00074 virtual QByteArray encodedData( const char* mime ) const;
00075
00076 void setMoveSelection( bool move ) { m_bCutSelection = move; }
00077
00078
00079 static bool decodeIsCutSelection( const QMimeSource *e );
00080
00081 protected:
00082 bool m_bCutSelection;
00083 QStrList m_urls;
00084 };
00085
00086 #endif
This file is part of the documentation for libkonq Library Version 3.4.1.