Mercurial > mercurial > hgweb_searcher2.cgi
changeset 1:e0cf49906039
start editing preview.cpp / preview.h
author | pyon@macmini |
---|---|
date | Thu, 07 Apr 2011 19:53:40 +0900 |
parents | c174ac668e9f |
children | 0830b0d7c550 |
files | html/notfound.html html/start.html html/todo.html include/common.h include/hhsdb.h include/preview.h include/symbol.h makefile src/myframe.cpp src/preview.cpp |
diffstat | 10 files changed, 244 insertions(+), 43 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> - Not found ! + <h1>Not found !</h1> </body> </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 @@ <h2><font color="green">改訂履歴</font></h2> <table border="1"> <tr bgcolor="#ffcc33"> <th>年月日</th> <th>バージョン</th> <th>内容</th> </tr> + <tr> <td>2011.04.11</td> <td align="center">2.10</td> <td>イージープリント機能搭載</td> </tr> + <tr> <td>2011.04.11</td> <td align="center">2.9</td> <td>プレビューモード搭載</td> </tr> <tr> <td>2011.04.01</td> <td align="center">2.8</td> <td>細かい機能追加</td> </tr> <tr> <td>2011.03.31</td> <td align="center">2.7</td> <td>細かい機能追加</td> </tr> <tr> <td>2011.03.28</td> <td align="center">2.6</td> <td>細かい修正</td> </tr>
--- 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 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> - <h3>version 2.9まで</h3> + <h3>version 2.11まで</h3> + * CSVファイルから被保険者情報を取込む<br /> * 最後にインデックスを更新した日をdbから読む<br /> * 最後の被保番をdbから読む<br /> * 履歴検索時に被保険者氏名をステータスバーに表示<br /> - <h3>version 2.10まで</h3> + <h3>version 2.12まで</h3> * CSVファイルの場所をconfに記憶<br /> - * プレビューモード搭載<br /> * 被保険者検索<br /> * grid をクリックしたら,検索ボックスに被保険者番号をセット<br /> </body>
--- 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
--- 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"
--- /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 <wx/string.h> +#include <wx/stattext.h> +#include <wx/gdicmn.h> +#include <wx/font.h> +#include <wx/colour.h> +#include <wx/settings.h> +#include <wx/bitmap.h> +#include <wx/image.h> +#include <wx/icon.h> +#include <wx/statbmp.h> +#include <wx/sizer.h> +#include <wx/scrolwin.h> +#include <wx/textctrl.h> +#include <wx/slider.h> +#include <wx/button.h> +#include <wx/frame.h> + +/////////////////////////////////////////////////////////////////////////////// +/// 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__ +
--- 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
--- 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)
--- 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("<br /><br />検索結果"); htmlbody += wxT("<table border=1>"); - htmlbody += wxT("<tr bgcolor=\"#ffcc33\"><th>番号</th><th>日付</th><th>フォルダ</th></tr>"); + htmlbody += wxT("<tr bgcolor=\"#ffcc33\"><th>番号</th><th>日付</th><th>フォルダ</th><th>操作</th></tr>"); wxRegEx reDate(wxT("(^.*20[0-9]{2}.)(20[0-9]{2})([0-2][0-9])([0-9]{2})(.*$)")); @@ -245,9 +245,12 @@ htmlbody += wxT("<tr bgcolor=\"#ffff99\">"); clrflg = 1; } - htmlbody += wxT("<td align=\"center\">") + wxString::Format(wxT("%d"),i++) + wxT("</td>"); - htmlbody += wxT("<td>") + date + wxT("</td>"); - htmlbody += wxT("<td>") + q.GetString(0) + wxT("</td></tr>"); + htmlbody += wxT("<td align=\"center\">") + wxString::Format(wxT("%d"),i++) + wxT("</td>"); // 番号 + htmlbody += wxT("<td>") + date + wxT("</td>"); // 日付 + htmlbody += wxT("<td>") + q.GetString(0) + wxT("</td></tr>"); // フォルダパス + //htmlbody += wxT("<td>") + wxT("プレビュー") + wxT("</td></tr>"); + //htmlbody += wxT("<td>") + wxT("印刷") + wxT("</td></tr>"); + //htmlbody += wxT("<td>") + wxT("フォルダを開く") + wxT("</td></tr>"); } stmt.Finalize(); ccndb.Close();
--- /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() +{ +} +