VPTissue Reference Manual
SimShell::Gui::SaveChangesDialog Class Reference

Dialog window that displays a tree of objects containing unsaved changes. More...

#include <SaveChangesDialog.h>

Inheritance diagram for SimShell::Gui::SaveChangesDialog:
Inheritance graph
Collaboration diagram for SimShell::Gui::SaveChangesDialog:
Collaboration graph

Static Public Member Functions

static bool Prompt (HasUnsavedChanges *widget, QWidget *parent=nullptr)
 Create and display a dialog from a HasUnsavedChanges interface. More...
 

Detailed Description

Dialog window that displays a tree of objects containing unsaved changes.

For each object, a checkbox exists such that the user can select which objects to save and which to discard.

Typically you want to show this dialog when closing an object.

Definition at line 45 of file SaveChangesDialog.h.

Member Function Documentation

bool SimShell::Gui::SaveChangesDialog::Prompt ( HasUnsavedChanges widget,
QWidget parent = nullptr 
)
static

Create and display a dialog from a HasUnsavedChanges interface.

If user clicks "Save", all checked items will be saved. Unless user clicks "Cancel", all HasUnsavedChanges interfaces will be force-closed.

Parameters
parentDialog parent widget.
prompt_mapA map containing PromptOnClose interfaces, indexed by some title. If empty, "true" will be returned immediately (no dialog will be shown).
Returns
true if user clicked "Save" or "Discard", false if user clicked "Cancel".

Definition at line 76 of file SaveChangesDialog.cpp.

References SimShell::Gui::HasUnsavedChanges::begin(), SimShell::Gui::HasUnsavedChanges::ForceClose(), and SimShell::Gui::CheckableTreeModel::ToPTree().

Referenced by SimShell::Gui::HasUnsavedChangesPrompt::PromptClose().

Here is the call graph for this function:

Here is the caller graph for this function:


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