summaryrefslogtreecommitdiffstats
path: root/Project/SwitchingForm.cpp
diff options
context:
space:
mode:
authorThales1330 <thaleslima.ufu@gmail.com>2016-10-07 18:39:16 -0300
committerThales1330 <thaleslima.ufu@gmail.com>2016-10-07 18:39:16 -0300
commit3596d19f6d804a9610545ce39f07e421d1dc716e (patch)
treefb7255b75e5d0cb8914b664979e762b0e24e80e9 /Project/SwitchingForm.cpp
parent0ad4701a05a1fb267ee58c3da89d897eba1d91ee (diff)
downloadPSP.git-3596d19f6d804a9610545ce39f07e421d1dc716e.tar.gz
PSP.git-3596d19f6d804a9610545ce39f07e421d1dc716e.tar.xz
PSP.git-3596d19f6d804a9610545ce39f07e421d1dc716e.zip
Switching form under implementation
Diffstat (limited to 'Project/SwitchingForm.cpp')
-rw-r--r--Project/SwitchingForm.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/Project/SwitchingForm.cpp b/Project/SwitchingForm.cpp
new file mode 100644
index 0000000..e97ca27
--- /dev/null
+++ b/Project/SwitchingForm.cpp
@@ -0,0 +1,41 @@
+#include "SwitchingForm.h"
+
+SwitchingForm::SwitchingForm(wxWindow* parent) : SwitchingFormBase(parent)
+{
+ m_listCtrlSwitchings->AppendColumn(_("Type"));
+ m_listCtrlSwitchings->AppendColumn(_("Time (s)"));
+
+ SetSize(GetBestSize());
+ Layout();
+
+ /*for(int i=0; i<10; i++) {
+ m_listCtrlSwitchings->InsertItem(i, "Entrada");
+ m_listCtrlSwitchings->SetItem(i, 1, wxString::Format("%d", i));
+ }*/
+}
+
+SwitchingForm::~SwitchingForm() {}
+void SwitchingForm::OnCancelButtonClick(wxCommandEvent& event) {}
+void SwitchingForm::OnInsertButtonClick(wxCommandEvent& event)
+{
+ long index = m_listCtrlSwitchings->InsertItem(
+ m_maxID, m_pgPropType->GetValue().GetInteger() == 0 ? _("Insert") : _("Remove"));
+ m_listCtrlSwitchings->SetItem(index, 1, m_pgPropTime->GetValue().GetString());
+ m_maxID++;
+}
+void SwitchingForm::OnOKButtonClick(wxCommandEvent& event) {}
+void SwitchingForm::OnRemoveButtonClick(wxCommandEvent& event)
+{
+ std::vector<long> itemList;
+ long item = -1;
+ while(true) {
+ item = m_listCtrlSwitchings->GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
+ if(item == -1) break;
+ itemList.push_back(item);
+ }
+ for(int i = (int)itemList.size() - 1; i >= 0; i--) {
+ m_listCtrlSwitchings->DeleteItem(itemList[i]);
+ }
+}
+void SwitchingForm::OnChangeProperties(wxPropertyGridEvent& event) {}
+void SwitchingForm::OnSelectItem(wxListEvent& event) {}