Merge branch 'master' of ssh://pumpa.branchable.com
[larjonas-pumpa.git] / src / editprofiledialog.h
blob3c6ca63d19ecab4348b8b197d716893b70be7a2b
1 /*
2 Copyright 2015 Mats Sjöberg
4 This file is part of the Pumpa programme.
6 Pumpa is free software: you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 Pumpa is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14 License for more details.
16 You should have received a copy of the GNU General Public License
17 along with Pumpa. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef _EDITPROFILEDIALOG_H_
21 #define _EDITPROFILEDIALOG_H_
23 #include <QDialog>
24 #include <QLabel>
25 #include <QLineEdit>
26 #include <QTextEdit>
27 #include <QDialogButtonBox>
28 #include <QVBoxLayout>
29 #include <QHBoxLayout>
31 #include "qasactor.h"
32 #include "texttoolbutton.h"
34 class EditProfileDialog : public QDialog {
35 Q_OBJECT
37 public:
38 EditProfileDialog(QWidget* parent=0);
40 void setProfile(QASActor* profile);
42 signals:
43 void profileEdited(QASActor*, QString);
45 private slots:
46 void onOKClicked();
47 void updateImage();
48 void onChangeImage();
50 private:
51 QString m_imageFileName;
53 QLabel* m_imageLabel;
54 TextToolButton* m_changeImageButton;
56 QHBoxLayout* m_imageLayout;
58 QLabel* m_realNameLabel;
59 QLineEdit* m_realNameEdit;
61 QLabel* m_hometownLabel;
62 QLineEdit* m_hometownEdit;
64 QLabel* m_bioLabel;
65 QTextEdit* m_bioEdit;
67 QDialogButtonBox* m_buttonBox;
69 QVBoxLayout* m_layout;
71 QASActor* m_profile;
74 #endif /* _EDITPROFILEDIALOG_H_ */