YATiSh
Yet Another TIme SHeet
yatishSettings.h
Go to the documentation of this file.
1 #ifndef YATISHSETTINGS_H
2 #define YATISHSETTINGS_H
3 
4 #ifndef WX_PRECOMP
5  //(*HeadersPCH(yatishSettings)
6  #include <wx/button.h>
7  #include <wx/checkbox.h>
8  #include <wx/choice.h>
9  #include <wx/dialog.h>
10  #include <wx/panel.h>
11  #include <wx/radiobut.h>
12  #include <wx/sizer.h>
13  #include <wx/stattext.h>
14  #include <wx/textctrl.h>
15  //*)
16 #endif
17 //(*Headers(yatishSettings)
18 #include <wx/notebook.h>
19 #include <wx/spinctrl.h>
20 //*)
21 
23 enum ChartLib {
26  wxCharts
27 };
28 
30 struct Settings {
31  bool log2text,
34  int rowLimit;
36  bool logo4pdf;
40  bool motto4pdf;
41  wxString companyMotto;
42  bool pdfCharts;
43  Settings ();
44  ~Settings ();
45 };
46 
48 class yatishSettings: public wxDialog {
49  public:
50  yatishSettings ();
51  ~yatishSettings ();
52  void Set (Settings&);
53  void Get (Settings&);
54  private:
55  //(*Identifiers(yatishSettings)
56  static const long ID_STATICTEXT1;
57  static const long idCheckBoxLog;
58  static const long ID_STATICTEXT2;
59  static const long idCheckBoxLimit;
60  static const long ID_STATICTEXT3;
61  static const long idSpinCtrlLimit;
62  static const long ID_STATICTEXT4;
63  static const long idChoiceLib;
64  static const long idPanelGUI;
65  static const long idRadioButtonName;
66  static const long idTextCtrlName;
67  static const long idRadioButtonLogo;
68  static const long idButtonLogo;
69  static const long idCheckBoxMotto;
70  static const long idTextCtrlMotto;
71  static const long idCheckBoxPDFcharts;
72  static const long idPanelPDF;
73  static const long idNotebook;
74  //*)
75  //(*Declarations(yatishSettings)
76  wxButton* buttonLogo;
77  wxCheckBox* checkBoxLimit;
78  wxCheckBox* checkBoxLog;
79  wxCheckBox* checkBoxMotto;
80  wxCheckBox* checkBoxPDFcharts;
81  wxChoice* choiceLib;
82  wxRadioButton* radioButtonLogo;
83  wxRadioButton* radioButtonName;
84  wxSpinCtrl* spinCtrlLimit;
85  wxStaticText* StaticText1;
86  wxStaticText* StaticText2;
87  wxStaticText* StaticText3;
88  wxStaticText* StaticText4;
89  wxTextCtrl* textCtrlMotto;
90  wxTextCtrl* textCtrlName;
91  //*)
93  int rowLimit, lib;
95  //(*Handlers(yatishSettings)
96  void OnCheckBoxLimitClick(wxCommandEvent& event);
97  void OnButtonLogoClick(wxCommandEvent& event);
98  //*)
99  void OnSpinCtrlLimitUpdate (wxUpdateUIEvent&);
100  void OnButtonLogoUpdate (wxUpdateUIEvent&);
101  void OnTextCtrlNameUpdate (wxUpdateUIEvent&);
102  void OnTextCtrlMottoUpdate (wxUpdateUIEvent&);
103  DECLARE_EVENT_TABLE()
104 };
105 
106 #endif
A dialog to modify YATiSh settings.
wxButton * buttonLogo
wxString companyMotto
wxCheckBox * checkBoxMotto
static const long idCheckBoxPDFcharts
wxRadioButton * radioButtonName
static const long ID_STATICTEXT2
static const long idButtonLogo
wxChoice * choiceLib
static const long idChoiceLib
void OnCheckBoxLimitClick(wxCommandEvent &event)
static const long idPanelGUI
static const long idCheckBoxMotto
wxString companyName_or_logoPath
static const long idRadioButtonName
static const long ID_STATICTEXT1
void OnSpinCtrlLimitUpdate(wxUpdateUIEvent &)
wxSpinCtrl * spinCtrlLimit
void Get(Settings &)
void OnButtonLogoUpdate(wxUpdateUIEvent &)
static const long idCheckBoxLimit
static const long idRadioButtonLogo
static const long idNotebook
static const long ID_STATICTEXT3
wxStaticText * StaticText2
wxStaticText * StaticText3
static const long idSpinCtrlLimit
wxStaticText * StaticText4
static const long idTextCtrlMotto
wxTextCtrl * textCtrlName
wxCheckBox * checkBoxLimit
static const long idPanelPDF
wxCheckBox * checkBoxLog
wxTextCtrl * textCtrlMotto
static const long idTextCtrlName
static const long ID_STATICTEXT4
wxCheckBox * checkBoxPDFcharts
void Set(Settings &)
void OnTextCtrlMottoUpdate(wxUpdateUIEvent &)
static const long idCheckBoxLog
void OnButtonLogoClick(wxCommandEvent &event)
wxRadioButton * radioButtonLogo
wxStaticText * StaticText1
void OnTextCtrlNameUpdate(wxUpdateUIEvent &)
As its names implies: the class holding YATiSh settings.
int rowLimit
...to rowLimit lines.
bool pdfCharts
PDF charts?
wxString companyName_or_logoPath
Either the company name or its logo.
bool motto4pdf
Print the company motto in the PDF header?
ChartLib lib
A ChartLib enumerates the graphic libraries available for panel #3.
bool log2text
If True, error/warning messages will be forwarded to the bottom of the main frame.
~Settings()
The Settings destructor saves itself to the configuration file.
bool limitRow
If True, the listing in panel #2 will be limited...
wxString companyMotto
Slogan or short description of the purpose.
bool logo4pdf
If True the company name is replaced by its logo in the PDF header.
Settings()
The Settings constructor retrieves itself from the configuration file.
ChartLib
Same order as yatishSettings::choiceLib.
@ wxCharts
@ wxFreeChart
@ wxMathPlot