comparison include/rsearcher.h @ 5:e3b10fb860b3

release v1.0.
author pyon@macmini
date Mon, 22 Oct 2018 22:17:02 +0900
parents 06342fc544e4
children 9a8b581c1993
comparison
equal deleted inserted replaced
4:06342fc544e4 5:e3b10fb860b3
1 // Filename : rsearcher.h 1 // Filename : rsearcher.h
2 // Last Change: 2018-10-12 ‹à 16:16:26. 2 // Last Change: 2018-10-22 ŒŽ 13:08:14.
3 // 3 //
4 4
5 #ifndef __RSEARCH_H__ 5 #ifndef __RSEARCH_H__
6 #define __RSEARCH_H__ 6 #define __RSEARCH_H__
7 7
27 #include <wx/regex.h> 27 #include <wx/regex.h>
28 #include <wx/progdlg.h> 28 #include <wx/progdlg.h>
29 #include <wx/utils.h> 29 #include <wx/utils.h>
30 #include <wx/textfile.h> 30 #include <wx/textfile.h>
31 #include <wx/timer.h> 31 #include <wx/timer.h>
32 #include <wx/hashmap.h>
32 33
34 /* Data Class */
35 class HhsClass {
36 public:
37 wxString no;
38 wxString birth;
39 wxString name;
40 wxString kana;
41 wxString addr;
42 wxString sex;
43
44 HhsClass( wxArrayString& buf );
45 };
46
47 WX_DECLARE_HASH_MAP( wxString, HhsClass*, wxStringHash, wxStringEqual, HhsHash );
48
49 /* Control-Window Class */
33 class MySearchCtrl : public wxSearchCtrl 50 class MySearchCtrl : public wxSearchCtrl
34 { 51 {
35 DECLARE_EVENT_TABLE() 52 DECLARE_EVENT_TABLE()
36 public: 53 public:
37 MySearchCtrl( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ); 54 MySearchCtrl( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style );
73 wxString m_server; 90 wxString m_server;
74 wxString m_hhs; 91 wxString m_hhs;
75 wxString m_user; 92 wxString m_user;
76 wxArrayString m_index; 93 wxArrayString m_index;
77 wxTimer m_timer; 94 wxTimer m_timer;
95 HhsHash hhash;
78 96
79 protected: 97 protected:
80 MySearchCtrl* m_searchCtrl; 98 MySearchCtrl* m_searchCtrl;
81 MyStaticBitmap* m_staticBitmap1; 99 MyStaticBitmap* m_staticBitmap1;
82 MyStaticBitmap* m_staticBitmap2; 100 MyStaticBitmap* m_staticBitmap2;
98 wxDataViewListCtrl* m_dataViewListCtrl; 116 wxDataViewListCtrl* m_dataViewListCtrl;
99 wxDataViewColumn* m_dataViewListColumnNo; 117 wxDataViewColumn* m_dataViewListColumnNo;
100 wxDataViewColumn* m_dataViewListColumnDate; 118 wxDataViewColumn* m_dataViewListColumnDate;
101 wxTextCtrl* m_textCtrlLog; 119 wxTextCtrl* m_textCtrlLog;
102 wxSlider* m_slider; 120 wxSlider* m_slider;
121 wxButton* m_buttonPsearch;
103 wxButton* m_buttonPrint; 122 wxButton* m_buttonPrint;
123 wxButton* m_buttonHelp;
104 wxButton* m_buttonLogout; 124 wxButton* m_buttonLogout;
105 wxButton* m_buttonTest;
106 125
107 public: 126 public:
108 MainFrame( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT( "Searcher Remote" ), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); 127 MainFrame( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT( "Searcher Remote" ), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL );
109 ~MainFrame(); 128 ~MainFrame();
110 129
111 void SetServer( wxString server ) { m_server = server; }; 130 void SetServer( wxString server ) { m_server = server; };
112 void SetUser( wxString user ) { m_user = user; }; 131 void SetUser( wxString user ) { m_user = user; WriteLog( wxT( "[login] " ) + m_user ); };
113 void CreateControls( void ); 132 void CreateControls( void );
133 void SetAccelerator( void );
114 void Cmd( wxString cmd ); 134 void Cmd( wxString cmd );
115 void Search( void ); 135 void Search( void );
136 void PasteSeaarch( void );
116 void LoadDB( void ); 137 void LoadDB( void );
117 void LoadBitmap( wxScrolledWindow* sc, wxStaticBitmap* sb, wxString file ); 138 bool LoadBitmap( wxScrolledWindow* sc, wxStaticBitmap* sb, wxString file );
118 void LoadBitmaps( wxString date ); 139 bool LoadBitmaps( wxString date, bool reload );
119 void GetImages( wxString hhs, wxString date ); 140 void GetImages( wxString hhs, wxString date );
120 void PrintImages( void ); 141 void PrintImages( void );
142 void WriteLog( wxString msg );
121 void RemoveFile( wxString pattern ); 143 void RemoveFile( wxString pattern );
122 void InDevelop( bool ); 144 void InDevelop( bool );
123 145
124 void OnItemSelected( wxDataViewEvent& event ); 146 void OnItemSelected( wxDataViewEvent& event );
125 void OnItemDClicked( wxDataViewEvent& event ); 147 void OnItemDClicked( wxDataViewEvent& event );
126 void OnNBookChanged( wxBookCtrlEvent& event ); 148 void OnNBookChanged( wxBookCtrlEvent& event );
149 void OnPasteSearch( wxCommandEvent& event );
127 void OnPrint( wxCommandEvent& event ); 150 void OnPrint( wxCommandEvent& event );
128 void OnClose( wxCloseEvent& event ); // save config 151 void OnClose( wxCloseEvent& event ); // save config
129 void OnIdle( wxIdleEvent& event ); 152 void OnIdle( wxIdleEvent& event );
130 void OnTimer( wxTimerEvent& event ); 153 void OnTimer( wxTimerEvent& event );
154 void OnHelp( wxCommandEvent& event );
131 void OnLogout( wxCommandEvent& event ); 155 void OnLogout( wxCommandEvent& event );
132 void OnTestButton( wxCommandEvent& event );
133 }; 156 };
134 157
135 #endif // __RSEARCH_H__ 158 #endif // __RSEARCH_H__
136 159