Stimfit @PACKAGE_VERSION@
Loading...
Searching...
No Matches
smalldlgs.h
Go to the documentation of this file.
1// This program is free software; you can redistribute it and/or
2// modify it under the terms of the GNU General Public License
3// as published by the Free Software Foundation; either version 2
4// of the License, or (at your option) any later version.
5
6// This program is distributed in the hope that it will be useful,
7// but WITHOUT ANY WARRANTY; without even the implied warranty of
8// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9// GNU General Public License for more details.
10
11// You should have received a copy of the GNU General Public License
12// along with this program; if not, write to the Free Software
13// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
14
20
21#ifndef _SMALLDLGS_H
22#define _SMALLDLGS_H
23
27
28#include <wx/dirctrl.h>
29#include <wx/filename.h>
30#include <vector>
31#include "./../../stf.h"
32
35{
36 DECLARE_EVENT_TABLE()
37
38private:
39 wxStdDialogButtonSizer* m_sdbSizer;
40
41public:
43
54 wxWindow* parent,
55 const std::string& szGeneral,
56 const std::string& szFile,
57 const std::string& szSection,
58 int id = wxID_ANY,
59 wxString title = wxT("File information"),
60 wxPoint pos = wxDefaultPosition,
61 wxSize size = wxDefaultSize,
62 int style = wxCAPTION
63 );
64
65};
66
69{
70 DECLARE_EVENT_TABLE()
71
72private:
73 int m_selChannel1, m_selChannel2;
74 wxStdDialogButtonSizer* m_sdbSizer;
75 wxComboBox *m_comboBoxCh1,*m_comboBoxCh2;
76
77 void OnComboCh1( wxCommandEvent& event );
78 void OnComboCh2( wxCommandEvent& event );
79
81
83 bool OnOK();
84
85public:
87
96 wxWindow* parent,
97 const std::vector<wxString>& channelNames=
98 std::vector<wxString>(0),
99 int id = wxID_ANY,
100 wxString title = wxT("Select channels"),
101 wxPoint pos = wxDefaultPosition,
102 wxSize size = wxDefaultSize,
103 int style = wxCAPTION
104 );
105
107
110 virtual void EndModal(int retCode);
111
113
115 int GetSelCh1() const {return m_selChannel1;}
116
118
120 int GetSelCh2() const {return m_selChannel2;}
121};
122
124class wxStfAlignDlg : public wxDialog
125{
126 DECLARE_EVENT_TABLE()
127
128private:
129 int m_alignRise;
130 bool m_useReference, m_hasReference;
131 wxCheckBox* m_checkBox;
132 wxRadioBox* m_radioBox;
133 wxStdDialogButtonSizer* m_sdbSizer;
134
136
138 bool OnOK();
139
140public:
142
150 wxWindow* parent,
151 bool hasReference,
152 int id = wxID_ANY,
153 wxString title = wxT("Alignment mode"),
154 wxPoint pos = wxDefaultPosition,
155 wxSize size = wxDefaultSize,
156 int style = wxCAPTION
157 );
158
160
163 int AlignRise() const {return m_alignRise;}
164
166
169 bool UseReference() const {return m_useReference;}
170
172
175 virtual void EndModal(int retCode);
176};
177
180{
181 DECLARE_EVENT_TABLE()
182
183private:
184 int m_filterSelect;
185 wxRadioBox* m_radioBox;
186 wxStdDialogButtonSizer* m_sdbSizer;
187
189
191 bool OnOK();
192
193public:
195
203 wxWindow* parent,
204 int id = wxID_ANY,
205 wxString title = wxT("Filter function"),
206 wxPoint pos = wxDefaultPosition,
207 wxSize size = wxDefaultSize,
208 int style = wxCAPTION
209 );
210
212
214 int GetFilterSelect() const {return m_filterSelect;}
215
217
220 virtual void EndModal(int retCode);
221};
222
225{
226 DECLARE_EVENT_TABLE()
227
228private:
229 int m_fSelect;
230 wxRadioBox* m_radioBox;
231 wxStdDialogButtonSizer* m_sdbSizer;
232
234
236 bool OnOK();
237
238public:
240
248 wxWindow* parent,
249 int id = wxID_ANY,
250 wxString title = wxT("Choose function"),
251 wxPoint pos = wxDefaultPosition,
252 wxSize size = wxDefaultSize,
253 int style = wxCAPTION
254 );
255
257
259 int GetFSelect() const {return m_fSelect;}
260
262
265 virtual void EndModal(int retCode);
266};
267
270{
271 DECLARE_EVENT_TABLE()
272
273private:
274 wxStdDialogButtonSizer* m_sdbSizer;
275
276public:
278
287 wxWindow* parent,
288 const wxString& info,
289 int id = wxID_ANY,
290 wxString title = wxT("Fit information"),
291 wxPoint pos = wxDefaultPosition,
292 wxSize size = wxDefaultSize,
293 int style = wxCAPTION
294 );
295};
296
300 BatchOption( ) : label( wxT("\0") ), selection(false), index(-1) {}
301
306 BatchOption(const wxString& lab, bool sel, int id) : label(lab), selection(sel), index(id) {}
307
310 int index;
311};
312
314class wxStfBatchDlg : public wxDialog
315{
316 DECLARE_EVENT_TABLE()
317
318 private:
319 std::vector<BatchOption> batchOptions;
320
321 wxCheckListBox* m_checkList;
322 wxStdDialogButtonSizer* m_sdbSizer;
323
325
327 bool OnOK();
328 BatchOption LookUp( int index ) const;
329
330 enum {
331 id_base=0,
332 id_basesd,
333 id_threshold,
334 id_slopethresholdtime,
335 id_peakzero,
336 id_peakbase,
337 id_peakthreshold,
338 id_peaktime,
339 id_rtLoHi,
340 id_innerLoHi,
341 id_outerLoHi,
342 id_t50,
343 id_t50se,
344 id_slopes,
345 id_slopetimes,
346 id_latencies,
347 id_fit,
348#ifdef WITH_PSLOPE
349 id_pslopes,
350#endif
351 id_crossings
352 };
353
354public:
356
364 wxWindow* parent,
365 int id = wxID_ANY,
366 wxString title = wxT("Choose values"),
367 wxPoint pos = wxDefaultPosition,
368 wxSize size = wxDefaultSize,
369 int style = wxCAPTION
370 );
371
373
375 bool PrintBase() const {return LookUp(id_base).selection;}
376
378
380 bool PrintBaseSD() const {return LookUp(id_basesd).selection;}
381
383
385 bool PrintThreshold() const {return LookUp(id_threshold).selection;}
386
388
390 bool PrintSlopeThresholdTime() const {return LookUp(id_slopethresholdtime).selection;}
391
393
395 bool PrintPeakZero() const {return LookUp(id_peakzero).selection;}
396
398
400 bool PrintPeakBase() const {return LookUp(id_peakbase).selection;}
401
403
405 bool PrintPeakThreshold() const {return LookUp(id_peakthreshold).selection;}
406
408
410 bool PrintPeakTime() const {return LookUp(id_peaktime).selection;}
411
413
415 bool PrintRTLoHi() const {return LookUp(id_rtLoHi).selection;}
416
418
420 bool PrintInnerRTLoHi() const {return LookUp(id_innerLoHi).selection;}
421
423
425 bool PrintOuterRTLoHi() const {return LookUp(id_outerLoHi).selection;}
426
428
430 bool PrintT50() const {return LookUp(id_t50).selection;}
431
433
435 bool PrintT50SE() const {return LookUp(id_t50se).selection;}
436
438
440 bool PrintSlopes() const {return LookUp(id_slopes).selection;}
441
443
445 bool PrintSlopeTimes() const {return LookUp(id_slopetimes).selection;}
446
447#ifdef WITH_PSLOPE
449
451 bool PrintPSlopes() const {return LookUp(id_pslopes).selection;}
452#endif
453
455
457 bool PrintThr() const {return LookUp(id_crossings).selection;}
458
460
462 bool PrintLatencies() const {return LookUp(id_latencies).selection;}
463
465
467 bool PrintFitResults() const {return LookUp(id_fit).selection;}
468
470
473 virtual void EndModal(int retCode);
474};
475
478{
479 DECLARE_EVENT_TABLE()
480
481private:
482 bool m_gimmicks,m_isFile;
483 int m_downsampling;
484 wxStdDialogButtonSizer* m_sdbSizer;
485 wxCheckBox* m_checkBox;
486 wxTextCtrl* m_textCtrl;
487
489
491 bool OnOK();
492
493public:
495
504 wxWindow* parent,
505 bool isFile=false,
506 int id = wxID_ANY,
507 wxString title = wxT("Settings"),
508 wxPoint pos = wxDefaultPosition,
509 wxSize size = wxDefaultSize,
510 int style = wxCAPTION
511 );
512
514
516 bool GetGimmicks() const {return m_gimmicks;}
517
519
521 int GetDownSampling() const {return m_downsampling;}
522
524
527 virtual void EndModal(int retCode);
528};
529
532{
533 DECLARE_EVENT_TABLE()
534
535private:
536 double m_width;
537 double m_center;
538 double m_amp;
539 wxStdDialogButtonSizer* m_sdbSizer;
540 wxSlider* m_slider;
541 wxTextCtrl *m_textCtrlCenter, *m_textCtrlWidth;
542
544
546 bool OnOK();
547
548public:
550
558 wxWindow* parent,
559 int id = wxID_ANY,
560 wxString title = wxT("Settings for Gaussian function"),
561 wxPoint pos = wxDefaultPosition,
562 wxSize size = wxDefaultSize,
563 int style = wxCAPTION
564 );
565
567
569 double Width() const {return m_width;}
570
572
574 double Center() const {return m_center;}
575
577
579 double Amp() const {return m_amp;}
580
582
585 virtual void EndModal(int retCode);
586};
587
590{
591 DECLARE_EVENT_TABLE()
592
593private:
594 int m_hLines;
595 bool m_toSection;
596 bool m_firstIsTime;
597 bool m_isSeries;
598 int m_ncolumns;
599 double m_sr;
600 wxString m_yUnits;
601 wxString m_yUnitsCh2;
602 wxString m_xUnits;
603 bool m_applyToAll;
604
605 void disableSenseless();
606
607 wxStdDialogButtonSizer* m_sdbSizer;
608 wxTextCtrl *m_textCtrlHLines, *m_textCtrlYUnits, *m_textCtrlYUnitsCh2,
609 *m_textCtrlXUnits, *m_textCtrlSR;
610 wxComboBox *m_comboBoxNcolumns,*m_comboBoxFirsttime,*m_comboBoxSecorch;
611 wxCheckBox *m_checkBoxApplyToAll;
612 void OnComboNcolumns( wxCommandEvent& event );
613 void OnComboFirsttime( wxCommandEvent& event );
614 void OnComboSecorch( wxCommandEvent& event );
615
617
619 bool OnOK();
620
621public:
623
635 wxWindow* parent,
636 const wxString& textPreview=wxT("\0"),
637 int hLines_=1,
638 bool isSeries=false,
639 int id = wxID_ANY,
640 wxString title = wxT("Text file import settings"),
641 wxPoint pos = wxDefaultPosition,
642 wxSize size = wxDefaultSize,
643 int style = wxCAPTION
644 );
645
647
649 int GetHLines() const {return m_hLines;}
650
652
654 bool ToSection() const {return m_toSection;}
655
657
659 bool FirstIsTime() const {return m_firstIsTime;}
660
662
664 int GetNColumns() const {return m_ncolumns;}
665
667
669 double GetSR() const {return m_sr;}
670
672
674 const wxString& GetYUnits() const {return m_yUnits;}
675
677
679 const wxString& GetYUnitsCh2() const {return m_yUnitsCh2;}
680
682
684 const wxString& GetXUnits() const {return m_xUnits;}
685
687
689 bool ApplyToAll() const {return m_applyToAll;}
690
692
695
697
700 virtual void EndModal(int retCode);
701};
702
703class wxDirPickerCtrl;
704
705class wxListCtrl;
706
709{
710 DECLARE_EVENT_TABLE()
711
712private:
713 wxListCtrl* m_List;
714 std::vector<int> channelOrder;
715
716 void OnUparrow( wxCommandEvent& event );
717 void OnDownarrow( wxCommandEvent& event );
718 void SwapItems(long itemId1, long itemId2);
719
721
723 bool OnOK();
724
725public:
727
736 wxWindow* parent,
737 const std::vector<wxString>& channelNames=
738 std::vector<wxString>(0),
739 int id = wxID_ANY,
740 wxString title = wxT("Re-order channels"),
741 wxPoint pos = wxDefaultPosition,
742 wxSize size = wxDefaultSize,
743 int style = wxCAPTION
744 );
745
747
749 std::vector<int> GetChannelOrder() const {return channelOrder;}
750
752
755 virtual void EndModal(int retCode);
756};
757
758/* @} */
759
760#endif
WORD TSTime TpMarker WORD size
Definition Son.h:337
See http://www.wxwidgets.org/manuals/stable/wx_wxcheckbox.html (wxWidgets documentation)
See http://www.wxwidgets.org/manuals/stable/wx_wxcommandevent.html (wxWidgets documentation)
See http://www.wxwidgets.org/manuals/stable/wx_wxdialog.html (wxWidgets documentation)
See http://www.wxwidgets.org/manuals/stable/wx_wxpoint.html (wxWidgets documentation)
See http://www.wxwidgets.org/manuals/stable/wx_wxsize.html (wxWidgets documentation)
See http://www.wxwidgets.org/manuals/stable/wx_wxstring.html (wxWidgets documentation)
See http://www.wxwidgets.org/manuals/stable/wx_wxwindow.html (wxWidgets documentation)
virtual void EndModal(int retCode)
Called upon ending a modal dialog.
wxStfGaussianDlg(wxWindow *parent, int id=wxID_ANY, wxString title=wxT("Settings for Gaussian function"), wxPoint pos=wxDefaultPosition, wxSize size=wxDefaultSize, int style=wxCAPTION)
Constructor.
bool selection
Checkbox label.
Definition smalldlgs.h:309
wxStfFilterSelDlg(wxWindow *parent, int id=wxID_ANY, wxString title=wxT("Filter function"), wxPoint pos=wxDefaultPosition, wxSize size=wxDefaultSize, int style=wxCAPTION)
Constructor.
bool ApplyToAll() const
Indicates whether the settings apply to all files in a series.
Definition smalldlgs.h:689
wxStfOrderChannelsDlg(wxWindow *parent, const std::vector< wxString > &channelNames=std::vector< wxString >(0), int id=wxID_ANY, wxString title=wxT("Re-order channels"), wxPoint pos=wxDefaultPosition, wxSize size=wxDefaultSize, int style=wxCAPTION)
Constructor.
bool PrintSlopeThresholdTime() const
Indicates whether the time of slope threshold crossing should be printed in the batch analysis table.
Definition smalldlgs.h:390
bool PrintPeakThreshold() const
Indicates whether the peak value (from threshold) should be printed in the batch analysis table.
Definition smalldlgs.h:405
wxStfFitInfoDlg(wxWindow *parent, const wxString &info, int id=wxID_ANY, wxString title=wxT("Fit information"), wxPoint pos=wxDefaultPosition, wxSize size=wxDefaultSize, int style=wxCAPTION)
Constructor.
virtual void EndModal(int retCode)
Called upon ending a modal dialog.
wxStfTextImportDlg(wxWindow *parent, const wxString &textPreview=wxT("\0"), int hLines_=1, bool isSeries=false, int id=wxID_ANY, wxString title=wxT("Text file import settings"), wxPoint pos=wxDefaultPosition, wxSize size=wxDefaultSize, int style=wxCAPTION)
Constructor.
virtual void EndModal(int retCode)
Called upon ending a modal dialog.
double GetSR() const
Get the sampling rate.
Definition smalldlgs.h:669
bool PrintThr() const
Indicates whether a threshold crossing should be printed in the batch analysis table.
Definition smalldlgs.h:457
virtual void EndModal(int retCode)
Called upon ending a modal dialog.
bool PrintPeakTime() const
Indicates whether the peak value (from threshold) should be printed in the batch analysis table.
Definition smalldlgs.h:410
stfio::txtImportSettings GetTxtImport() const
Get the text import filter settings struct.
bool PrintFitResults() const
Indicates whether the fit results should be printed in the batch analysis table.
Definition smalldlgs.h:467
bool PrintThreshold() const
Indicates whether the threshold should be printed in the batch analysis table.
Definition smalldlgs.h:385
bool PrintRTLoHi() const
Indicates whether the Lo-Hi% rise time should be printed in the batch analysis table.
Definition smalldlgs.h:415
virtual void EndModal(int retCode)
Called upon ending a modal dialog.
int GetSelCh1() const
Get selection for channel 1.
Definition smalldlgs.h:115
wxStfAlignDlg(wxWindow *parent, bool hasReference, int id=wxID_ANY, wxString title=wxT("Alignment mode"), wxPoint pos=wxDefaultPosition, wxSize size=wxDefaultSize, int style=wxCAPTION)
Constructor.
wxStfBatchDlg(wxWindow *parent, int id=wxID_ANY, wxString title=wxT("Choose values"), wxPoint pos=wxDefaultPosition, wxSize size=wxDefaultSize, int style=wxCAPTION)
Constructor.
bool PrintBase() const
Indicates whether the baseline should be printed in the batch analysis table.
Definition smalldlgs.h:375
wxString label
Definition smalldlgs.h:308
int AlignRise() const
Indicates whether the average should be aligned to the steepest rise.
Definition smalldlgs.h:163
bool PrintPeakBase() const
Indicates whether the peak (from baseline) value should be printed in the batch analysis table.
Definition smalldlgs.h:400
wxStfTransformDlg(wxWindow *parent, int id=wxID_ANY, wxString title=wxT("Choose function"), wxPoint pos=wxDefaultPosition, wxSize size=wxDefaultSize, int style=wxCAPTION)
Constructor.
double Width() const
Get the width of the Gaussian.
Definition smalldlgs.h:569
bool FirstIsTime() const
Indicates whether the first column contains time values.
Definition smalldlgs.h:659
wxStfFileInfoDlg(wxWindow *parent, const std::string &szGeneral, const std::string &szFile, const std::string &szSection, int id=wxID_ANY, wxString title=wxT("File information"), wxPoint pos=wxDefaultPosition, wxSize size=wxDefaultSize, int style=wxCAPTION)
Constructor.
int GetSelCh2() const
Get selection for channel 2.
Definition smalldlgs.h:120
bool PrintT50() const
Indicates whether the half amplitude duration should be printed in the batch analysis table.
Definition smalldlgs.h:430
bool PrintOuterRTLoHi() const
Indicates whether the Lo-Hi% inner rise time should be printed in the batch analysis table.
Definition smalldlgs.h:425
double Center() const
Get the center of the Gaussian.
Definition smalldlgs.h:574
bool PrintLatencies() const
Indicates whether the latency should be printed in the batch analysis table.
Definition smalldlgs.h:462
bool UseReference() const
Indicates whether the reference channel should be used for alignment.
Definition smalldlgs.h:169
const wxString & GetXUnits() const
Get the x units.
Definition smalldlgs.h:684
virtual void EndModal(int retCode)
Called upon ending a modal dialog.
bool PrintPeakZero() const
Indicates whether the peak (from 0) value should be printed in the batch analysis table.
Definition smalldlgs.h:395
bool PrintInnerRTLoHi() const
Indicates whether the Lo-Hi% inner rise time should be printed in the batch analysis table.
Definition smalldlgs.h:420
BatchOption()
Default constructor.
Definition smalldlgs.h:300
bool GetGimmicks() const
Indicates whether gimmicks (cursors, results table etc.) sould be printed.
Definition smalldlgs.h:516
wxStfChannelSelDlg(wxWindow *parent, const std::vector< wxString > &channelNames=std::vector< wxString >(0), int id=wxID_ANY, wxString title=wxT("Select channels"), wxPoint pos=wxDefaultPosition, wxSize size=wxDefaultSize, int style=wxCAPTION)
Constructor.
int GetFilterSelect() const
Get the selected filter function.
Definition smalldlgs.h:214
bool PrintT50SE() const
Indicates whether the start and end time for half amplitude should be printed in the batch analysis t...
Definition smalldlgs.h:435
double Amp() const
Get the amplitude of the Gaussian.
Definition smalldlgs.h:579
bool ToSection() const
Indicates whether columns should be put into section or into channels.
Definition smalldlgs.h:654
bool PrintSlopeTimes() const
Indicates whether the peak value (from threshold) should be printed in the batch analysis table.
Definition smalldlgs.h:445
virtual void EndModal(int retCode)
Called upon ending a modal dialog.
int index
Checkbox status.
Definition smalldlgs.h:310
wxStfPreprintDlg(wxWindow *parent, bool isFile=false, int id=wxID_ANY, wxString title=wxT("Settings"), wxPoint pos=wxDefaultPosition, wxSize size=wxDefaultSize, int style=wxCAPTION)
Constructor.
int GetHLines() const
Get the number of header lines.
Definition smalldlgs.h:649
const wxString & GetYUnitsCh2() const
Get the y units of the second channel.
Definition smalldlgs.h:679
const wxString & GetYUnits() const
Get the y units of the first channel.
Definition smalldlgs.h:674
bool PrintBaseSD() const
Indicates whether the standard deviation of the baseline should be printed in the batch analysis tabl...
Definition smalldlgs.h:380
std::vector< int > GetChannelOrder() const
Get the new channel order.
Definition smalldlgs.h:749
int GetDownSampling() const
Prints every n-th point.
Definition smalldlgs.h:521
BatchOption(const wxString &lab, bool sel, int id)
Definition smalldlgs.h:306
int GetFSelect() const
Get the selected transform function.
Definition smalldlgs.h:259
bool PrintSlopes() const
Indicates whether the maximal slopes should be printed in the batch analysis table.
Definition smalldlgs.h:440
virtual void EndModal(int retCode)
Called upon ending a modal dialog.
virtual void EndModal(int retCode)
Called upon ending a modal dialog.
int GetNColumns() const
Get the number of columns.
Definition smalldlgs.h:664
small struct representing a batch dialog option
Definition smalldlgs.h:298
Text file import filter settings.
Definition stfio.h:101