30 choiceOK = pdb->FillChoice (choiceProject,
project_tid);
31 choiceOK = pdb->FillChoice (choiceTask,
task_tid);
32 choiceOK = pdb->FillChoice (choiceTool,
tool_tid);
33 if (!choiceOK) wxLogError (
"Initialization of choices failed (yatishDlgActivity)");
35 task = pdb->ChoiceSelector (
task_tid,
id);
36 tool = pdb->ChoiceSelector (
tool_tid,
id);
37 choiceProject->SetValidator ( wxGenericValidator (&project) );
38 choiceTask ->SetValidator ( wxGenericValidator (&task) );
39 choiceTool ->SetValidator ( wxGenericValidator (&tool) );
40 Fit(); SetMaxSize ( GetSize() );
53 if (!choiceOK) wxLogError (
"Initialization of choices failed (yatishDlgActivity)");
60 Fit(); SetMaxSize ( GetSize() );
67 wxBoxSizer* BoxSizer1;
68 wxBoxSizer* BoxSizer2;
69 wxButton* buttonCancel;
70 wxFlexGridSizer* FlexGridSizer1;
71 wxStaticText* StaticText1;
72 wxStaticText* StaticText2;
73 wxStaticText* StaticText3;
75 Create(0, wxID_ANY, _(
"Table: yatish_activity"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T(
"wxID_ANY"));
76 BoxSizer1 =
new wxBoxSizer(wxVERTICAL);
77 staticBoxSizer =
new wxStaticBoxSizer(wxHORIZONTAL,
this, _(
"(previously selected row)"));
78 FlexGridSizer1 =
new wxFlexGridSizer(3, 2, 0, 0);
79 StaticText1 =
new wxStaticText(
this, wxID_ANY, _(
"Project:"), wxDefaultPosition, wxDefaultSize, 0, _T(
"wxID_ANY"));
80 FlexGridSizer1->Add(StaticText1, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
81 choiceProject =
new wxChoice(
this,
idChoiceProject, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T(
"idChoiceProject"));
82 FlexGridSizer1->Add(
choiceProject, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5);
83 StaticText2 =
new wxStaticText(
this, wxID_ANY, _(
"Task:"), wxDefaultPosition, wxDefaultSize, 0, _T(
"wxID_ANY"));
84 FlexGridSizer1->Add(StaticText2, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
85 choiceTask =
new wxChoice(
this,
idChoiceTask, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T(
"idChoiceTask"));
86 FlexGridSizer1->Add(
choiceTask, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5);
87 StaticText3 =
new wxStaticText(
this, wxID_ANY, _(
"Tool:"), wxDefaultPosition, wxDefaultSize, 0, _T(
"wxID_ANY"));
88 FlexGridSizer1->Add(StaticText3, 1, wxALL|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5);
89 choiceTool =
new wxChoice(
this,
idChoiceTool, wxDefaultPosition, wxDefaultSize, 0, 0, 0, wxDefaultValidator, _T(
"idChoiceTool"));
90 FlexGridSizer1->Add(
choiceTool, 1, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5);
91 staticBoxSizer->Add(FlexGridSizer1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
92 BoxSizer1->Add(
staticBoxSizer, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
93 BoxSizer2 =
new wxBoxSizer(wxHORIZONTAL);
94 buttonCancel =
new wxButton(
this, wxID_CANCEL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T(
"wxID_CANCEL"));
95 BoxSizer2->Add(buttonCancel, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
96 buttonSave =
new wxButton(
this, wxID_SAVE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T(
"wxID_SAVE"));
97 BoxSizer2->Add(
buttonSave, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
98 buttonNew =
new wxButton(
this, wxID_NEW, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T(
"wxID_NEW"));
99 BoxSizer2->Add(
buttonNew, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
100 BoxSizer1->Add(BoxSizer2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
102 BoxSizer1->Fit(
this);
103 BoxSizer1->SetSizeHints(
this);
116 TransferDataFromWindow();
118 EndModal (wxID_SAVE);
120 EndModal (wxID_CANCEL);
124 TransferDataFromWindow();
128 EndModal (wxID_CANCEL);
Interacts with yatish tables in a SQLite database.
bool FillChoice(wxChoice *, tableID)
Fills a wxChoice.
bool RecordActivity(long, int, int, int)
Modifies or creates a record in the yatish_activity table.
static const long idChoiceProject
static const long idChoiceTool
static const long idChoiceTask
yatishDlgActivity(yatishDBsqlite *, long)
This constructor initializes the dialog box with data from the SQL record identified by sql_id.
void OnButtonSaveClick(wxCommandEvent &event)
wxStaticBoxSizer * staticBoxSizer
void OnButtonNewClick(wxCommandEvent &event)