Added license information
[emufront] / src / dialogs / namedialog.h
1 // EmuFront
2 // Copyright Mikko Keinänen 2010
3 //
4 // This file is part of EmuFront.
5 //
6 //
7 // EmuFront is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // Foobar is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
19
20 #ifndef NAMEDIALOG_H
21 #define NAMEDIALOG_H
22
23 #include "../dataobjects/emufrontobject.h"
24 #include "emufrontdialog.h"
25
26
27 class QLabel;
28 class QLineEdit;
29 class QPushButton;
30 class QDialogButtonBox;
31
32 class NameDialog : public EmuFrontDialog
33 {
34         Q_OBJECT
35
36 public:
37     NameDialog(QWidget *parent = 0, EmuFrontObject * = 0);
38     ~NameDialog();
39     virtual void setDataObject(EmuFrontObject *) = 0;
40
41 signals:
42     void dataObjectUpdated();
43
44 protected slots:
45     void acceptChanges();
46         void enableSaveButton(const QString &);
47
48 protected:
49     virtual void setDataObject(QString name) =0;
50         QLabel *nameLabel;
51         QLineEdit *nameEdit;
52     QDialogButtonBox *buttonBox;
53     EmuFrontObject *efObject;
54
55 private:
56         void connectSignals();
57         void layout();
58 };
59
60 #endif