• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • libkonq
 

libkonq

  • libkonq
konq_drag.h
1 /* This file is part of the KDE project
2  Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
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
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18 
19 #ifndef __konqdrag_h__
20 #define __konqdrag_h__
21 
22 #include <tqdragobject.h>
23 #include <tqrect.h>
24 #include <tqstring.h>
25 #include <tqiconview.h>
26 
27 #include <libkonq_export.h>
28 
29 #include <kurl.h>
30 
31 /*****************************************************************************
32  *
33  * Class KonqIconDrag
34  *
35  *****************************************************************************/
36 
37 // Clipboard/dnd data for: Icons + URLS + isCut
38 class LIBKONQ_EXPORT KonqIconDrag : public TQIconDrag
39 {
40  Q_OBJECT
41 
42 public:
43  KonqIconDrag( TQWidget * dragSource, const char* name = 0 );
44  virtual ~KonqIconDrag() {}
45 
46  const char* format( int i ) const;
47  TQByteArray encodedData( const char* mime ) const;
48 
49  void append( const TQIconDragItem &item, const TQRect &pr,
50  const TQRect &tr, const TQString &url );
51 
52  void setMoveSelection( bool move ) { m_bCutSelection = move; }
53 
54  static bool canDecode( const TQMimeSource* e );
55 
56 protected: // KDE4: private. And d pointer...
57  TQStringList urls;
58  bool m_bCutSelection;
59 };
60 
66 class LIBKONQ_EXPORT KonqIconDrag2 : public KonqIconDrag
67 {
68  Q_OBJECT
69 
70 public:
71  KonqIconDrag2( TQWidget * dragSource );
72  virtual ~KonqIconDrag2() {}
73 
74  virtual const char* format( int i ) const;
75  virtual TQByteArray encodedData( const char* mime ) const;
76 
77  void append( const TQIconDragItem &item, const TQRect &pr,
78  const TQRect &tr, const TQString &url, const KURL &mostLocalURL );
79 
80 private:
81  TQStringList m_kdeURLs;
82 };
83 
84 // Clipboard/dnd data for: URLS + isCut
85 class LIBKONQ_EXPORT KonqDrag : public TQUriDrag
86 {
87 public:
88  // KDE4: remove, use KonqDrag constructor instead
89  static KonqDrag * newDrag( const KURL::List & urls,
90  bool move, TQWidget * dragSource = 0, const char* name = 0 );
91 
100  KonqDrag( const KURL::List & urls, const KURL::List& mostLocalUrls, bool cut, TQWidget * dragSource = 0 );
101 
102 protected:
103  // KDE4: remove
104  KonqDrag( const TQStrList & urls, bool cut, TQWidget * dragSource, const char* name );
105 
106 public:
107  virtual ~KonqDrag() {}
108 
109  virtual const char* format( int i ) const;
110  virtual TQByteArray encodedData( const char* mime ) const;
111 
112  void setMoveSelection( bool move ) { m_bCutSelection = move; }
113 
114  // Returns true if the data was cut (used for KonqIconDrag too)
115  static bool decodeIsCutSelection( const TQMimeSource *e );
116 
117 protected: // KDE4: private. And d pointer...
118  bool m_bCutSelection;
119  TQStrList m_urls; // this is set to the "most local urls". KDE4: KURL::List
120 };
121 
122 #endif

libkonq

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

libkonq

Skip menu "libkonq"
  • kate
  • libkonq
  • twin
  •   lib
Generated for libkonq by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.