Your warranties manager
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

55 lines
1.6 KiB

  1. #ifndef INFOSPRODUITDIALOG_H
  2. #define INFOSPRODUITDIALOG_H
  3. #include <QDialog>
  4. #include <QDate>
  5. #include <QHash>
  6. #include <QListWidget>
  7. #include <QPixmap>
  8. #include "produititem.h"
  9. namespace Ui {
  10. class InfosProduitDialog;
  11. }
  12. class ProduitItem;
  13. class InfosProduitDialog : public QDialog
  14. {
  15. Q_OBJECT
  16. public:
  17. explicit InfosProduitDialog(QWidget *parent, QWidget *mainWindow, QString nomProduit = "", QDate dateAchat = QDate::currentDate(), QDate dateFinGarantie = QDate::currentDate().addYears(1), QPixmap image = QPixmap(), int indexMagasin = 0, bool enSAV = false, QHash<QString, QByteArray> facturePDF = QHash<QString, QByteArray>(), QHash<QString, QByteArray> garantiePDF = QHash<QString, QByteArray>());
  18. ~InfosProduitDialog();
  19. public slots:
  20. // Image
  21. void on_btnImageParcourir_clicked();
  22. void on_btnImageSupprimer_clicked();
  23. // Factures
  24. void on_btnAjoutFacture_clicked();
  25. void on_listFactures_currentRowChanged();
  26. void on_listFactures_itemDoubleClicked(QListWidgetItem *item);
  27. void on_btnSupprFacture_clicked();
  28. // Garanties
  29. void on_btnAjoutGarantie_clicked();
  30. void on_listGaranties_currentRowChanged();
  31. void on_listGaranties_itemDoubleClicked(QListWidgetItem *item);
  32. void on_btnSupprGarantie_clicked();
  33. // Boutons du bas
  34. void on_buttonBox_accepted();
  35. private slots:
  36. void on_checkGarantieAVie_toggled(bool checked);
  37. private:
  38. QPixmap image;
  39. Ui::InfosProduitDialog *ui;
  40. QHash<QString, QByteArray> facturePDF;
  41. QHash<QString, QByteArray> garantiePDF;
  42. QWidget *parentWidget;
  43. ProduitItem *getParentItem();
  44. };
  45. #endif // INFOSPRODUITDIALOG_H