COOLFluiD  Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
Public Types | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
ConfirmCommitDialog Class Reference

Dialog used to ask user whether modifcations have to be committed before continuing. More...

#include <ConfirmCommitDialog.hpp>

Inherits QDialog.

Public Types

enum  CommitConfirmation {
  COMMIT, DONT_COMMIT, YES, NO,
  CANCEL
}
 Commit confirmation enum Indicates on which button the user clicked. More...
 

Public Member Functions

 ConfirmCommitDialog (QWidget *parent=nullptr)
 Constructor. More...
 
 ~ConfirmCommitDialog ()
 Destructor. More...
 
ConfirmCommitDialog::CommitConfirmation show (core::CommitDetails &commitDetails)
 Shows the dialog. More...
 

Private Slots

void button_clicked ()
 Slot called when a button is clicked. More...
 

Private Member Functions

void create_button (const QString &text, CommitConfirmation commConf, QDialogButtonBox::ButtonRole role)
 Creates a button. More...
 

Private Attributes

QDialogButtonBox * m_button_box
 Button box. More...
 
QVBoxLayout * m_main_layout
 Main layout. More...
 
QTableView * m_details_view
 View to show the commit details. More...
 
QLabel * m_lab_text
 Label for the text. More...
 
CommitConfirmation m_answer
 User answer. More...
 
QHash< CommitConfirmation, QPushButton * > m_buttons
 Dialog buttons. More...
 

Detailed Description

Dialog used to ask user whether modifcations have to be committed before continuing.

This dialog is used, for instance, when user clicks on another node or closes the application without committing.

Definition at line 40 of file ConfirmCommitDialog.hpp.

Member Enumeration Documentation

Commit confirmation enum Indicates on which button the user clicked.

Enumerator
COMMIT 

The user clicked on "Commit".

DONT_COMMIT 

The user clicked on "Don't commit".

YES 

The user clicked on "Yes".

NO 

The user clicked on "No".

CANCEL 

The user clicked on "Cancel".

Definition at line 48 of file ConfirmCommitDialog.hpp.

Constructor & Destructor Documentation

ConfirmCommitDialog ( QWidget *  parent = nullptr)

Constructor.

Parameters
parentDialog parent. May be null.

Definition at line 27 of file ConfirmCommitDialog.cpp.

Destructor.

Free all allocated memory. Parent is not destroyed.

Definition at line 54 of file ConfirmCommitDialog.cpp.

Member Function Documentation

void button_clicked ( )
privateslot

Slot called when a button is clicked.

Definition at line 86 of file ConfirmCommitDialog.cpp.

void create_button ( const QString &  text,
CommitConfirmation  commConf,
QDialogButtonBox::ButtonRole  role 
)
private

Creates a button.

Parameters
textButton text.
commConfConfimation type.
roleButton role.

Definition at line 100 of file ConfirmCommitDialog.cpp.

Shows the dialog.

Parameters
commitDetailsCommit details to show.
Returns
Returns the user answer.

Definition at line 71 of file ConfirmCommitDialog.cpp.

Member Data Documentation

CommitConfirmation m_answer
private

User answer.

Definition at line 111 of file ConfirmCommitDialog.hpp.

QDialogButtonBox* m_button_box
private

Button box.

Definition at line 99 of file ConfirmCommitDialog.hpp.

QHash<CommitConfirmation, QPushButton *> m_buttons
private

Dialog buttons.

Definition at line 114 of file ConfirmCommitDialog.hpp.

QTableView* m_details_view
private

View to show the commit details.

Definition at line 105 of file ConfirmCommitDialog.hpp.

QLabel* m_lab_text
private

Label for the text.

Definition at line 108 of file ConfirmCommitDialog.hpp.

QVBoxLayout* m_main_layout
private

Main layout.

Definition at line 102 of file ConfirmCommitDialog.hpp.


The documentation for this class was generated from the following files:
Send comments to:
COOLFluiD Web Admin