Chrono-Cross  1.1
BTS SN-IR La Salle Avignon 2018
ihmmanifestation.h
Aller à la documentation de ce fichier.
00001 #ifndef IHMMANIFESTATION_H
00002 #define IHMMANIFESTATION_H
00003 
00018 #include <QMainWindow>
00019 #include <QStringListModel>
00020 #include <QDebug>
00021 #include <QTableView>
00022 
00023 // Pour la table Manifestation
00024 #define MANIFESTATION_NOM           1
00025 #define MANIFESTATION_DATE          2
00026 
00027 // Pour la table Course
00028 #define COURSE_ID_COURSE            0
00029 #define COURSE_IDMANIFESTATION      1
00030 #define COURSE_NOM                  2
00031 #define COURSE_DISTANCE             3
00032 #define COURSE_HEUREDEPART          4
00033 
00034 //Pour la table Coureur
00035 #define COUREUR_ID                  0
00036 #define COUREUR_IDCATEGORIE         1
00037 #define COUREUR_IDCLASSE            2
00038 #define COUREUR_NUMERO_INE          3
00039 #define COUREUR_NOM                 4
00040 #define COUREUR_PRENOM              5
00041 #define COUREUR_DATENAISSANCE       6
00042 #define COUREUR_SEXE                7
00043 #define COUREUR_NOM_CLASSE          8
00044 #define COUREUR_NUMERO_CLASSE       9
00045 #define COUREUR_NOM_CATEGORIE       10
00046 #define COUREUR_SEXE_CATEGORIE      11
00047 
00048 // Pour le temps d'affichage des messages en bas de l'écran
00049 #define TEMPO_STATUS                5000 // ms
00050 
00051 // Pour les onglets de l'IHM
00052 #define ONGLET_MANIFESTATION        0
00053 #define ONGLET_INSCRIPTION          1
00054 #define ONGLET_RESULTATS            2
00055 
00056 // Pour la table Résultats
00057 #define COLONNE_CLASSEMENT          0
00058 #define COLONNE_NUMERODOSSARD       1
00059 #define COLONNE_NOM                 2
00060 #define COLONNE_PRENOM              3
00061 #define COLONNE_CLASSE              4
00062 #define COLONNE_TEMPS               5
00063 
00064 // Pour les colonnes Résultats
00065 #define EMPLACEMENT_NUMERODOSSARD   0
00066 #define EMPLACEMENT_NOM             1
00067 #define EMPLACEMENT_PRENOM          2
00068 #define EMPLACEMENT_NOMCLASSE       3
00069 #define EMPLACEMENT_NUMEROCLASSE    4
00070 #define EMPLACEMENT_TEMPS           5
00071 
00072 namespace Ui {
00073 class IHMManifestation;
00074 }
00075 
00076 class BaseDeDonnees;
00077 
00078 class IHMManifestation : public QMainWindow
00079 {
00080     Q_OBJECT
00081     
00082     public:
00083         explicit IHMManifestation(QWidget *parent = 0);
00084         ~IHMManifestation();
00085     
00086     private:
00087         Ui::IHMManifestation *ui; 
00088         BaseDeDonnees *bd; 
00089         QVector<QStringList> listeManifestations; 
00090         QVector<QStringList> listeCourses; 
00091         QVector<QStringList> listeCoureurs; 
00092         QVector<QStringList> listeClasses; 
00093         QVector<QStringList> listeCategories; 
00094         QStringList listeNomsCoureurs; 
00095         QStringList listeNumerosDossardCoureurs; 
00096         QStringList listeIdCoureurs; 
00097         QStringListModel *coureurs; 
00098         QStringListModel *dossards; 
00099         QVector<QStringList> listeManifestationsResultats; 
00100         QVector<QStringList> listeCoursesResultats; 
00101         QStringList manifestation; 
00102         bool editionDossard; 
00109         void chargerListeManifestations();
00110 
00117         void chargerListeCourses(QString idManifestation);
00118 
00124         void chargerListeClasses();
00125 
00131         QString getIdClasse();
00132 
00138         void chargerListeCategories();
00139 
00145         QString getIdCategorie();
00146 
00152         bool verifierInformationsCoureur();
00153 
00161         QString getNumeroDossard(QString idCoureur, QString idCourse);
00162 
00168         QString getIdCoureur(QString nom);
00169 
00175         bool verifierInformationsSuppressionCoureur();
00176 
00182         QString idCoureur;
00183 
00189         void configurerTableResultats();
00190 
00196         void effacerResultats();
00197 
00198     private slots:
00199         // Menu
00205         void afficherConfigurationManifestation();
00206 
00212         void afficherInscriptionCoureurs();
00213 
00219         void afficherPublicationResultats();
00220 
00226         void quitter();        
00227 
00234         void selectionnerOnglet(int index);
00235 
00241         void creerManifestation();
00242 
00248         void modifierManifestation();
00249 
00255         void supprimerManifestation();
00256 
00262         void selectionnerManifestation();
00263 
00269         void creerCourse();
00270 
00276         void modifierCourse();
00277 
00283         void supprimerCourse();
00284 
00290         void selectionnerCourse();
00291 
00297         void choisirInscriptionCourse();
00298 
00304         void creerCoureur();
00305 
00311         void modifierCoureur();
00312 
00318         void supprimerCoureur();
00319 
00325         void selectionnerCoureur();
00326 
00332         void chargerListeCoureurs();
00333 
00339         void selectionnerListeCoureursCourse();
00340 
00346         void afficherListeCoureurs();
00347 
00353         void selectionnerCoureurListe(const QModelIndex &index);
00354 
00360         void selectionnerDossardListe(const QModelIndex &index);
00361 
00367         void demarrerInscriptionCoureur();
00368 
00374         void inscrireCoureur();
00375 
00381         void chargerListeInscriptionCourses();
00382 
00389         void afficherResultats(QString idCourse);
00390 
00396         void activerImpression();
00397 
00403         void ajouterResultat(int ligne, QStringList unResultat);
00404 
00410         void selectionnerManifestationResultats();
00411 
00417         void selectionnerCourseResultats();
00418 
00424         void imprimerResultats();
00425 };
00426 
00427 #endif // IHMMANIFESTATION_H
 Tout Classes Fichiers Fonctions Variables Macros