File: SpmOptionsDlg.cpp

package info (click to toggle)
mriconvert 1%3A2.1.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,488 kB
  • sloc: cpp: 17,029; makefile: 11
file content (53 lines) | stat: -rw-r----- 1,181 bytes parent folder | download | duplicates (5)
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
46
47
48
49
50
51
52
53
/// SpmOptionsDlg.cpp
/**
*/

#include <wx/wxprec.h>
#include <wx/spinctrl.h>
#include <wx/statline.h>

#include "SpmOptionsDlg.h"
#include "NewSpmOutputter.h"

using namespace jcs;

BEGIN_EVENT_TABLE(SpmOptionsDlg, BasicOptionsDlg)

EVT_BUTTON(wxID_OK, SpmOptionsDlg::OnOkay)

END_EVENT_TABLE()


SpmOptionsDlg::SpmOptionsDlg(NewSpmOutputter* outputter)
: BasicOptionsDlg(_("SPM Analyze options"), outputter), 
  mOutputter(outputter)
{
  wxBoxSizer* dlgSizer = new wxBoxSizer(wxVERTICAL);

  dlgSizer->Add(myPanel);

  wxBoxSizer* buttonSizer = new wxBoxSizer(wxHORIZONTAL);

  wxButton* okayButton = new wxButton(this, wxID_OK, _("Okay"));
  buttonSizer->Add(okayButton, 0, wxRIGHT, 10);
  buttonSizer->Add(new wxButton(this, wxID_CANCEL, _("Cancel")));
  okayButton->SetDefault();

  dlgSizer->Add(buttonSizer, 0, wxALIGN_RIGHT|wxALL, 10);

  SetSizer(dlgSizer);
  dlgSizer->Fit(this);

  mNeedsRebuild = false;

}

void
SpmOptionsDlg::OnOkay(wxCommandEvent& event)
{
  bool rbld = Rebuild();
  bool nfSave = SaveNameFields();
  mNeedsRebuild = rbld || nfSave;
  BasicOptionsDlg::OnOkay(event);
  EndModal(event.GetId());
}