Entropy Piano Tuner  1.1.3 (documentation not yet complete)
An open-source experimental software for piano tuning by entropy minimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
DoNotShowAgainMessageBox Class Reference

A MessageBox with a QCheckBox to remember the decision of the user. More...

#include <donotshowagainmessagebox.h>

+ Inheritance diagram for DoNotShowAgainMessageBox:
+ Collaboration diagram for DoNotShowAgainMessageBox:

Public Types

enum  Type {
  RESET_PITCHES = 0, NOT_ALL_KEYS_RECORDED, TUNING_CURVE_NOT_CALCULATED, TUNING_CURVE_NEEDS_UPDATE,
  COUNT
}
 The type and unique id for the message box. More...
 

Public Member Functions

 ~DoNotShowAgainMessageBox ()
 Destructor. More...
 

Static Public Member Functions

static int show (Type type, const QString text, QWidget *parent=nullptr)
 Show a message box if the user didnt check the QCheckBox. More...
 
static int show (Type type, QWidget *parent)
 
static bool doNotShowAgain (Type type)
 

Private Member Functions

 DoNotShowAgainMessageBox (Type type, const QString &text, QWidget *parent)
 Private constructor. More...
 

Private Attributes

Type mType
 The type of the message box. More...
 

Detailed Description

A MessageBox with a QCheckBox to remember the decision of the user.

It will read and write its status to the SettingsForQt and wont show if the user checked the QCheckBox. The checked results can be resetted in the options::PageEnvironmentGeneral.

Definition at line 32 of file donotshowagainmessagebox.h.

Member Enumeration Documentation

The type and unique id for the message box.

Enumerator
RESET_PITCHES 

Reset pitch markers.

NOT_ALL_KEYS_RECORDED 

Not all keys have been recorded.

TUNING_CURVE_NOT_CALCULATED 

The tuning curve has not been calculated.

TUNING_CURVE_NEEDS_UPDATE 

The tuning curve has to be recalculated.

COUNT 

Number of message boxes.

Definition at line 39 of file donotshowagainmessagebox.h.

Constructor & Destructor Documentation

DoNotShowAgainMessageBox::DoNotShowAgainMessageBox ( Type  type,
const QString &  text,
QWidget *  parent 
)
private

Private constructor.

Parameters
typeThe type of the message box
textThe text to be displayed or an empty string to use the default text
parentThe parent widget

Call show(Type, QWidget*) to create a message box.

Definition at line 25 of file donotshowagainmessagebox.cpp.

DoNotShowAgainMessageBox::~DoNotShowAgainMessageBox ( )

Destructor.

Definition at line 77 of file donotshowagainmessagebox.cpp.

Member Function Documentation

bool DoNotShowAgainMessageBox::doNotShowAgain ( Type  type)
static

Definition at line 102 of file donotshowagainmessagebox.cpp.

+ Here is the call graph for this function:

int DoNotShowAgainMessageBox::show ( Type  type,
const QString  text,
QWidget *  parent = nullptr 
)
static

Show a message box if the user didnt check the QCheckBox.

Parameters
type: The type of the message box
text: Text of the box. Leave it empty to use the default text
parent: The parent widget
Returns
QMessageBox::Accepted if the message was accepted

The function will first check if the QCheckBox was checked in SettingsForQt and return the result. Elsewise it will show the message box.

Definition at line 83 of file donotshowagainmessagebox.cpp.

+ Here is the call graph for this function:

static int DoNotShowAgainMessageBox::show ( Type  type,
QWidget *  parent 
)
inlinestatic

Definition at line 77 of file donotshowagainmessagebox.h.

+ Here is the call graph for this function:

Member Data Documentation

Type DoNotShowAgainMessageBox::mType
private

The type of the message box.

Definition at line 83 of file donotshowagainmessagebox.h.


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