FOSSredder 0.5.0
Loading...
Searching...
No Matches
ui::window::CloseWorkflow Class Reference

Coordinates close requests that may need a pending workspace save. More...

#include <CloseWorkflow.h>

Public Member Functions

bool allowImmediateClose (QCloseEvent *event)
 Accepts a close event when a deferred close is already authorized.
void requestClose (QCloseEvent *event, const std::function< void()> &requestSave)
 Defers closing and invokes the supplied save request.
bool handleStorageOperationSucceeded (const QString &operation, const QString &saveOperation, const std::function< void()> &closeWindow)
 Completes a deferred close after the matching save succeeded.
bool handleStorageOperationFailed (const QString &operation, const QString &saveOperation)
 Cancels a deferred close after the matching save failed.

Detailed Description

Coordinates close requests that may need a pending workspace save.

Definition at line 19 of file CloseWorkflow.h.

Member Function Documentation

◆ allowImmediateClose()

bool ui::window::CloseWorkflow::allowImmediateClose ( QCloseEvent * event)

Accepts a close event when a deferred close is already authorized.

Parameters
eventClose event received by the main window.
Returns
True when the event was accepted immediately.

Definition at line 12 of file CloseWorkflow.cpp.

◆ handleStorageOperationFailed()

bool ui::window::CloseWorkflow::handleStorageOperationFailed ( const QString & operation,
const QString & saveOperation )

Cancels a deferred close after the matching save failed.

Parameters
operationFailed storage operation name.
saveOperationOperation name expected for close-time save.
Returns
True when the operation was handled as a pending close.

Definition at line 54 of file CloseWorkflow.cpp.

◆ handleStorageOperationSucceeded()

bool ui::window::CloseWorkflow::handleStorageOperationSucceeded ( const QString & operation,
const QString & saveOperation,
const std::function< void()> & closeWindow )

Completes a deferred close after the matching save succeeded.

Parameters
operationCompleted storage operation name.
saveOperationOperation name expected for close-time save.
closeWindowCallback that closes the main window.
Returns
True when the operation was handled as a pending close.

Definition at line 41 of file CloseWorkflow.cpp.

◆ requestClose()

void ui::window::CloseWorkflow::requestClose ( QCloseEvent * event,
const std::function< void()> & requestSave )

Defers closing and invokes the supplied save request.

Parameters
eventClose event that should wait for save completion.
requestSaveCallback that starts the save operation.

Definition at line 21 of file CloseWorkflow.cpp.


The documentation for this class was generated from the following files: