00001 #ifndef ALBUMEDITION_H 00002 #define ALBUMEDITION_H 00003 00004 #include "ui_albumedition.h" 00005 00006 00007 #include "../../../configuedata.h" 00008 #include "../../../modele/livre.h" 00009 00010 #include "auteurselection.h" // #include "idcombobox.h" 00011 00012 class AuteurSelection; // BUG ????? 00013 00014 class AlbumEdition : public QWidget, private Ui::AlbumEdition { 00015 Q_OBJECT 00016 public: 00017 AlbumEdition(QWidget *parent = 0); 00018 bool setAlbum(int idBook); 00019 bool setAlbum(Livre &livre); 00020 bool save(); 00021 void viderChamps(); 00022 void setCreateVisible(bool); 00023 00024 bool isValideAlbum(); 00025 void ajouterAuteur(); 00026 00027 public slots: 00028 void changeEvent(QEvent *e); 00029 void on_createButton_clicked(); 00030 void on_serieButton_clicked(); 00031 void on_editeurButton_clicked(); 00032 void on_coteEdit_editingFinished(); 00033 00034 signals: 00035 void collectionChanged_signal(); 00036 void collectionChanged_notFinish_signal(); 00037 00038 private: 00040 void livreFromWidget(); 00041 00042 int m_id; 00043 static Livre m_livreStatic; 00044 Livre m_livre; 00045 QStringList m_listEtat; 00046 IdComboBox *serieBox; 00047 IdComboBox *editeurBox; 00048 AuteurSelection *auteurSelection; 00049 }; 00050 00051 00052 class LivreDialog : public QDialog 00053 { 00054 Q_OBJECT 00055 00056 public: 00057 explicit LivreDialog(QWidget *parent = 0, bool creation = false); 00058 void setLivre(int id); 00059 void setLivre( Livre &livre); 00060 00061 public slots: 00062 void saveClicked(); 00063 void fenetreQuit(); 00064 void collectionChanged(); 00065 00066 private: 00067 AlbumEdition *albumEdition; 00068 QPushButton *fermer; 00069 QPushButton *save; 00070 bool m_changed; 00071 }; 00072 00073 #endif // ALBUMEDITION_H
1.7.1