Pages
API Documentation
On this page

KIO::FileUndoManager::UiInterface Class

productname. More...

  • Header: #include <UiInterface>
  • CMake: find_package(KF6 REQUIRED COMPONENTS KIO)
    target_link_libraries(mytarget PRIVATE KF6::KIOWidgets)

List of all members, including inherited members

Public Functions

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.

Member Function Documentation

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

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.

[virtual] void UiInterface::jobError(KIO::Job *job)

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

QWidget *UiInterface::parentWidget() const

Returns the parent widget passed to the last call to undo(parentWidget), or nullptr.

See also setParentWidget()

void UiInterface::setParentWidget(QWidget *parentWidget)

Sets the parent widget to use for message boxes.

See also parentWidget()

void UiInterface::setShowProgressInfo(bool b)

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

See also showProgressInfo()

bool UiInterface::showProgressInfo() const

Returns whether progress info dialogs are shown while undoing.

See also setShowProgressInfo()

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.