-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHistorique.cpp
More file actions
45 lines (31 loc) · 1.6 KB
/
Historique.cpp
File metadata and controls
45 lines (31 loc) · 1.6 KB
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
#include "Historique.hpp"
Historique::Historique(wxScrolledWindow* dialog_parent, wxString date_et_heur, Journalier* journalier) : wxPanel(dialog_parent, -1), journalier(journalier)
{
this->date_heur = date_et_heur;
histoirque_sizer = new wxBoxSizer(wxHORIZONTAL);
static_date_heur = new wxStaticText(this, wxID_ANY, date_et_heur);
static_date_heur->SetMinSize(wxSize(250, 0));
wxBitmap sup_bitmap("icon/moin.jpg", wxBITMAP_TYPE_JPEG);
btn_sup_historique = new wxBitmapButton(this, -1, sup_bitmap);
wxBitmap inf_bitmap("icon/iterrogation.jpg", wxBITMAP_TYPE_JPEG);
btn_inf_historique = new wxBitmapButton(this, -1, inf_bitmap);
histoirque_sizer->Add(static_date_heur, 0, wxALL | wxEXPAND, 0);
histoirque_sizer->Add(btn_sup_historique, 0, wxALIGN_RIGHT| wxEXPAND);
histoirque_sizer->Add(btn_inf_historique, 0, wxALIGN_RIGHT| wxEXPAND);
this->SetSizer(histoirque_sizer);
btn_sup_historique->Bind(wxEVT_BUTTON, &Historique::EventRetireHistorique, this);
btn_inf_historique->Bind(wxEVT_BUTTON, &Historique::EventInfoHistorique, this);
}
void Historique::EventRetireHistorique(wxCommandEvent& event){
deletCommande(date_heur);
journalier->SupprimerHistorique(this);
}
void Historique::EventInfoHistorique(wxCommandEvent& event){
wxString description = descriptionCommande(date_heur);
wxMessageDialog* infoDialog = new wxMessageDialog(this, description, "Informations sur la commande " + date_heur, wxOK | wxICON_INFORMATION);
infoDialog->ShowModal();
infoDialog->Destroy();
}
void Historique::MoodUtilisateur(){
btn_sup_historique->Enable(false);
}