KIO::FileUndoManager::UiInterface Class
class KIO::FileUndoManager::UiInterfacePublic Functions
virtual bool | copiedFileWasModified(const QUrl &src, const QUrl &dest, const QDateTime &srcTime, const QDateTime &destTime) |
virtual void | jobError(KIO::Job *job) |
QWidget * | parentWidget() const |
void | setParentWidget(QWidget *parentWidget) |
void | setShowProgressInfo(bool b) |
bool | showProgressInfo() const |
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().