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

libkonq

Public Types | Signals | Static Public Member Functions | Protected Slots | Protected Member Functions | List of all members
KonqOperations Class Reference

#include <konq_operations.h>

Inherits TQObject.

Public Types

enum  {
  TRASH , DEL , SHRED , COPY ,
  MOVE , LINK , EMPTYTRASH , STAT ,
  MKDIR , RESTORE , UNKNOWN
}
 
enum  ConfirmationType { DEFAULT_CONFIRMATION , SKIP_CONFIRMATION , FORCE_CONFIRMATION }
 

Signals

void statFinished (const KFileItem *item)
 
void aboutToCreate (const TQPoint &pos, const TQValueList< TDEIO::CopyInfo > &files)
 

Static Public Member Functions

static void editMimeType (const TQString &mimeType)
 
static void del (TQWidget *parent, int method, const KURL::List &selectedURLs)
 
static void copy (TQWidget *parent, int method, const KURL::List &selectedURLs, const KURL &destURL)
 
static void doDrop (const KFileItem *destItem, const KURL &destURL, TQDropEvent *ev, TQWidget *parent)
 
static void doPaste (TQWidget *parent, const KURL &destURL, const TQPoint &pos)
 
static void doPaste (TQWidget *parent, const KURL &destURL)
 
static void emptyTrash ()
 
static void restoreTrashedItems (const KURL::List &urls)
 
static void mkdir (TQWidget *parent, const KURL &url)
 
static void statURL (const KURL &url, const TQObject *receiver, const char *member)
 
static void rename (TQWidget *parent, const KURL &oldurl, const TQString &name)
 
static void rename (TQWidget *parent, const KURL &oldurl, const KURL &newurl)
 
static void newDir (TQWidget *parent, const KURL &baseURL)
 
static bool askDeleteConfirmation (const KURL::List &selectedURLs, int method, ConfirmationType confirmation, TQWidget *widget)
 

Protected Slots

void slotAboutToCreate (TDEIO::Job *job, const TQValueList< TDEIO::CopyInfo > &files)
 
void slotResult (TDEIO::Job *job)
 
void slotStatResult (TDEIO::Job *job)
 
void asyncDrop (const KFileItem *item)
 
void doFileCopy ()
 

Protected Member Functions

 KonqOperations (TQWidget *parent)
 
void _del (int method, const KURL::List &selectedURLs, ConfirmationType confirmation)
 
void _restoreTrashedItems (const KURL::List &urls)
 
void _statURL (const KURL &url, const TQObject *receiver, const char *member)
 
void setOperation (TDEIO::Job *job, int method, const KURL::List &src, const KURL &dest)
 
void setDropInfo (DropInfo *info)
 
void setPasteInfo (KIOPasteInfo *info)
 

Detailed Description

Implements file operations (move,del,trash,shred,paste,copy,move,link...) for konqueror and kdesktop whatever the view mode is (icon, tree, ...)

Definition at line 37 of file konq_operations.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Definition at line 50 of file konq_operations.h.

◆ ConfirmationType

enum KonqOperations::ConfirmationType

Definition at line 129 of file konq_operations.h.

Constructor & Destructor Documentation

◆ KonqOperations()

KonqOperations::KonqOperations ( TQWidget *  parent)
protected

Definition at line 65 of file konq_operations.cpp.

◆ ~KonqOperations()

KonqOperations::~KonqOperations ( )
protectedvirtual

Definition at line 71 of file konq_operations.cpp.

Member Function Documentation

◆ _del()

void KonqOperations::_del ( int  method,
const KURL::List &  selectedURLs,
ConfirmationType  confirmation 
)
protected

Definition at line 177 of file konq_operations.cpp.

◆ _restoreTrashedItems()

void KonqOperations::_restoreTrashedItems ( const KURL::List &  urls)
protected

Definition at line 230 of file konq_operations.cpp.

◆ _statURL()

void KonqOperations::_statURL ( const KURL &  url,
const TQObject *  receiver,
const char *  member 
)
protected

Definition at line 689 of file konq_operations.cpp.

◆ askDeleteConfirmation()

bool KonqOperations::askDeleteConfirmation ( const KURL::List &  selectedURLs,
int  method,
ConfirmationType  confirmation,
TQWidget *  widget 
)
static

Ask for confirmation before deleting/trashing selectedURLs.

Parameters
selectedURLsthe urls about to be deleted
methodthe type of deletion (DEL for real deletion, anything else for trash)
confirmationdefault (based on config file), skip (no confirmation) or force (always confirm)
widgetparent widget for message boxes
Returns
true if confirmed

Definition at line 238 of file konq_operations.cpp.

◆ asyncDrop

void KonqOperations::asyncDrop ( const KFileItem *  item)
protectedslot

Definition at line 401 of file konq_operations.cpp.

◆ copy()

void KonqOperations::copy ( TQWidget *  parent,
int  method,
const KURL::List &  selectedURLs,
const KURL &  destURL 
)
static

Copy the selectedURLs to the destination destURL.

Parameters
parentparent widget (for error dialog box if any)
methodshould be COPY, MOVE or LINK
selectedURLsthe URLs to copy
destURLdestination of the copy
Todo:
document restrictions on the kind of destination

Definition at line 146 of file konq_operations.cpp.

◆ del()

void KonqOperations::del ( TQWidget *  parent,
int  method,
const KURL::List &  selectedURLs 
)
static

Delete the selectedURLs if possible.

Parameters
parentparent widget (for error dialog box if any)
methodshould be TRASH, DEL or SHRED
selectedURLsthe URLs to be deleted

Definition at line 84 of file konq_operations.cpp.

◆ doDrop()

void KonqOperations::doDrop ( const KFileItem *  destItem,
const KURL &  destURL,
TQDropEvent *  ev,
TQWidget *  parent 
)
static

Drop.

Parameters
destItemdestination KFileItem for the drop (background or item)
destURLdestination URL for the drop.
evthe drop event
parentparent widget (for error dialog box if any)

If destItem is 0L, doDrop will stat the URL to determine it.

Definition at line 315 of file konq_operations.cpp.

◆ doFileCopy

void KonqOperations::doFileCopy ( )
protectedslot

Definition at line 492 of file konq_operations.cpp.

◆ doPaste() [1/2]

void KonqOperations::doPaste ( TQWidget *  parent,
const KURL &  destURL 
)
static

Definition at line 118 of file konq_operations.cpp.

◆ doPaste() [2/2]

void KonqOperations::doPaste ( TQWidget *  parent,
const KURL &  destURL,
const TQPoint &  pos 
)
static

Paste the clipboard contents.

Definition at line 123 of file konq_operations.cpp.

◆ editMimeType()

void KonqOperations::editMimeType ( const TQString &  mimeType)
static

Pop up properties dialog for mimetype mimeType.

Definition at line 77 of file konq_operations.cpp.

◆ emptyTrash()

void KonqOperations::emptyTrash ( )
static

Definition at line 98 of file konq_operations.cpp.

◆ mkdir()

void KonqOperations::mkdir ( TQWidget *  parent,
const KURL &  url 
)
static

Create a directory.

Definition at line 110 of file konq_operations.cpp.

◆ newDir()

void KonqOperations::newDir ( TQWidget *  parent,
const KURL &  baseURL 
)
static

Ask for the name of a new directory and create it.

Parameters
parentthe parent widget
baseURLthe directory to create the new directory in

Definition at line 733 of file konq_operations.cpp.

◆ rename() [1/2]

void KonqOperations::rename ( TQWidget *  parent,
const KURL &  oldurl,
const KURL &  newurl 
)
static

Do a renaming.

Parameters
parentthe parent widget, passed to KonqOperations ctor
oldurlthe current url of the file to be renamed
newurlthe new url for the file Use this version if the other one wouldn't work :) (e.g. because name could be a relative path, including a '/').

Definition at line 630 of file konq_operations.cpp.

◆ rename() [2/2]

void KonqOperations::rename ( TQWidget *  parent,
const KURL &  oldurl,
const TQString &  name 
)
static

Do a renaming.

Parameters
parentthe parent widget, passed to KonqOperations ctor
oldurlthe current url of the file to be renamed
namethe new name for the file. Shouldn't include '/'.

Definition at line 725 of file konq_operations.cpp.

◆ restoreTrashedItems()

void KonqOperations::restoreTrashedItems ( const KURL::List &  urls)
static

Definition at line 104 of file konq_operations.cpp.

◆ setDropInfo()

void KonqOperations::setDropInfo ( DropInfo *  info)
inlineprotected

Definition at line 164 of file konq_operations.h.

◆ setOperation()

void KonqOperations::setOperation ( TDEIO::Job *  job,
int  method,
const KURL::List &  src,
const KURL &  dest 
)
protected

Definition at line 654 of file konq_operations.cpp.

◆ setPasteInfo()

void KonqOperations::setPasteInfo ( KIOPasteInfo *  info)
inlineprotected

Definition at line 173 of file konq_operations.h.

◆ slotAboutToCreate

void KonqOperations::slotAboutToCreate ( TDEIO::Job *  job,
const TQValueList< TDEIO::CopyInfo > &  files 
)
protectedslot

Definition at line 677 of file konq_operations.cpp.

◆ slotResult

void KonqOperations::slotResult ( TDEIO::Job *  job)
protectedslot

Definition at line 713 of file konq_operations.cpp.

◆ slotStatResult

void KonqOperations::slotStatResult ( TDEIO::Job *  job)
protectedslot

Definition at line 697 of file konq_operations.cpp.

◆ statURL()

void KonqOperations::statURL ( const KURL &  url,
const TQObject *  receiver,
const char *  member 
)
static

Get info about a given URL, and when that's done (it's asynchronous!), call a given slot with the KFileItem * as argument.

The KFileItem will be deleted by statURL after calling the slot. Make a copy if you need one !

Definition at line 682 of file konq_operations.cpp.


The documentation for this class was generated from the following files:
  • konq_operations.h
  • konq_operations.cpp

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.