Name dialog functionality
[emufront] / src / dialogs / namedialog.h
1 #ifndef NAMEDIALOG_H
2 #define NAMEDIALOG_H
3
4 #include "../dataobjects/emufrontobject.h"
5 #include "emufrontdialog.h"
6
7
8 class QLabel;
9 class QLineEdit;
10 class QPushButton;
11 class QDialogButtonBox;
12
13 class NameDialog : public EmuFrontDialog
14 {
15         Q_OBJECT
16
17 public:
18     NameDialog(QWidget *parent = 0, EmuFrontObject * = 0);
19     ~NameDialog();
20
21 signals:
22         void insertName(const QString &name, int id = 0);
23
24 protected slots:
25         void saveButtonClicked();
26         void enableSaveButton(const QString &);
27
28 protected:
29     virtual void setDataObject(QString name) =0;
30         QLabel *nameLabel;
31         QLineEdit *nameEdit;
32     QDialogButtonBox *buttonBox;
33     //QPushButton *saveButton;
34     //QPushButton *closeButton;
35     EmuFrontObject *efObject;
36
37 private:
38         void connectSignals();
39         void layout();
40     void close(bool);
41 };
42
43 #endif