TBTK
PropertyFrame.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_PROPERTY_FRAME
24 #define COM_DAFER45_TBTK_PROPERTY_FRAME
25 
26 #include "TBTK/ImagePanel.h"
27 #include "TBTK/Property/AbstractProperty.h"
28 #include "TBTK/Property/DOS.h"
29 #include "TBTK/Property/LDOS.h"
30 
31 #include <wx/wx.h>
32 #include <wx/sizer.h>
33 
34 namespace TBTK{
35 
36 class PropertyFrame : public wxFrame{
37 public:
39  PropertyFrame(wxWindow *parent);
40 
43 
45  void setProperty(const Property::DOS &dos);
46 
48  void setProperty(const Property::LDOS &ldos);
49 
51  void onPaintEvent(wxPaintEvent &event);
52 
54  void onSizeEvent(wxSizeEvent &event);
55 
57  void onMenuFileOpen(wxCommandEvent &event);
58 
60  void onMenuFileQuit(wxCommandEvent &event);
61 
63  void onMenuHelpAbout(wxCommandEvent &event);
64 protected:
65  DECLARE_EVENT_TABLE();
66 private:
68 // void *property;
69 
71  wxPanel *currentPanel;
72 
75  enum class PropertyType {
76  None,
77  DOS,
78  LDOS
79  };
80 
82  void setPropertyPanel(PropertyType propertyType);
83 
85  PropertyType currentPropertyType;
86 };
87 
88 }; //End namespace TBTK
89 
90 #endif
void onPaintEvent(wxPaintEvent &event)
Property container for local density of states (LDOS).
Definition: LDOS.h:33
void onMenuFileQuit(wxCommandEvent &event)
Property container for local density of states (LDOS).
Definition: PropertyFrame.h:36
void onMenuHelpAbout(wxCommandEvent &event)
void onMenuFileOpen(wxCommandEvent &event)
PropertyFrame(wxWindow *parent)
Definition: ModelFactory.h:35
Property container for density of states (DOS).
Property container for density of states (DOS).
Definition: DOS.h:32
void onSizeEvent(wxSizeEvent &event)
void setProperty(const Property::DOS &dos)
Panel for displaying images.