19 #ifndef __konq_operations_h__
20 #define __konq_operations_h__
23 #include <libkonq_export.h>
28 namespace TDEIO {
class Job;
class CopyInfo; }
48 static void editMimeType(
const TQString & mimeType );
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 );
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 );
85 static void doPaste( TQWidget * parent,
const KURL & destURL,
const TQPoint &pos );
86 static void doPaste( TQWidget * parent,
const KURL & destURL );
88 static void emptyTrash();
89 static void restoreTrashedItems(
const KURL::List& urls );
94 static void mkdir( TQWidget *parent,
const KURL & url );
102 static void statURL(
const KURL & url,
const TQObject *receiver,
const char *member );
110 static void rename( TQWidget * parent,
const KURL & oldurl,
const TQString & name );
120 static void rename( TQWidget * parent,
const KURL & oldurl,
const KURL & newurl );
127 static void newDir( TQWidget * parent,
const KURL & baseURL );
129 enum ConfirmationType { DEFAULT_CONFIRMATION, SKIP_CONFIRMATION, FORCE_CONFIRMATION };
138 static bool askDeleteConfirmation(
const KURL::List & selectedURLs,
int method, ConfirmationType confirmation, TQWidget* widget );
141 void statFinished(
const KFileItem * item );
142 void aboutToCreate(
const TQPoint &pos,
const TQValueList<TDEIO::CopyInfo> &files);
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 );
150 void setOperation( TDEIO::Job * job,
int method,
const KURL::List & src,
const KURL & dest );
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) {}
159 TQMap<TQString,TQString> metaData;
161 TQDropEvent::Action action;
164 void setDropInfo( DropInfo * info ) { m_info = info; }
173 void setPasteInfo( KIOPasteInfo * info ) { m_pasteInfo = info; }
176 TQWidget* parentWidget()
const;
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 );
192 KIOPasteInfo * m_pasteInfo;
195 #include <tdeio/job.h>
206 virtual void slotStart();
207 virtual void slotResult( TDEIO::Job *job );
210 const KURL::List m_urls;
211 KURL::List::const_iterator m_urlsIterator;
Restore multiple trashed files.
Implements file operations (move,del,trash,shred,paste,copy,move,link...) for konqueror and kdesktop ...