Correction d'une erreur dans la coloration de la grille lors d'un changement de checkbox Modifications à la fenêtre d'options de recherche Ajout du comportement intrinsèque de la fenêtre d'options de recherche (champs activés/désactivés) Ajout des rulesets dans la config, d'une règle par défaut, ainsi que la lecture/écriture du fichier de config.master
@@ -169,7 +169,8 @@ void class_bdd::updategrid() | |||
for (int i=2; i<10; i++) //nom, prénom, responsable, consultant, theme, etablissement, travail, date | |||
{ | |||
wxString orig = _W(sqlite3_column_text(stmt, i)); | |||
rc = sqlite3_prepare_v2(db, "SELECT dest FROM Correc WHERE orig=\"" + orig + "\";", -1, &stmt_correc, NULL); //fetch d'une éventuelle correction | |||
// corrections | |||
rc = sqlite3_prepare_v2(db, "SELECT dest FROM Correc WHERE orig=\"" + orig + "\";", -1, &stmt_correc, NULL); | |||
if (sqlite3_step(stmt_correc) == SQLITE_DONE) | |||
gridptr->SetCellValue(nligne, i+3, orig); | |||
else | |||
@@ -210,14 +211,9 @@ void class_bdd::updategrid() | |||
while (sqlite3_step(stmt) == SQLITE_ROW) | |||
{ | |||
gridptr->SetCellValue(nligne, 0, _itoW(sqlite3_column_int(stmt, 4))); //nb_results | |||
bool publie = false; | |||
for (int i=1; i<4; i++) | |||
{ | |||
gridptr->SetCellValue(nligne, i, _itoW(sqlite3_column_int(stmt, i))); //publi, publi_CHU, cs_associe | |||
if (sqlite3_column_int(stmt, i) == 1) | |||
publie = true; | |||
} | |||
if (publie) | |||
if (sqlite3_column_int(stmt, 1)) | |||
for (int i=0; i<13; i++) | |||
gridptr->SetCellBackgroundColour(nligne, i, *wxGREEN); //coloration des consults trouvées | |||
nligne++; | |||
@@ -1,5 +1,4 @@ | |||
#include "config.h" | |||
#pragma GCC diagnostic ignored "-Wunused-variable" //warnings à cause des nodes contenant du texte | |||
config::config() | |||
{ | |||
@@ -16,59 +15,170 @@ void config::createDefault() | |||
proxyurl = "www-proxy.chu-nancy.fr"; | |||
proxyport = 8080; | |||
fichier_config = new wxXmlDocument(); | |||
wxXmlNode* rootnode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, "CosMoS_config"); | |||
wxXmlNode* proxynode = new wxXmlNode(rootnode, wxXML_ELEMENT_NODE, "proxy"); | |||
if (useproxy) | |||
proxynode->AddAttribute("set", "true"); | |||
else | |||
proxynode->AddAttribute("set", "false"); | |||
wxXmlNode* proxyportnode = new wxXmlNode(proxynode, wxXML_ELEMENT_NODE, "port"); | |||
wxXmlNode* proxyporttext = new wxXmlNode(proxyportnode, wxXML_TEXT_NODE, "", wxString::Format("%i",proxyport)); | |||
wxXmlNode* proxyurlnode = new wxXmlNode(proxynode, wxXML_ELEMENT_NODE, "url"); | |||
wxXmlNode* proxyurltext = new wxXmlNode(proxyurlnode, wxXML_TEXT_NODE, "", proxyurl); | |||
wxXmlNode* dbpathnode = new wxXmlNode(rootnode, wxXML_ELEMENT_NODE, "dbpath"); | |||
wxXmlNode* dbpathtext = new wxXmlNode(dbpathnode, wxXML_TEXT_NODE, "", dbpath); | |||
fichier_config->SetRoot(rootnode); | |||
rule defaultrule = {"defaut", true, AND, AND, AND, delai, true, true, 5, 2, true, "Nancy", false, "", 20}; | |||
ruleset.push_back(defaultrule); | |||
first_time = true; | |||
} | |||
config::~config() | |||
{ | |||
delete fichier_config; | |||
ruleset.clear(); | |||
} | |||
void config::save() | |||
{ | |||
wxXmlNode* parcours = fichier_config->GetRoot()->GetChildren(); | |||
parcours->GetChildren()->SetContent(dbpath); | |||
parcours = parcours->GetNext(); | |||
if (useproxy) | |||
parcours->GetAttributes()->SetValue("true"); | |||
else | |||
parcours->GetAttributes()->SetValue("false"); | |||
parcours = parcours->GetChildren(); | |||
parcours->GetChildren()->SetContent(proxyurl); | |||
parcours = parcours->GetNext(); | |||
parcours->GetChildren()->SetContent(wxString::Format("%i",proxyport)); | |||
wxXmlDocument* fichier_config = new wxXmlDocument(); | |||
wxXmlNode* rootnode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, "CosMoS_config"); //root | |||
wxXmlNode* dbpathnode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, "dbpath"); // dbpath | |||
dbpathnode->AddAttribute("value", dbpath); // dbpath_value | |||
rootnode->AddChild(dbpathnode); | |||
wxXmlNode* proxynode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, "proxy"); // proxy | |||
proxynode->AddAttribute("set", bool2W(useproxy)); // proxy_set | |||
proxynode->AddAttribute("url", proxyurl); // proxy_url | |||
proxynode->AddAttribute("port", _itoW(proxyport)); // proxy_port | |||
rootnode->AddChild(proxynode); | |||
wxXmlNode* rulesetnode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, "ruleset"); // ruleset | |||
for (vector<rule>::iterator i = ruleset.begin(); i < ruleset.end(); i++) | |||
addsettoxml(rulesetnode, *i); | |||
rootnode->AddChild(rulesetnode); | |||
fichier_config->SetRoot(rootnode); | |||
fichier_config->Save("cosmos.cfg"); | |||
delete fichier_config; | |||
} | |||
void config::addsettoxml(wxXmlNode* setlistnode, rule toadd) | |||
{ | |||
wxXmlNode* setnode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, "rule"); // rule | |||
setnode->AddAttribute("name", toadd.name); // rule_name | |||
setnode->AddAttribute("inuse", bool2W(toadd.inuse)); // rule_inuse | |||
wxXmlNode* nomsnode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, "noms"); // noms | |||
nomsnode->AddAttribute("demandeur", op2W(toadd.demandeur)); // noms_demandeur | |||
nomsnode->AddAttribute("both", op2W(toadd.both)); // noms_both | |||
nomsnode->AddAttribute("responsable", op2W(toadd.responsable)); // noms_responsable | |||
setnode->AddChild(nomsnode); | |||
wxXmlNode* datesnode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, "dates");// dates | |||
datesnode->AddAttribute("type", type2W(toadd.type_date)); // dates_type | |||
datesnode->AddAttribute("usedebut", bool2W(toadd.usedebut)); // dates_usedebut | |||
datesnode->AddAttribute("debut", _itoW(toadd.debut)); // dates_debut | |||
datesnode->AddAttribute("usefin", bool2W(toadd.usefin)); // dates_usefin | |||
datesnode->AddAttribute("fin", _itoW(toadd.fin)); // dates_fin | |||
setnode->AddChild(datesnode); | |||
wxXmlNode* villenode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, "ville");// ville | |||
villenode->AddAttribute("set", bool2W(toadd.useville)); // ville_set | |||
villenode->AddAttribute("value", toadd.ville); // ville_value | |||
setnode->AddChild(villenode); | |||
wxXmlNode* supplnode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, "suppl");// suppl | |||
supplnode->AddAttribute("set", bool2W(toadd.usesuppl)); // suppl_set | |||
supplnode->AddAttribute("value", toadd.suppl); // suppl_value | |||
setnode->AddChild(supplnode); | |||
wxXmlNode* retmaxnode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, "retmax");// retmax | |||
retmaxnode->AddAttribute("value", _itoW(toadd.retmax)); // retmax_value | |||
setnode->AddChild(retmaxnode); | |||
setlistnode->AddChild(setnode); | |||
} | |||
void config::load() | |||
{ | |||
fichier_config = new wxXmlDocument("cosmos.cfg"); | |||
wxXmlNode* parcours = fichier_config->GetRoot()->GetChildren(); | |||
dbpath = parcours->GetNodeContent(); | |||
parcours = parcours->GetNext(); | |||
if (parcours->GetAttribute("set") == "true") | |||
useproxy = true; | |||
else | |||
useproxy = false; | |||
parcours = parcours->GetChildren(); | |||
proxyurl = parcours->GetNodeContent(); | |||
parcours = parcours->GetNext(); | |||
proxyport = wxAtoi(parcours->GetNodeContent()); | |||
rule currentrule; | |||
wxXmlDocument* fichier_config = new wxXmlDocument("cosmos.cfg"); //root | |||
wxXmlNode* parcours = fichier_config->GetRoot()->GetChildren(); // dbpath | |||
dbpath = parcours->GetAttribute("value"); // dbpath_value | |||
parcours = parcours->GetNext(); // proxy | |||
useproxy = W2bool(parcours->GetAttribute("set")); // proxy_set | |||
proxyurl = parcours->GetAttribute("url"); // proxy_url | |||
proxyport = wxAtoi(parcours->GetAttribute("port")); // proxy_port | |||
parcours = parcours->GetNext(); // ruleset | |||
if (parcours->GetChildren()) | |||
{ | |||
parcours = parcours->GetChildren(); // rule | |||
do | |||
{ | |||
currentrule.name = parcours->GetAttribute("name"); // rule_name | |||
currentrule.inuse = W2bool(parcours->GetAttribute("inuse")); // rule_inuse | |||
parcours = parcours->GetChildren(); // noms | |||
currentrule.demandeur = W2op(parcours->GetAttribute("demandeur")); // noms_demandeur | |||
currentrule.both = W2op(parcours->GetAttribute("both")); // noms_both | |||
currentrule.responsable = W2op(parcours->GetAttribute("responsable")); // noms_responsable | |||
parcours = parcours->GetNext(); // dates | |||
currentrule.type_date = W2type(parcours->GetAttribute("type")); // dates_type | |||
currentrule.usedebut = W2bool(parcours->GetAttribute("usedebut")); // dates_usedebut | |||
currentrule.debut = wxAtoi(parcours->GetAttribute("debut")); // dates_debut | |||
currentrule.usefin = W2bool(parcours->GetAttribute("usefin")); // dates_usefin | |||
currentrule.fin = wxAtoi(parcours->GetAttribute("fin")); // dates_fin | |||
parcours = parcours->GetNext(); // ville | |||
currentrule.useville = W2bool(parcours->GetAttribute("set")); // ville_set | |||
currentrule.ville = parcours->GetAttribute("value"); // ville_value | |||
parcours = parcours->GetNext(); // suppl | |||
currentrule.usesuppl = W2bool(parcours->GetAttribute("set")); // suppl_set | |||
currentrule.suppl = parcours->GetAttribute("value"); // suppl_value | |||
parcours = parcours->GetNext(); // retmax | |||
currentrule.retmax = wxAtoi(parcours->GetAttribute("value")); // retmax_value | |||
parcours = parcours->GetParent()->GetNext(); | |||
ruleset.push_back(currentrule); | |||
}while (parcours); | |||
} | |||
delete fichier_config; | |||
first_time = false; | |||
} | |||
wxString config::bool2W(bool in) | |||
{ | |||
if (in) | |||
return wxString("true"); | |||
else | |||
return wxString("false"); | |||
} | |||
bool config::W2bool(wxString in) | |||
{ | |||
if (in == "true") | |||
return true; | |||
else | |||
return false; | |||
} | |||
wxString config::op2W(int in) | |||
{ | |||
switch (in) | |||
{ | |||
case AND: return "AND"; break; | |||
case OR: return "OR"; break; | |||
case NOT: return "NOT"; break; | |||
default: return "AND";break; | |||
}; | |||
} | |||
int config::W2op(wxString in) | |||
{ | |||
if (in == "AND") | |||
return AND; | |||
else if (in == "OR") | |||
return OR; | |||
else if (in == "NOT") | |||
return NOT; | |||
return AND; | |||
} | |||
wxString config::type2W(int in) | |||
{ | |||
switch (in) | |||
{ | |||
case delai: return "delai"; break; | |||
case dates: return "dates"; break; | |||
default: return "delai"; break; | |||
}; | |||
} | |||
int config::W2type(wxString in) | |||
{ | |||
if (in == "delai") | |||
return delai; | |||
else if (in == "dates") | |||
return dates; | |||
return delai; | |||
} |
@@ -5,22 +5,74 @@ | |||
#include <wx/window.h> | |||
#include <wx/msgdlg.h> | |||
#include <wx/filefn.h> | |||
#include <vector> | |||
#ifdef __WXGTK__ | |||
#define slash "/" | |||
#define _C(string) string.fn_str() // wxString -> char* | |||
#define _W(string) string // char* -> wxString | |||
#elif defined( __WXMSW__ ) | |||
#define slash "\\" | |||
#define _C(string) (const char*) string.c_str() // wxString -> char* | |||
#define _W(string) wxString::FromAscii(string) // char* -> wxString | |||
#endif | |||
#define _itoW(integer) wxString::Format("%i",integer) // int -> wxString | |||
using namespace std; | |||
typedef struct trule | |||
{ | |||
wxString name; | |||
bool inuse; | |||
int demandeur, both, responsable; | |||
int type_date; | |||
bool usedebut, usefin; | |||
int debut, fin; | |||
bool useville; | |||
wxString ville; | |||
bool usesuppl; | |||
wxString suppl; | |||
int retmax; | |||
}rule; | |||
enum | |||
{ | |||
NOT=0, | |||
AND=1, | |||
OR=2 | |||
}; | |||
enum | |||
{ | |||
delai = 0, | |||
dates = 1 | |||
}; | |||
class config | |||
{ | |||
protected: | |||
wxXmlDocument* fichier_config; | |||
bool first_time; | |||
wxString dbpath; | |||
bool useproxy; | |||
wxString proxyurl; | |||
int proxyport; | |||
//TODO : option pour cacher les lignes identifiées | |||
vector<rule> ruleset; | |||
void createDefault(); | |||
void load(); | |||
void addsettoxml(wxXmlNode* xmldoc, rule toadd); | |||
wxString bool2W(bool in); | |||
bool W2bool(wxString in); | |||
wxString op2W(int in); | |||
int W2op(wxString in); | |||
wxString type2W(int in); | |||
int W2type(wxString in); | |||
public: | |||
config(); | |||
~config(); | |||
void createDefault(); | |||
void load(); | |||
void save(); | |||
// GETters et SETters | |||
@@ -76,24 +76,41 @@ void cosmos::OnOptionsProg( wxCommandEvent& event ) | |||
void cosmos::OnCellChange( wxGridEvent& event ) | |||
{ | |||
//TODO : automatiser checkboxes | |||
int row = event.GetRow(); | |||
int col = event.GetCol(); | |||
if (col < 4) //checkboxes | |||
{ | |||
bdd->modresultbool(grid_Consults->GetCellValue(row,13), col, grid_Consults->GetCellValue(row, col)); | |||
// modification automatique des checkbox | |||
// si pas de publi, pas de publi_chu ni cs_associe | |||
if ((col == 1) && (grid_Consults->GetCellValue(row, 1) == "0")) | |||
{ | |||
grid_Consults->SetCellValue(row, 2, "0"); | |||
grid_Consults->SetCellValue(row, 3, "0"); | |||
bdd->modresultbool(grid_Consults->GetCellValue(row, 13), 2, "0"); | |||
bdd->modresultbool(grid_Consults->GetCellValue(row, 13), 3, "0"); | |||
} | |||
// si une publi_chu ou cs_associe, publi | |||
if ((col > 1) && (grid_Consults->GetCellValue(row, col) == "1")) | |||
{ | |||
grid_Consults->SetCellValue(row, 1, "1"); | |||
bdd->modresultbool(grid_Consults->GetCellValue(row, 13), 1, "1"); | |||
} | |||
//Actualisation de la grille | |||
bool publie = false; | |||
for (int i=1; i<4; i++) | |||
if (grid_Consults->GetCellValue(row, col).IsSameAs("1")) | |||
if (grid_Consults->GetCellValue(row, i) == "1") | |||
publie=true; | |||
for (int i=0; i<13; i++) | |||
{ | |||
if (publie) | |||
grid_Consults->SetCellBackgroundColour(row, i, *wxGREEN); | |||
else | |||
grid_Consults->SetCellBackgroundColour(row, i, grid_Consults->GetDefaultCellBackgroundColour()); | |||
} | |||
grid_Consults->ForceRefresh(); | |||
} | |||
else //corrections | |||
@@ -32,36 +32,6 @@ void optionsRche::OnDel( wxCommandEvent& event ) | |||
// TODO: Implement OnDel | |||
} | |||
void optionsRche::OnRadioDelai( wxCommandEvent& event ) | |||
{ | |||
// TODO: Implement OnRadioDelai | |||
} | |||
void optionsRche::OnRadioDates( wxCommandEvent& event ) | |||
{ | |||
// TODO: Implement OnRadioDates | |||
} | |||
void optionsRche::OnCheckDebut( wxCommandEvent& event ) | |||
{ | |||
// TODO: Implement OnCheckDebut | |||
} | |||
void optionsRche::OnCheckFin( wxCommandEvent& event ) | |||
{ | |||
// TODO: Implement OnCheckFin | |||
} | |||
void optionsRche::OnCheckVille( wxCommandEvent& event ) | |||
{ | |||
// TODO: Implement OnCheckVille | |||
} | |||
void optionsRche::OnCheckPerso( wxCommandEvent& event ) | |||
{ | |||
// TODO: Implement OnCheckPerso | |||
} | |||
void optionsRche::OnUpdate( wxCommandEvent& event ) | |||
{ | |||
// TODO: Implement OnUpdate | |||
@@ -69,5 +39,45 @@ void optionsRche::OnUpdate( wxCommandEvent& event ) | |||
void optionsRche::OnOk( wxCommandEvent& event ) | |||
{ | |||
// TODO: Implement OnOk | |||
Close(); | |||
} | |||
void optionsRche::updateGUI( wxCommandEvent& event ) | |||
{ | |||
if (checkbox_suppl->IsChecked()) | |||
textctrl_suppl->Enable(); | |||
else | |||
textctrl_suppl->Disable(); | |||
if (checkbox_ville->IsChecked()) | |||
textctrl_ville->Enable(); | |||
else | |||
textctrl_ville->Disable(); | |||
if (radio_delai->GetValue()) | |||
{ | |||
datepicker_debut->Disable(); | |||
datepicker_fin->Disable(); | |||
if (checkbox_debut->IsChecked()) | |||
spinctrl_debut->Enable(); | |||
else | |||
spinctrl_debut->Disable(); | |||
if (checkbox_fin->IsChecked()) | |||
spinctrl_fin->Enable(); | |||
else | |||
spinctrl_fin->Disable(); | |||
} | |||
else | |||
{ | |||
spinctrl_debut->Disable(); | |||
spinctrl_fin->Disable(); | |||
if (checkbox_debut->IsChecked()) | |||
datepicker_debut->Enable(); | |||
else | |||
datepicker_debut->Disable(); | |||
if (checkbox_fin->IsChecked()) | |||
datepicker_fin->Enable(); | |||
else | |||
datepicker_fin->Disable(); | |||
} | |||
} |
@@ -34,7 +34,7 @@ | |||
<property name="hidden">0</property> | |||
<property name="id">wxID_ANY</property> | |||
<property name="maximum_size"></property> | |||
<property name="minimum_size">650,480</property> | |||
<property name="minimum_size">650,500</property> | |||
<property name="name">dialog_optionsRche</property> | |||
<property name="pos"></property> | |||
<property name="size">-1,-1</property> | |||
@@ -402,11 +402,11 @@ | |||
<property name="orient">wxVERTICAL</property> | |||
<property name="permission">none</property> | |||
<event name="OnUpdateUI"></event> | |||
<object class="sizeritem" expanded="0"> | |||
<object class="sizeritem" expanded="1"> | |||
<property name="border">5</property> | |||
<property name="flag">wxEXPAND|wxALIGN_CENTER_HORIZONTAL</property> | |||
<property name="proportion">0</property> | |||
<object class="wxBoxSizer" expanded="0"> | |||
<object class="wxBoxSizer" expanded="1"> | |||
<property name="minimum_size"></property> | |||
<property name="name">sizer_nomset</property> | |||
<property name="orient">wxHORIZONTAL</property> | |||
@@ -583,11 +583,11 @@ | |||
<event name="OnUpdateUI"></event> | |||
</object> | |||
</object> | |||
<object class="sizeritem" expanded="0"> | |||
<object class="sizeritem" expanded="1"> | |||
<property name="border">5</property> | |||
<property name="flag">wxEXPAND|wxALIGN_CENTER_HORIZONTAL</property> | |||
<property name="proportion">0</property> | |||
<object class="wxBoxSizer" expanded="0"> | |||
<object class="wxBoxSizer" expanded="1"> | |||
<property name="minimum_size"></property> | |||
<property name="name">sizer_noms</property> | |||
<property name="orient">wxHORIZONTAL</property> | |||
@@ -657,7 +657,7 @@ | |||
<property name="proportion">0</property> | |||
<object class="wxRadioBox" expanded="0"> | |||
<property name="bg"></property> | |||
<property name="choices">"AND" "OR"</property> | |||
<property name="choices">"AND" "OR" "NOT"</property> | |||
<property name="context_help"></property> | |||
<property name="context_menu">1</property> | |||
<property name="enabled">1</property> | |||
@@ -829,7 +829,7 @@ | |||
<property name="border">5</property> | |||
<property name="flag">wxEXPAND</property> | |||
<property name="proportion">0</property> | |||
<object class="wxFlexGridSizer" expanded="0"> | |||
<object class="wxFlexGridSizer" expanded="1"> | |||
<property name="cols">3</property> | |||
<property name="flexible_direction">wxBOTH</property> | |||
<property name="growablecols">1,2</property> | |||
@@ -899,7 +899,7 @@ | |||
<event name="OnMouseEvents"></event> | |||
<event name="OnMouseWheel"></event> | |||
<event name="OnPaint"></event> | |||
<event name="OnRadioButton">OnRadioDelai</event> | |||
<event name="OnRadioButton">updateGUI</event> | |||
<event name="OnRightDClick"></event> | |||
<event name="OnRightDown"></event> | |||
<event name="OnRightUp"></event> | |||
@@ -956,7 +956,7 @@ | |||
<event name="OnMouseEvents"></event> | |||
<event name="OnMouseWheel"></event> | |||
<event name="OnPaint"></event> | |||
<event name="OnRadioButton">OnRadioDates</event> | |||
<event name="OnRadioButton">updateGUI</event> | |||
<event name="OnRightDClick"></event> | |||
<event name="OnRightDown"></event> | |||
<event name="OnRightUp"></event> | |||
@@ -997,7 +997,7 @@ | |||
<property name="window_name"></property> | |||
<property name="window_style"></property> | |||
<event name="OnChar"></event> | |||
<event name="OnCheckBox">OnCheckDebut</event> | |||
<event name="OnCheckBox">updateGUI</event> | |||
<event name="OnEnterWindow"></event> | |||
<event name="OnEraseBackground"></event> | |||
<event name="OnKeyDown"></event> | |||
@@ -1169,7 +1169,7 @@ | |||
<property name="window_name"></property> | |||
<property name="window_style"></property> | |||
<event name="OnChar"></event> | |||
<event name="OnCheckBox">OnCheckFin</event> | |||
<event name="OnCheckBox">updateGUI</event> | |||
<event name="OnEnterWindow"></event> | |||
<event name="OnEraseBackground"></event> | |||
<event name="OnKeyDown"></event> | |||
@@ -1406,7 +1406,7 @@ | |||
<property name="window_name"></property> | |||
<property name="window_style"></property> | |||
<event name="OnChar"></event> | |||
<event name="OnCheckBox">OnCheckVille</event> | |||
<event name="OnCheckBox">updateGUI</event> | |||
<event name="OnEnterWindow"></event> | |||
<event name="OnEraseBackground"></event> | |||
<event name="OnKeyDown"></event> | |||
@@ -1547,11 +1547,11 @@ | |||
<event name="OnUpdateUI"></event> | |||
</object> | |||
</object> | |||
<object class="sizeritem" expanded="0"> | |||
<object class="sizeritem" expanded="1"> | |||
<property name="border">5</property> | |||
<property name="flag">wxEXPAND</property> | |||
<property name="proportion">0</property> | |||
<object class="wxBoxSizer" expanded="0"> | |||
<object class="wxBoxSizer" expanded="1"> | |||
<property name="minimum_size"></property> | |||
<property name="name">sizer_suppl</property> | |||
<property name="orient">wxHORIZONTAL</property> | |||
@@ -1588,7 +1588,7 @@ | |||
<property name="window_name"></property> | |||
<property name="window_style"></property> | |||
<event name="OnChar"></event> | |||
<event name="OnCheckBox">OnCheckPerso</event> | |||
<event name="OnCheckBox">updateGUI</event> | |||
<event name="OnEnterWindow"></event> | |||
<event name="OnEraseBackground"></event> | |||
<event name="OnKeyDown"></event> | |||
@@ -22,12 +22,7 @@ protected: | |||
void OnUp( wxCommandEvent& event ); | |||
void OnDown( wxCommandEvent& event ); | |||
void OnDel( wxCommandEvent& event ); | |||
void OnRadioDelai( wxCommandEvent& event ); | |||
void OnRadioDates( wxCommandEvent& event ); | |||
void OnCheckDebut( wxCommandEvent& event ); | |||
void OnCheckFin( wxCommandEvent& event ); | |||
void OnCheckVille( wxCommandEvent& event ); | |||
void OnCheckPerso( wxCommandEvent& event ); | |||
void updateGUI( wxCommandEvent& event ); | |||
void OnUpdate( wxCommandEvent& event ); | |||
void OnOk( wxCommandEvent& event ); | |||
public: | |||
@@ -11,7 +11,7 @@ | |||
dialog_optionsRche::dialog_optionsRche( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) | |||
{ | |||
this->SetSizeHints( wxSize( 650,480 ), wxDefaultSize ); | |||
this->SetSizeHints( wxSize( 650,500 ), wxDefaultSize ); | |||
wxBoxSizer* verticalsizer; | |||
verticalsizer = new wxBoxSizer( wxVERTICAL ); | |||
@@ -68,7 +68,7 @@ dialog_optionsRche::dialog_optionsRche( wxWindow* parent, wxWindowID id, const w | |||
radio_demandeur->SetSelection( 0 ); | |||
sizer_noms->Add( radio_demandeur, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); | |||
wxString radio_bothChoices[] = { wxT("AND"), wxT("OR") }; | |||
wxString radio_bothChoices[] = { wxT("AND"), wxT("OR"), wxT("NOT") }; | |||
int radio_bothNChoices = sizeof( radio_bothChoices ) / sizeof( wxString ); | |||
radio_both = new wxRadioBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, radio_bothNChoices, radio_bothChoices, 1, wxRA_SPECIFY_COLS ); | |||
radio_both->SetSelection( 0 ); | |||
@@ -199,12 +199,12 @@ dialog_optionsRche::dialog_optionsRche( wxWindow* parent, wxWindowID id, const w | |||
bouton_up->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialog_optionsRche::OnUp ), NULL, this ); | |||
bouton_down->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialog_optionsRche::OnDown ), NULL, this ); | |||
bouton_del->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialog_optionsRche::OnDel ), NULL, this ); | |||
radio_delai->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( dialog_optionsRche::OnRadioDelai ), NULL, this ); | |||
radio_dates->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( dialog_optionsRche::OnRadioDates ), NULL, this ); | |||
checkbox_debut->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( dialog_optionsRche::OnCheckDebut ), NULL, this ); | |||
checkbox_fin->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( dialog_optionsRche::OnCheckFin ), NULL, this ); | |||
checkbox_ville->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( dialog_optionsRche::OnCheckVille ), NULL, this ); | |||
checkbox_suppl->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( dialog_optionsRche::OnCheckPerso ), NULL, this ); | |||
radio_delai->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( dialog_optionsRche::updateGUI ), NULL, this ); | |||
radio_dates->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( dialog_optionsRche::updateGUI ), NULL, this ); | |||
checkbox_debut->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( dialog_optionsRche::updateGUI ), NULL, this ); | |||
checkbox_fin->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( dialog_optionsRche::updateGUI ), NULL, this ); | |||
checkbox_ville->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( dialog_optionsRche::updateGUI ), NULL, this ); | |||
checkbox_suppl->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( dialog_optionsRche::updateGUI ), NULL, this ); | |||
bouton_actualiser->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialog_optionsRche::OnUpdate ), NULL, this ); | |||
bouton_ok->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialog_optionsRche::OnOk ), NULL, this ); | |||
} | |||
@@ -217,12 +217,12 @@ dialog_optionsRche::~dialog_optionsRche() | |||
bouton_up->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialog_optionsRche::OnUp ), NULL, this ); | |||
bouton_down->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialog_optionsRche::OnDown ), NULL, this ); | |||
bouton_del->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialog_optionsRche::OnDel ), NULL, this ); | |||
radio_delai->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( dialog_optionsRche::OnRadioDelai ), NULL, this ); | |||
radio_dates->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( dialog_optionsRche::OnRadioDates ), NULL, this ); | |||
checkbox_debut->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( dialog_optionsRche::OnCheckDebut ), NULL, this ); | |||
checkbox_fin->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( dialog_optionsRche::OnCheckFin ), NULL, this ); | |||
checkbox_ville->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( dialog_optionsRche::OnCheckVille ), NULL, this ); | |||
checkbox_suppl->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( dialog_optionsRche::OnCheckPerso ), NULL, this ); | |||
radio_delai->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( dialog_optionsRche::updateGUI ), NULL, this ); | |||
radio_dates->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( dialog_optionsRche::updateGUI ), NULL, this ); | |||
checkbox_debut->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( dialog_optionsRche::updateGUI ), NULL, this ); | |||
checkbox_fin->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( dialog_optionsRche::updateGUI ), NULL, this ); | |||
checkbox_ville->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( dialog_optionsRche::updateGUI ), NULL, this ); | |||
checkbox_suppl->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( dialog_optionsRche::updateGUI ), NULL, this ); | |||
bouton_actualiser->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialog_optionsRche::OnUpdate ), NULL, this ); | |||
bouton_ok->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( dialog_optionsRche::OnOk ), NULL, this ); | |||
@@ -79,12 +79,7 @@ class dialog_optionsRche : public wxDialog | |||
virtual void OnUp( wxCommandEvent& event ) { event.Skip(); } | |||
virtual void OnDown( wxCommandEvent& event ) { event.Skip(); } | |||
virtual void OnDel( wxCommandEvent& event ) { event.Skip(); } | |||
virtual void OnRadioDelai( wxCommandEvent& event ) { event.Skip(); } | |||
virtual void OnRadioDates( wxCommandEvent& event ) { event.Skip(); } | |||
virtual void OnCheckDebut( wxCommandEvent& event ) { event.Skip(); } | |||
virtual void OnCheckFin( wxCommandEvent& event ) { event.Skip(); } | |||
virtual void OnCheckVille( wxCommandEvent& event ) { event.Skip(); } | |||
virtual void OnCheckPerso( wxCommandEvent& event ) { event.Skip(); } | |||
virtual void updateGUI( wxCommandEvent& event ) { event.Skip(); } | |||
virtual void OnUpdate( wxCommandEvent& event ) { event.Skip(); } | |||
virtual void OnOk( wxCommandEvent& event ) { event.Skip(); } | |||