ORE Studio 0.0.4
Loading...
Searching...
No Matches
Signals | Protected Member Functions | List of all members
DetailDialogBase Class Reference

Base class for all detail dialogs. More...

#include <DetailDialogBase.hpp>

Inheritance diagram for DetailDialogBase:
Inheritance graph
Collaboration diagram for DetailDialogBase:
Collaboration graph

Signals

void closeRequested ()
 Emitted when the dialog wants to close its container window.
 
void statusMessage (const QString &message)
 Emitted to show a status message in the status bar.
 
void errorMessage (const QString &message)
 Emitted when an error occurs that should be shown to the user.
 

Protected Member Functions

void requestClose ()
 Request closure of the container window.
 
void notifySaveSuccess (const QString &message)
 Notify that a save operation completed successfully.
 

Detailed Description

Base class for all detail dialogs.

Provides common functionality for detail dialogs including:

This allows dialogs to request closure without knowing about their container (e.g., DetachableMdiSubWindow). The controller wires the closeRequested signal to the container's close slot.

Save Success Pattern

After a successful save operation, dialogs should:

  1. Emit their entity-specific "saved" signal (e.g., dimensionSaved)
  2. Call notifySaveSuccess() with a status message

Example:

if (result.success) {
emit dimensionSaved(code);
notifySaveSuccess(tr("Dimension '%1' saved").arg(code));
}
void notifySaveSuccess(const QString &message)
Notify that a save operation completed successfully.
Definition DetailDialogBase.hpp:102

Member Function Documentation

◆ closeRequested

void closeRequested ( )
signal

Emitted when the dialog wants to close its container window.

Controllers should connect this signal to the container window's close() slot to enable decoupled window management.

Here is the caller graph for this function:

◆ statusMessage

void statusMessage ( const QString &  message)
signal

Emitted to show a status message in the status bar.

Controllers should connect this signal to the main window's status bar.

Here is the caller graph for this function:

◆ requestClose()

void requestClose ( )
protected

Request closure of the container window.

Call this instead of parentWidget()->close() to maintain decoupling between the dialog and its container.

Here is the caller graph for this function:

◆ notifySaveSuccess()

void notifySaveSuccess ( const QString &  message)
protected

Notify that a save operation completed successfully.

This method handles the common post-save behavior:

  1. Emits statusMessage with the provided message
  2. Closes the dialog via requestClose()

Call this after emitting any entity-specific "saved" signal.

Parameters
messageStatus message to display (e.g., "Currency 'USD' saved")