• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libkonq

KonqFileUndoManager Class Reference

#include <konq_fileundomanager.h>

Inheritance diagram for KonqFileUndoManager:

Inheritance graph
[legend]

List of all members.


Detailed Description

KonqFileUndoManager: makes it possible to undo kio jobs.

This class is a singleton, use self() to access its only instance.

Definition at line 42 of file konq_fileundomanager.h.


Public Types

enum  CommandType {
  COPY, MOVE, RENAME, LINK,
  MKDIR, TRASH
}

Public Slots

void undo ()
QByteArray get () const

Signals

void undoAvailable (bool avail)
void undoTextChanged (const QString &text)
void undoJobFinished ()
void push (const QByteArray &command)
void pop ()
void lock ()
void unlock ()

Public Member Functions

virtual ~KonqFileUndoManager ()
void setUiInterface (UiInterface *ui)
void recordJob (CommandType op, const KUrl::List &src, const KUrl &dst, KIO::Job *job)
bool undoAvailable () const
QString undoText () const
quint64 newCommandSerialNumber ()
quint64 currentCommandSerialNumber ()

Static Public Member Functions

static void incRef ()
static void decRef ()
static KonqFileUndoManager * self ()

Friends

class KonqUndoJob
class KonqCommandRecorder

Classes

class  UiInterface

Member Enumeration Documentation

enum KonqFileUndoManager::CommandType

Enumerator:
COPY 
MOVE 
RENAME 
LINK 
MKDIR 
TRASH 

Definition at line 90 of file konq_fileundomanager.h.


Constructor & Destructor Documentation

KonqFileUndoManager::~KonqFileUndoManager (  )  [virtual]

Definition at line 224 of file konq_fileundomanager.cpp.


Member Function Documentation

void KonqFileUndoManager::incRef (  )  [static]

Definition at line 229 of file konq_fileundomanager.cpp.

void KonqFileUndoManager::decRef (  )  [static]

Definition at line 234 of file konq_fileundomanager.cpp.

KonqFileUndoManager * KonqFileUndoManager::self (  )  [static]

Definition at line 244 of file konq_fileundomanager.cpp.

void KonqFileUndoManager::setUiInterface ( UiInterface *  ui  ) 

Set a new UiInterface implementation.

This deletes the previous one.

Definition at line 709 of file konq_fileundomanager.cpp.

void KonqFileUndoManager::recordJob ( CommandType  op,
const KUrl::List &  src,
const KUrl &  dst,
KIO::Job *  job 
)

Record this job while it's happening and add a command for it so that the user can undo it.

Parameters:
op the type of job - which is also the type of command that will be created for it
src list of source urls
dst destination url
job the job to record

Definition at line 255 of file konq_fileundomanager.cpp.

bool KonqFileUndoManager::undoAvailable (  )  const

Definition at line 266 of file konq_fileundomanager.cpp.

QString KonqFileUndoManager::undoText (  )  const

Definition at line 271 of file konq_fileundomanager.cpp.

quint64 KonqFileUndoManager::newCommandSerialNumber (  ) 

These two functions are useful when wrapping KonqFileUndoManager and adding custom commands.

Each command has a unique ID. You can get a new serial number for a custom command with newCommandSerialNumber(), and then when you want to undo, check if the command KonqFileUndoManager would undo is newer or older than your custom command.

Definition at line 295 of file konq_fileundomanager.cpp.

quint64 KonqFileUndoManager::currentCommandSerialNumber (  ) 

Definition at line 300 of file konq_fileundomanager.cpp.

void KonqFileUndoManager::undo (  )  [slot]

Undoes the last command.

Definition at line 311 of file konq_fileundomanager.cpp.

QByteArray KonqFileUndoManager::get (  )  const [slot]

Definition at line 627 of file konq_fileundomanager.cpp.

void KonqFileUndoManager::undoAvailable ( bool  avail  )  [signal]

Emitted when the value of undoAvailable() changes.

void KonqFileUndoManager::undoTextChanged ( const QString &  text  )  [signal]

Emitted when the value of undoText() changes.

void KonqFileUndoManager::undoJobFinished (  )  [signal]

Emitted when an undo job finishes. Used for unit testing.

void KonqFileUndoManager::push ( const QByteArray &  command  )  [signal]

void KonqFileUndoManager::pop (  )  [signal]

void KonqFileUndoManager::lock (  )  [signal]

void KonqFileUndoManager::unlock (  )  [signal]


Friends And Related Function Documentation

friend class KonqUndoJob [friend]

Definition at line 150 of file konq_fileundomanager.h.

friend class KonqCommandRecorder [friend]

Definition at line 154 of file konq_fileundomanager.h.


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

libkonq

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

API Reference

Skip menu "API Reference"
  • Konsole
  • Libraries
  •   libkonq
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal