TBTK
Need a break? Support the development by playing Polarity Puzzles
HoppingAmplitudePanel.h
1 /* Copyright 2017 Kristofer Björnson
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
17 
24 #ifndef COM_DAFER45_TBTK_HOPPING_AMPLITUDE_PANEL
25 #define COM_DAFER45_TBTK_HOPPING_AMPLITUDE_PANEL
26 
27 #include "TBTK/HoppingAmplitude.h"
28 #include "TBTK/IndexPanel.h"
29 
30 #include <wx/wx.h>
31 #include <wx/sizer.h>
32 
33 namespace TBTK{
34 
35 class HoppingAmplitudePanel : public wxPanel{
36 public:
38  HoppingAmplitudePanel(wxWindow *parent);
39 
41  ~HoppingAmplitudePanel();
42 
44  void setHoppingAmplitude(const HoppingAmplitude &hoppingAmplitude);
45 
47  const HoppingAmplitude& getHoppingAmplitude() const;
48 
50  void onPaintEvent(wxPaintEvent &event);
51 
53  void onSizeEvent(wxSizeEvent &event);
54 
56  void onAmplitudeChanged(wxCommandEvent &event);
57 
59  void onIndexChanged(wxCommandEvent &event);
60 
62 // void redraw();
63 protected:
64  DECLARE_EVENT_TABLE();
65 private:
67  HoppingAmplitude hoppingAmplitude;
68 
70  wxStaticText hoppingAmplitudeLabel;
71 
73  wxTextCtrl amplitudeTextBox;
74 
76  IndexPanel toIndexPanel;
77 
79  IndexPanel fromIndexPanel;
80 
81  static const wxWindowID AMPLITUDE_ID;
82  static const wxWindowID TO_INDEX_ID;
83  static const wxWindowID FROM_INDEX_ID;
84 };
85 
86 inline const HoppingAmplitude& HoppingAmplitudePanel::getHoppingAmplitude() const{
87  return hoppingAmplitude;
88 }
89 
90 }; //End namespace TBTK
91 
92 #endif
93 
Hopping amplitude from state &#39;from&#39; to state &#39;to&#39;.
Definition: Boolean.h:32