1 #ifndef DLG_EDITUSER_H 2 #define DLG_EDITUSER_H 3 4 #include <QComboBox> 5 #include <QDialog> 6 #include <QLineEdit> 7 8 class QLabel; 9 class QPushButton; 10 class QCheckBox; 11 12 class DlgEditUser : public QDialog 13 { 14 Q_OBJECT 15 public: 16 DlgEditUser(QWidget *parent = nullptr, 17 QString email = QString(), 18 QString country = QString(), 19 QString realName = QString()); getEmail()20 QString getEmail() const 21 { 22 return emailEdit->text(); 23 } getGender()24 int getGender() const 25 { 26 return -1; 27 } // This will return GenderUnknown for protocol purposes. getCountry()28 QString getCountry() const 29 { 30 return countryEdit->currentIndex() == 0 ? "" : countryEdit->currentText(); 31 } getRealName()32 QString getRealName() const 33 { 34 return realnameEdit->text(); 35 } 36 private slots: 37 void actOk(); 38 39 private: 40 QLabel *emailLabel, *countryLabel, *realnameLabel; 41 QLineEdit *emailEdit, *realnameEdit; 42 QComboBox *countryEdit; 43 }; 44 45 #endif 46