MNE-CPP  beta 1.0
deletemessagebox.cpp
Go to the documentation of this file.
1 //=============================================================================================================
38 //*************************************************************************************************************
39 //=============================================================================================================
40 // INCLUDES
41 //=============================================================================================================
42 
43 #include "deletemessagebox.h"
44 #include "ui_deletemessagebox.h"
45 #include "QtGui"
46 
47 //=============================================================================================================
48 
49 QString parentName;
50 
51 //*************************************************************************************************************************************
52 
53 // CONSTRUCTOR
54 DeleteMessageBox::DeleteMessageBox(QWidget *parent) : QDialog(parent), ui(new Ui::DeleteMessageBox)
55 {
56  parentName = parent->accessibleName();
57  ui->setupUi(this);
58 }
59 
60 //*************************************************************************************************************************************
61 
62 DeleteMessageBox::DeleteMessageBox(QString msg_text, QString caption, QString btt_left_text, QString btt_right_text, QWidget *parent)
63  : QDialog(parent), ui(new Ui::DeleteMessageBox)
64 {
65  ui->setupUi(this);
66  ui->lb_MessageText->setText(msg_text);
67  ui->btt_yes->setText(btt_left_text);
68  ui->btt_No->setText(btt_right_text);
69  this->setWindowTitle(caption);
70 }
71 
72 //*************************************************************************************************************************************
73 
74 DeleteMessageBox::~DeleteMessageBox()
75 {
76  delete ui;
77 }
78 
79 //*************************************************************************************************************************************
80 
81 void DeleteMessageBox::on_btt_yes_clicked()
82 {
83  setResult(1);
84  hide();
85 }
86 
87 //*************************************************************************************************************************************
88 
89 void DeleteMessageBox::on_btt_No_clicked()
90 {
91  setResult(0);
92  hide();
93 }
94 
95 //*************************************************************************************************************************************
96 
97 void DeleteMessageBox::on_chb_NoMessageBox_toggled(bool checked)
98 {
99  QSettings settings;
100  settings.setValue("show_warnings", !checked);
101 }
102 
103 //*************************************************************************************************************************************
Definition: aboutwindow.h:52
DeleteMessageBox class declaration, which asked for acknowledgment to delete dictionaries or formulas...