KIO::FileUndoManager::UiInterface

Search for usage in LXR

KIO::FileUndoManager::UiInterface Class Reference

#include <fileundomanager.h>

Public Types

enum  { HookGetAskUserActionInterface = 1 }
 

Public Member Functions

virtual bool copiedFileWasModified (const QUrl &src, const QUrl &dest, const QDateTime &srcTime, const QDateTime &destTime)
 
virtual void jobError (KIO::Job *job)
 
QWidgetparentWidget () const
 
void setParentWidget (QWidget *parentWidget)
 
void setShowProgressInfo (bool b)
 
bool showProgressInfo () const
 
virtual void virtual_hook (int id, void *data)
 

Detailed Description

Interface for the gui handling of FileUndoManager.

This includes three events currently:

  • error when undoing a job
  • (until KF 5.78) confirm deletion before undoing a copy job
  • confirm deletion when the copied file has been modified afterwards

By default UiInterface shows message boxes in all three cases; applications can reimplement this interface to provide different user interfaces.

Definition at line 56 of file fileundomanager.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Definition at line 94 of file fileundomanager.h.

Constructor & Destructor Documentation

◆ UiInterface()

FileUndoManager::UiInterface::UiInterface ( )

Definition at line 703 of file fileundomanager.cpp.

Member Function Documentation

◆ copiedFileWasModified()

bool FileUndoManager::UiInterface::copiedFileWasModified ( const QUrl & src,
const QUrl & dest,
const QDateTime & srcTime,
const QDateTime & destTime )
virtual

Called when dest was modified since it was copied from src.

Note that this is called after confirmDeletion. Return true if we should proceed with deleting dest.

Definition at line 715 of file fileundomanager.cpp.

◆ jobError()

void FileUndoManager::UiInterface::jobError ( KIO::Job * job)
virtual

Called when an undo job errors; default implementation displays a message box.

Definition at line 710 of file fileundomanager.cpp.

◆ parentWidget()

QWidget * FileUndoManager::UiInterface::parentWidget ( ) const
Returns
the parent widget passed to the last call to undo(parentWidget), or nullptr.

Definition at line 739 of file fileundomanager.cpp.

◆ setParentWidget()

void FileUndoManager::UiInterface::setParentWidget ( QWidget * parentWidget)

Sets the parent widget to use for message boxes.

Definition at line 744 of file fileundomanager.cpp.

◆ setShowProgressInfo()

void FileUndoManager::UiInterface::setShowProgressInfo ( bool b)

Sets whether to show progress info when running the KIO jobs for undoing.

Definition at line 749 of file fileundomanager.cpp.

◆ showProgressInfo()

bool FileUndoManager::UiInterface::showProgressInfo ( ) const
Returns
whether progress info dialogs are shown while undoing.

Definition at line 754 of file fileundomanager.cpp.

◆ virtual_hook()

void FileUndoManager::UiInterface::virtual_hook ( int id,
void * data )
virtual

, for future extensions

Definition at line 759 of file fileundomanager.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:52 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.