# HG changeset patch # User pyon@macmini # Date 1302173620 -32400 # Node ID e0cf499060390fc8a02ced0ba3a147b65fdf20b1 # Parent c174ac668e9f42af08e840265729de42a40c439c start editing preview.cpp / preview.h diff -r c174ac668e9f -r e0cf49906039 html/notfound.html --- a/html/notfound.html Tue Apr 05 18:44:57 2011 +0900 +++ b/html/notfound.html Thu Apr 07 19:53:40 2011 +0900 @@ -5,6 +5,6 @@ - Not found ! +

Not found !

diff -r c174ac668e9f -r e0cf49906039 html/start.html --- a/html/start.html Tue Apr 05 18:44:57 2011 +0900 +++ b/html/start.html Thu Apr 07 19:53:40 2011 +0900 @@ -16,6 +16,8 @@

改訂履歴

+ + diff -r c174ac668e9f -r e0cf49906039 html/todo.html --- a/html/todo.html Tue Apr 05 18:44:57 2011 +0900 +++ b/html/todo.html Thu Apr 07 19:53:40 2011 +0900 @@ -5,13 +5,13 @@ -

version 2.9まで

+

version 2.11まで

+ * CSVファイルから被保険者情報を取込む
* 最後にインデックスを更新した日をdbから読む
* 最後の被保番をdbから読む
* 履歴検索時に被保険者氏名をステータスバーに表示
-

version 2.10まで

+

version 2.12まで

* CSVファイルの場所をconfに記憶
- * プレビューモード搭載
* 被保険者検索
* grid をクリックしたら,検索ボックスに被保険者番号をセット
diff -r c174ac668e9f -r e0cf49906039 include/common.h --- a/include/common.h Tue Apr 05 18:44:57 2011 +0900 +++ b/include/common.h Thu Apr 07 19:53:40 2011 +0900 @@ -1,8 +1,8 @@ // Filename : common.h -// Last Change: 31-Mar-2011. +// Last Change: 07-Apr-2011. // -#ifndef COMMON -#define COMMON +#ifndef __COMMON__ +#define __COMMON__ #include "wx/wxprec.h" @@ -12,37 +12,51 @@ enum { // mainframe - ID_MAIN = 0, - ID_PRINT = 1, + ID_MAIN = wxID_HIGHEST + 1, + + ID_MUPHHS = wxID_HIGHEST + 2, + ID_MLSCCN = wxID_HIGHEST + 3, + ID_MCHKHHS = wxID_HIGHEST + 4, + ID_MDBBKUP = wxID_HIGHEST + 5, + ID_MDBOPT = wxID_HIGHEST + 6, + ID_MOAD = wxID_HIGHEST + 7, + ID_MODD = wxID_HIGHEST + 8, + ID_MHELP = wxID_HIGHEST + 9, + + ID_SRCHHHS = wxID_HIGHEST + 20, + ID_DTIDX = wxID_HIGHEST + 21, + ID_MKIDX = wxID_HIGHEST + 22, - ID_MUPHHS = 2, - ID_MLSCCN = 3, - ID_MCHKHHS = 4, - ID_MDBBKUP = 5, - ID_MDBOPT = 6, - ID_MOAD = 7, - ID_MODD = 8, - ID_MHELP = 9, + ID_SPLT = wxID_HIGHEST + 23, + ID_HTML = wxID_HIGHEST + 24, + ID_HLST = wxID_HIGHEST + 25, + ID_CCN = wxID_HIGHEST + 26, + + ID_CMD = wxID_HIGHEST + 27, - ID_SRCHHHS = 10, - ID_DTIDX = 11, - ID_MKIDX = 12, + // preview + ID_IMGFRM = wxID_HIGHEST + 30, + ID_IMG1 = wxID_HIGHEST + 31, + ID_IMG2 = wxID_HIGHEST + 32, + ID_IMG3 = wxID_HIGHEST + 33, + ID_IMG4 = wxID_HIGHEST + 34, + ID_IMG5 = wxID_HIGHEST + 35, + ID_IMG = wxID_HIGHEST + 36, + ID_MGNFY = wxID_HIGHEST + 37, + ID_SLDR = wxID_HIGHEST + 38, + ID_PRINT = wxID_HIGHEST + 39, + ID_PRTALL = wxID_HIGHEST + 30, + ID_CLSFRM = wxID_HIGHEST + 41, - ID_SPLT = 20, - ID_HTML = 21, - ID_HLST = 22, - ID_CCN = 23, - - ID_CMD = 30, // hhs-db - ID_HHSDB = 80, - ID_CSVPK = 81, - ID_HHSUP = 82, - ID_PSWD = 83, + ID_HHSDB = wxID_HIGHEST + 50, + ID_CSVPK = wxID_HIGHEST + 51, + ID_HHSUP = wxID_HIGHEST + 52, + ID_PSWD = wxID_HIGHEST + 53, // html-help - ID_HELP = 90, + ID_HELP = wxID_HIGHEST + 60, }; #endif diff -r c174ac668e9f -r e0cf49906039 include/hhsdb.h --- a/include/hhsdb.h Tue Apr 05 18:44:57 2011 +0900 +++ b/include/hhsdb.h Thu Apr 07 19:53:40 2011 +0900 @@ -1,8 +1,8 @@ // Filename : hhsdb.h -// Last Change: 04-Mar-2011. +// Last Change: 07-Apr-2011. // -#ifndef HHSDB -#define HHSDB +#ifndef __HHSDB__ +#define __HHSDB__ #include "common.h" #include "wx/wxprec.h" diff -r c174ac668e9f -r e0cf49906039 include/preview.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/preview.h Thu Apr 07 19:53:40 2011 +0900 @@ -0,0 +1,64 @@ +// Filename : hhsdb.h +// Last Change: 07-Apr-2011. +// +#ifndef __PREVIEW__ +#define __PREVIEW__ + +#include "common.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////////// +/// Class MyFramePreview +/////////////////////////////////////////////////////////////////////////////// +class MyFramePreview : public wxFrame +{ + private: + + protected: + wxStaticText* m_staticText1; + wxStaticBitmap* m_bitmap1; + wxStaticText* m_staticText2; + wxStaticBitmap* m_bitmap2; + wxStaticText* m_staticText3; + wxStaticBitmap* m_bitmap3; + wxStaticText* m_staticText4; + wxStaticBitmap* m_bitmap4; + wxStaticText* m_staticText5; + wxStaticBitmap* m_bitmap5; + wxScrolledWindow* m_scrolledWindow; + wxStaticBitmap* m_bitmap; + wxStaticText* m_staticText; + wxTextCtrl* m_textCtrl; + wxStaticText* m_staticTextLarge; + wxSlider* m_slider; + wxStaticText* m_staticTextSmall; + + wxButton* m_buttonPrint; + wxButton* m_buttonPrintAll; + wxButton* m_buttonClose; + + public: + + MyFramePreview( wxWindow* parent, wxWindowID id = ID_IMGFRM, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 512,394 ), long style = wxCAPTION|wxFRAME_NO_TASKBAR|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxTAB_TRAVERSAL ); + ~MyFramePreview(); + +}; + +#endif //__PREVIEW__ + diff -r c174ac668e9f -r e0cf49906039 include/symbol.h --- a/include/symbol.h Tue Apr 05 18:44:57 2011 +0900 +++ b/include/symbol.h Thu Apr 07 19:53:40 2011 +0900 @@ -1,10 +1,10 @@ // Filename : symbol.h -// Last Change: 30-Mar-2011. +// Last Change: 06-Apr-2011. // #define MYAPPNAME wxT("Searcher2") #define VER 2 -#define REV 8 -#define BLD 20110404 +#define REV 10 +#define BLD 20110411 diff -r c174ac668e9f -r e0cf49906039 makefile --- a/makefile Tue Apr 05 18:44:57 2011 +0900 +++ b/makefile Thu Apr 07 19:53:40 2011 +0900 @@ -1,6 +1,6 @@ # # Makefile for wxWidgets Application -# Last Change: 14-Feb-2011. +# Last Change: 07-Apr-2011. # by Takayuki Mutoh # @@ -91,6 +91,7 @@ OBJ = $(OBJDIR)/main.o \ $(OBJDIR)/myframe.o \ + $(OBJDIR)/preview.o \ $(OBJDIR)/hhsdb.o \ $(OBJDIR)/htmlhelp.o \ $(OBJDIR)/wxsqlite3.o @@ -122,6 +123,9 @@ $(OBJDIR)/myframe.o: myframe.cpp myframe.h symbol.h common.h $(CXX) -c $< -o $@ $(CPPFLAGS) +$(OBJDIR)/preview.o: preview.cpp preview.h common.h + $(CXX) -c $< -o $@ $(CPPFLAGS) + $(OBJDIR)/hhsdb.o: hhsdb.cpp hhsdb.h common.h $(CXX) -c $< -o $@ $(CPPFLAGS) diff -r c174ac668e9f -r e0cf49906039 src/myframe.cpp --- a/src/myframe.cpp Tue Apr 05 18:44:57 2011 +0900 +++ b/src/myframe.cpp Thu Apr 07 19:53:40 2011 +0900 @@ -1,5 +1,5 @@ // Filename : mainframe.cpp -// Last Change: 31-Mar-2011. +// Last Change: 07-Apr-2011. // #include "symbol.h" @@ -226,7 +226,7 @@ htmlbody += wxT(" ( ") + hhs + wxT(" )"); htmlbody += wxT("

検索結果"); htmlbody += wxT("
年月日 バージョン 内容
2011.04.11 2.10 イージープリント機能搭載
2011.04.11 2.9 プレビューモード搭載
2011.04.01 2.8 細かい機能追加
2011.03.31 2.7 細かい機能追加
2011.03.28 2.6 細かい修正
"); - htmlbody += wxT(""); + htmlbody += wxT(""); wxRegEx reDate(wxT("(^.*20[0-9]{2}.)(20[0-9]{2})([0-2][0-9])([0-9]{2})(.*$)")); @@ -245,9 +245,12 @@ htmlbody += wxT(""); clrflg = 1; } - htmlbody += wxT(""); - htmlbody += wxT(""); - htmlbody += wxT(""); + htmlbody += wxT(""); // 番号 + htmlbody += wxT(""); // 日付 + htmlbody += wxT(""); // フォルダパス + //htmlbody += wxT(""); + //htmlbody += wxT(""); + //htmlbody += wxT(""); } stmt.Finalize(); ccndb.Close(); diff -r c174ac668e9f -r e0cf49906039 src/preview.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/preview.cpp Thu Apr 07 19:53:40 2011 +0900 @@ -0,0 +1,114 @@ +// Filename : preview.cpp +// Last Change: 07-Apr-2011. +// + +#include "preview.h" + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/utils.h" +#endif + + + +MyFramePreview::MyFramePreview( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer; + bSizer = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizerL; + bSizerL = new wxBoxSizer( wxVERTICAL ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + bSizerL->Add( m_staticText1, 0, wxALL, 5 ); + + m_bitmap1 = new wxStaticBitmap( this, ID_IMG1, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerL->Add( m_bitmap1, 0, wxALL, 5 ); + + m_staticText2 = new wxStaticText( this, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText2->Wrap( -1 ); + bSizerL->Add( m_staticText2, 0, wxALL, 5 ); + + m_bitmap2 = new wxStaticBitmap( this, ID_IMG2, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerL->Add( m_bitmap2, 0, wxALL, 5 ); + + m_staticText3 = new wxStaticText( this, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3->Wrap( -1 ); + bSizerL->Add( m_staticText3, 0, wxALL, 5 ); + + m_bitmap3 = new wxStaticBitmap( this, ID_IMG3, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerL->Add( m_bitmap3, 0, wxALL, 5 ); + + m_staticText4 = new wxStaticText( this, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText4->Wrap( -1 ); + bSizerL->Add( m_staticText4, 0, wxALL, 5 ); + + m_bitmap4 = new wxStaticBitmap( this, ID_IMG4, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerL->Add( m_bitmap4, 0, wxALL, 5 ); + + m_staticText5 = new wxStaticText( this, wxID_ANY, wxT("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText5->Wrap( -1 ); + bSizerL->Add( m_staticText5, 0, wxALL, 5 ); + + m_bitmap5 = new wxStaticBitmap( this, ID_IMG5, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerL->Add( m_bitmap5, 0, wxALL, 5 ); + + bSizer->Add( bSizerL, 0, wxEXPAND, 5 ); + + m_scrolledWindow = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); + m_scrolledWindow->SetScrollRate( 5, 5 ); + bSizer->Add( m_scrolledWindow, 1, wxEXPAND | wxALL, 5 ); + + m_bitmap = new wxStaticBitmap( this, ID_IMG, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer->Add( m_bitmap, 0, wxALL, 5 ); + + wxBoxSizer* bSizerR; + bSizerR = new wxBoxSizer( wxVERTICAL ); + + m_staticText = new wxStaticText( this, wxID_ANY, wxT("倍率"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText->Wrap( -1 ); + bSizerR->Add( m_staticText, 0, wxALL, 5 ); + + m_textCtrl = new wxTextCtrl( this, ID_MGNFY, wxT("100%"), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); + m_textCtrl->SetMaxLength( 4 ); + bSizerR->Add( m_textCtrl, 0, wxALL, 5 ); + + m_staticTextLarge = new wxStaticText( this, wxID_ANY, wxT("[+]"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextLarge->Wrap( -1 ); + bSizerR->Add( m_staticTextLarge, 0, wxALL, 5 ); + + m_slider = new wxSlider( this, ID_SLDR, 0, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_LEFT|wxSL_VERTICAL ); + bSizerR->Add( m_slider, 0, wxALL, 5 ); + + m_staticTextSmall = new wxStaticText( this, wxID_ANY, wxT("[-]"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextSmall->Wrap( -1 ); + bSizerR->Add( m_staticTextSmall, 0, wxALL, 5 ); + + + bSizerR->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_buttonPrint = new wxButton( this, ID_PRINT, wxT("印刷"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerR->Add( m_buttonPrint, 0, wxALL, 5 ); + + m_buttonPrintAll = new wxButton( this, ID_PRTALL, wxT("一括印刷"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerR->Add( m_buttonPrintAll, 0, wxALL, 5 ); + + m_buttonClose = new wxButton( this, ID_CLSFRM, wxT("閉じる"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerR->Add( m_buttonClose, 0, wxALL, 5 ); + + bSizer->Add( bSizerR, 0, wxEXPAND, 5 ); + + this->SetSizer( bSizer ); + this->Layout(); + + this->Centre( wxBOTH ); +} + +MyFramePreview::~MyFramePreview() +{ +} +
番号日付フォルダ
番号日付フォルダ操作
") + wxString::Format(wxT("%d"),i++) + wxT("") + date + wxT("") + q.GetString(0) + wxT("
") + wxString::Format(wxT("%d"),i++) + wxT("") + date + wxT("") + q.GetString(0) + wxT("
") + wxT("プレビュー") + wxT("
") + wxT("印刷") + wxT("
") + wxT("フォルダを開く") + wxT("