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 confirmDeletion (const QList< QUrl > &files)
 
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 Function Documentation

◆ confirmDeletion()

bool FileUndoManager::UiInterface::confirmDeletion ( const QList< QUrl > &  files)
virtual

Called when we are about to remove those files.

Return true if we should proceed with deleting them. Deprecated since 5.79, no longer called.

Definition at line 744 of file fileundomanager.cpp.

◆ 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 720 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 715 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 752 of file fileundomanager.cpp.

◆ setParentWidget()

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

Sets the parent widget to use for message boxes.

Definition at line 757 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 762 of file fileundomanager.cpp.

◆ showProgressInfo()

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

Definition at line 767 of file fileundomanager.cpp.

◆ virtual_hook()

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

, for future extensions

Definition at line 772 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-2023 The KDE developers.
Generated on Thu Mar 23 2023 03:59:44 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.