Mercurial > mercurial > hgweb_searcher2.cgi
changeset 10:24e0775af32e
Add Name-View.
author | pyon@macmini |
---|---|
date | Wed, 22 Jun 2011 20:43:50 +0900 |
parents | 6f59ca2622af |
children | 07adad93df84 |
files | include/symbol.h man/index.html src/main.cpp src/myframe.cpp src/preview.cpp |
diffstat | 5 files changed, 40 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/include/symbol.h Wed Jun 22 18:18:51 2011 +0900 +++ b/include/symbol.h Wed Jun 22 20:43:50 2011 +0900 @@ -1,10 +1,10 @@ // Filename : symbol.h -// Last Change: 06-Apr-2011. +// Last Change: 22-Jun-2011. // #define MYAPPNAME wxT("Searcher2") #define VER 2 -#define REV 10 -#define BLD 20110411 +#define REV 9 +#define BLD 20110630
--- a/man/index.html Wed Jun 22 18:18:51 2011 +0900 +++ b/man/index.html Wed Jun 22 20:43:50 2011 +0900 @@ -11,6 +11,7 @@ <ul> <li> 5文字くらい入力したとき検索候補が表示されるようにした. <li> 被保険者情報が登録されていなくても検索できるようにした. + <li> 最新画像の被保険者氏名部分を表示するようにした. </ul> <h2><font size="+1" color="green">機能変更</font></h2> <ul> @@ -21,6 +22,7 @@ <h2><font color="green">未実装の機能</font></h2> <ul> <li> 被保険者情報をCSVファイルで取り込めるようにする予定.(200人まで) + <li> ボタンひとつでターゲットフォルダの画像を印刷する. </ul> </body> </html>
--- a/src/main.cpp Wed Jun 22 18:18:51 2011 +0900 +++ b/src/main.cpp Wed Jun 22 20:43:50 2011 +0900 @@ -1,5 +1,5 @@ // Filename : main.cpp -// Last Change: 21-Jun-2011. +// Last Change: 22-Jun-2011. // #include "common.h" @@ -26,14 +26,14 @@ ConfInit(); - /* MyFrame *mainframe = new MyFrame( NULL, ID_MAIN, wxT("Searcher v2") ); mainframe->SetSize( rect ); mainframe->Show(true); - */ + /* FramePreview *a = new FramePreview( NULL, ID_IMGFRM, wxEmptyString, wxDefaultPosition, wxSize( 512,394 ), wxCAPTION|wxFRAME_NO_TASKBAR|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxTAB_TRAVERSAL ); a->Show(true); + */ return true; }
--- a/src/myframe.cpp Wed Jun 22 18:18:51 2011 +0900 +++ b/src/myframe.cpp Wed Jun 22 20:43:50 2011 +0900 @@ -1,5 +1,5 @@ // Filename : mainframe.cpp -// Last Change: 21-Jun-2011. +// Last Change: 22-Jun-2011. // #include "symbol.h" @@ -222,6 +222,7 @@ return; } + // HTML 生成 path.Clear(); htmlbody = wxT("<html><body>"); htmlbody += wxT("該当者: "); @@ -236,8 +237,27 @@ int i=1; int clrflg = 1; while ( q.NextRow() ) { - path.Add(q.GetString(0)); - wxString date = q.GetString(0); + wxString filepath; + filepath = q.GetString(0); + // 氏名画像生成 + if ( 0 ) { + wxDir dir(filepath); + wxString file; + if ( !dir.IsOpened() ) return; + + bool cout = dir.GetFirst( &file, wxT("*.jpg"), wxDIR_FILES ); + if ( cout ) { + wxString s = filepath + wxFILE_SEP_PATH + file; + wxImage img_org( s, wxBITMAP_TYPE_JPEG ); + wxImage img_name; + img_name = img_org.GetSubImage( wxRect( wxPoint(328,556), wxSize(626,288) ) ); + img_name.Scale( 92, 200 ); + img_name.SaveFile( wxT("tmp/tmp.jpg") ); + } + } + + path.Add(filepath); + wxString date = filepath; reDate.ReplaceAll( &date, wxT("\\2-\\3-\\4") ); if ( clrflg ) { @@ -259,6 +279,10 @@ htmlbody += wxT("</table>"); htmlbody += wxT("<br />"); htmlbody += wxT("<div>"); + htmlbody += wxT("番号1の画像情報"); + htmlbody += wxT("<img src=\"tmp/name.jpg\" />"); + htmlbody += wxT("</div>"); + htmlbody += wxT("<div>"); htmlbody += wxT("フォルダを開くには,番号を入力してください.<br />"); htmlbody += wxT("他の被保険者を検索するには,被保番を入力してください."); htmlbody += wxT("</div>"); @@ -285,7 +309,7 @@ mf->m_statusBar->SetStatusText( wxEmptyString, 0 ); // 検索履歴をログに保存 - wxString logfn = wxGetCwd() + wxT("/db/log.txt"); + wxString logfn = wxGetCwd() + wxT("/tmp/log.txt"); wxTextFile logFile; logFile.Open( logfn ); wxDateTime now = wxDateTime::Now(); @@ -323,7 +347,7 @@ return; } if ( cmd.Cmp(wxT("l")) == 0 ) { - hr->LoadPage( wxT("db/log.txt") ); + hr->LoadPage( wxT("tmp/log.txt") ); this->ChangeValue( wxEmptyString ); mf->m_statusBar->SetStatusText( wxEmptyString, 0 ); return; @@ -731,7 +755,7 @@ /* 被保険者整合性チェック */ void MyFrame::OnCheckHhs(wxCommandEvent& WXUNUSED(event)) { - wxString logfn = wxGetCwd() + wxT("/db/checkhhs.log"); + wxString logfn = wxGetCwd() + wxT("/tmp/checkhhs.log"); wxTextFile logFile; logFile.Open( logfn ); logFile.Clear();
--- a/src/preview.cpp Wed Jun 22 18:18:51 2011 +0900 +++ b/src/preview.cpp Wed Jun 22 20:43:50 2011 +0900 @@ -1,5 +1,5 @@ // Filename : preview.cpp -// Last Change: 21-Jun-2011. +// Last Change: 22-Jun-2011. // #include "preview.h" @@ -118,12 +118,7 @@ wxImage img( mfile, wxBITMAP_TYPE_JPEG ); wxBitmap bmp( img.Scale( 640, 877, wxIMAGE_QUALITY_HIGH ) ); - wxImage img2; - //img2 = img.Size( wxSize(626,288), wxPoint(328,556), -1, -1, -1 ); - img2 = img.Size( wxSize(954,844), wxPoint(328,556), -1, -1, -1 ); - - wxBitmap bmp2( img2.Scale( 626, 288, wxIMAGE_QUALITY_HIGH ) ); - m_bitmap->SetBitmap( bmp2 ); + m_bitmap->SetBitmap( bmp ); } // thumbnail int i=0;