Add Setting and Status
[QFreeRecite.git] / src / gui / AddDialog.cpp
bloba82db265d2473b10f99173dcc3542bf4a902e103
1 #include "AddDialog.h"
4 QString AddDialog::str("");
6 AddDialog::AddDialog(QWidget *parent)
7 : QDialog(parent)
9 setupUi(this);
10 #ifdef DEBUG
11 qDebug("AddDialog()");
12 #endif //DEBUG
15 AddDialog::~AddDialog()
17 #ifdef DEBUG
18 qDebug("~AddDialog()");
19 #endif //DEBUG
22 QString AddDialog::getString(QWidget *parent,
23 const QString &titleText,
24 const QString &lableText) {
25 str = "";
26 AddDialog *dialog = new AddDialog(parent);
27 dialog->setWindowTitle(titleText);
28 dialog->label->setText(lableText);
29 dialog->setModal(true);
30 connect(dialog->okButton,SIGNAL(clicked()),
31 dialog,SLOT(returnStr()));
32 dialog->exec();
33 return str;
36 void AddDialog::returnStr() {
37 AddDialog::str = lineEdit->text();
38 deleteLater();