update dict
[QFreeRecite.git] / src / gui / AddDialog.cpp
blob85755a92e7d7f38b075a4f116e79705d4bd70dd7
1 #include <Debug.h>
2 #include "AddDialog.h"
5 QString AddDialog::str("");
7 AddDialog::AddDialog(QWidget *parent)
8 : QDialog(parent)
10 setupUi(this);
11 D_OUTPUT("AddDialog()")
14 AddDialog::~AddDialog()
16 D_OUTPUT("~AddDialog()")
19 QString AddDialog::getString(QWidget *parent,
20 const QString &titleText,
21 const QString &lableText) {
22 str = "";
23 AddDialog *dialog = new AddDialog(parent);
24 dialog->setWindowTitle(titleText);
25 dialog->label->setText(lableText);
26 dialog->setModal(true);
27 connect(dialog->okButton,SIGNAL(clicked()),
28 dialog,SLOT(returnStr()));
29 dialog->exec();
30 return str;
33 void AddDialog::returnStr() {
34 AddDialog::str = lineEdit->text();
35 deleteLater();