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.
 
 
 

59 lines
1.8 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. #include "scannerdialog.h"
  10. namespace Ui {
  11. class InfosProduitDialog;
  12. }
  13. class ProduitItem;
  14. class InfosProduitDialog : public QDialog
  15. {
  16. Q_OBJECT
  17. public:
  18. 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>());
  19. ~InfosProduitDialog();
  20. public slots:
  21. void on_checkGarantieAVie_toggled(bool checked);
  22. // Image
  23. void on_btnImageParcourir_clicked();
  24. void on_btnImageSupprimer_clicked();
  25. // Factures
  26. void on_btnAjoutFacture_clicked();
  27. void on_btnScannerFacture_clicked();
  28. void on_factureScanned();
  29. void on_listFactures_currentRowChanged();
  30. void on_listFactures_itemDoubleClicked(QListWidgetItem *item);
  31. void on_btnSupprFacture_clicked();
  32. // Garanties
  33. void on_btnAjoutGarantie_clicked();
  34. void on_btnScannerGarantie_clicked();
  35. void on_garantieScanned();
  36. void on_listGaranties_currentRowChanged();
  37. void on_listGaranties_itemDoubleClicked(QListWidgetItem *item);
  38. void on_btnSupprGarantie_clicked();
  39. // Boutons du bas
  40. void on_buttonBox_accepted();
  41. private:
  42. QPixmap image;
  43. Ui::InfosProduitDialog *ui;
  44. QHash<QString, QByteArray> facturePDF;
  45. QHash<QString, QByteArray> garantiePDF;
  46. QWidget *parentWidget;
  47. ProduitItem *getParentItem();
  48. };
  49. #endif // INFOSPRODUITDIALOG_H