-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdialogatleta.h
53 lines (48 loc) · 1.39 KB
/
dialogatleta.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
* Andrea Favero
* 1125545
*/
#ifndef DIALOGINSERIMENTOATLETA_H
#define DIALOGINSERIMENTOATLETA_H
#include <QDialog>
#include <QFormLayout>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include "contenitore.h"
#include <memory>
#include <persona.h>
#include <QRadioButton>
#include <QGroupBox>
class DialogAtleta : public QDialog {
Q_OBJECT
public:
explicit DialogAtleta(Contenitore<std::shared_ptr<Persona>>&,
bool mod = false,
int rMod = 0, //se mod == 0 non uso rigaMod
QWidget* = nullptr);
private:
QVBoxLayout *layoutPrincipale;
QHBoxLayout *layoutBottoniConferma, *layoutRadioButton;
QFormLayout *layoutForm;
QLabel *lblTitolo, *lblNome, *lblCognome, *lblSesso;
QLineEdit *leNome, *leCognome;
QPushButton *bInserisci, *bAzzera;
QRadioButton *rbUomo, *rbDonna;
Contenitore<std::shared_ptr<Persona>>& atleti;
bool modifica;
int rigaMod;
void compilazioneFormModifica();
bool verificaCampiNomeCognome(QString, QString) const;
bool verificaAtletaPresente(std::shared_ptr<Persona>& persona) const;
private slots:
void inserimentoAtleta(bool);
void modificaAtleta(bool);
void azzeramentoForm(bool);
signals:
void reset();
};
#endif // DIALOGINSERIMENTOATLETA_H