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

libkonq

  • libkonq
konq_operations.h
1/* This file is part of the KDE project
2 Copyright (C) 2000 David Faure <faure@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 __konq_operations_h__
20#define __konq_operations_h__
21
22#include <kurl.h>
23#include <libkonq_export.h>
24
25#include <tqobject.h>
26#include <tqevent.h>
27
28namespace TDEIO { class Job; class CopyInfo; }
29class TQWidget;
30class KFileItem;
31class KonqMainWindow;
32
37class LIBKONQ_EXPORT KonqOperations : public TQObject
38{
39 TQ_OBJECT
40protected:
41 KonqOperations( TQWidget * parent );
42 virtual ~KonqOperations();
43
44public:
48 static void editMimeType( const TQString & mimeType );
49
50 enum { TRASH, DEL, SHRED, COPY, MOVE, LINK, EMPTYTRASH, STAT, MKDIR, RESTORE, UNKNOWN };
58 static void del( TQWidget * parent, int method, const KURL::List & selectedURLs );
59
70 static void copy( TQWidget * parent, int method, const KURL::List & selectedURLs, const KURL& destURL );
80 static void doDrop( const KFileItem * destItem, const KURL & destURL, TQDropEvent * ev, TQWidget * parent );
81
85 static void doPaste( TQWidget * parent, const KURL & destURL, const TQPoint &pos );
86 static void doPaste( TQWidget * parent, const KURL & destURL );
87
88 static void emptyTrash();
89 static void restoreTrashedItems( const KURL::List& urls );
90
94 static void mkdir( TQWidget *parent, const KURL & url );
95
102 static void statURL( const KURL & url, const TQObject *receiver, const char *member );
103
110 static void rename( TQWidget * parent, const KURL & oldurl, const TQString & name );
111
120 static void rename( TQWidget * parent, const KURL & oldurl, const KURL & newurl );
121
127 static void newDir( TQWidget * parent, const KURL & baseURL );
128
129 enum ConfirmationType { DEFAULT_CONFIRMATION, SKIP_CONFIRMATION, FORCE_CONFIRMATION };
138 static bool askDeleteConfirmation( const KURL::List & selectedURLs, int method, ConfirmationType confirmation, TQWidget* widget );
139
140signals:
141 void statFinished( const KFileItem * item );
142 void aboutToCreate(const TQPoint &pos, const TQValueList<TDEIO::CopyInfo> &files);
143
144protected:
145 void _del( int method, const KURL::List & selectedURLs, ConfirmationType confirmation );
146 void _restoreTrashedItems( const KURL::List& urls );
147 void _statURL( const KURL & url, const TQObject *receiver, const char *member );
148
149 // internal, for COPY/MOVE/LINK/MKDIR
150 void setOperation( TDEIO::Job * job, int method, const KURL::List & src, const KURL & dest );
151
152 struct DropInfo
153 {
154 DropInfo( uint k, KURL::List & l, const TQMap<TQString,TQString> &m,
155 int x, int y, TQDropEvent::Action a ) :
156 keybstate(k), lst(l), metaData(m), mousePos(x,y), action(a) {}
157 uint keybstate;
158 KURL::List lst;
159 TQMap<TQString,TQString> metaData;
160 TQPoint mousePos;
161 TQDropEvent::Action action;
162 };
163 // internal, for doDrop
164 void setDropInfo( DropInfo * info ) { m_info = info; }
165
166 struct KIOPasteInfo // KDE4: remove and use DropInfo instead or a TQPoint member
167 {
168 TQByteArray data; // unused
169 KURL destURL; // unused
170 TQPoint mousePos;
171 TQString dialogText; // unused
172 };
173 void setPasteInfo( KIOPasteInfo * info ) { m_pasteInfo = info; }
174
175private:
176 TQWidget* parentWidget() const;
177
178protected slots:
179
180 void slotAboutToCreate(TDEIO::Job *job, const TQValueList<TDEIO::CopyInfo> &files);
181 void slotResult( TDEIO::Job * job );
182 void slotStatResult( TDEIO::Job * job );
183 void asyncDrop( const KFileItem * item );
184 void doFileCopy();
185
186private:
187 int m_method;
188 //KURL::List m_srcURLs;
189 KURL m_destURL;
190 // for doDrop
191 DropInfo * m_info;
192 KIOPasteInfo * m_pasteInfo;
193};
194
195#include <tdeio/job.h>
196
198class KonqMultiRestoreJob : public TDEIO::Job
199{
200 TQ_OBJECT
201
202public:
203 KonqMultiRestoreJob( const KURL::List& urls, bool showProgressInfo );
204
205protected slots:
206 virtual void slotStart();
207 virtual void slotResult( TDEIO::Job *job );
208
209private:
210 const KURL::List m_urls;
211 KURL::List::const_iterator m_urlsIterator;
212 int m_progress;
213};
214
215#endif
KonqMultiRestoreJob
Restore multiple trashed files.
Definition: konq_operations.h:199
KonqOperations
Implements file operations (move,del,trash,shred,paste,copy,move,link...) for konqueror and kdesktop ...
Definition: konq_operations.h:38

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.9.4
This website is maintained by Timothy Pearson.