TBTK
HoppingAmplitudePanel.h
Go to the documentation of this file.
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 
23 #ifndef COM_DAFER45_TBTK_HOPPING_AMPLITUDE_PANEL
24 #define COM_DAFER45_TBTK_HOPPING_AMPLITUDE_PANEL
25 
26 #include "TBTK/HoppingAmplitude.h"
27 #include "TBTK/IndexPanel.h"
28 
29 #include <wx/wx.h>
30 #include <wx/sizer.h>
31 
32 namespace TBTK{
33 
34 class HoppingAmplitudePanel : public wxPanel{
35 public:
37  HoppingAmplitudePanel(wxWindow *parent);
38 
41 
43  void setHoppingAmplitude(const HoppingAmplitude &hoppingAmplitude);
44 
47 
49  void onPaintEvent(wxPaintEvent &event);
50 
52  void onSizeEvent(wxSizeEvent &event);
53 
55  void onAmplitudeChanged(wxCommandEvent &event);
56 
58  void onIndexChanged(wxCommandEvent &event);
59 
61 // void redraw();
62 protected:
64 private:
66  HoppingAmplitude hoppingAmplitude;
67 
69  wxStaticText hoppingAmplitudeLabel;
70 
72  wxTextCtrl amplitudeTextBox;
73 
75  IndexPanel toIndexPanel;
76 
78  IndexPanel fromIndexPanel;
79 
80  static const wxWindowID AMPLITUDE_ID;
81  static const wxWindowID TO_INDEX_ID;
82  static const wxWindowID FROM_INDEX_ID;
83 };
84 
86  return hoppingAmplitude;
87 }
88 
89 }; //End namespace TBTK
90 
91 #endif
Panel for displaying an Index.
HoppingAmplitudePanel(wxWindow *parent)
void setHoppingAmplitude(const HoppingAmplitude &hoppingAmplitude)
Hopping amplitude from state &#39;from&#39; to state &#39;to&#39;.
void onPaintEvent(wxPaintEvent &event)
void onAmplitudeChanged(wxCommandEvent &event)
void onIndexChanged(wxCommandEvent &event)
Hopping amplitude from state &#39;from&#39; to state &#39;to&#39;.
Definition: HoppingAmplitude.h:49
Definition: ModelFactory.h:35
Definition: IndexPanel.h:33
const HoppingAmplitude & getHoppingAmplitude() const
Definition: HoppingAmplitudePanel.h:85
void onSizeEvent(wxSizeEvent &event)
Definition: HoppingAmplitudePanel.h:34