browsedb.h dbbrowse.cpp dbbrowse.h dbgrid.h dbtree.h

dlguser.cpp dlguser.h doc.cpp doc.h pgmctrl.h de/dbbrowse.mo
 	de/dbbrowse.po


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mark Johnson
2000-02-21 08:05:13 +00:00
parent a885d89ae9
commit 3fa0976a57
12 changed files with 47 additions and 42 deletions

View File

@@ -15,7 +15,7 @@
// Global structure for holding ODBC connection information // Global structure for holding ODBC connection information
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
extern struct DbStuff DbConnectInf; extern struct DbStuff DbConnectInf;
class mjDoc; class MainDoc;
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
class BrowserDB class BrowserDB
{ {
@@ -45,7 +45,7 @@ class BrowserDB
wxDbInf* ct_BrowserDB; wxDbInf* ct_BrowserDB;
wxColInf* cl_BrowserDB; wxColInf* cl_BrowserDB;
wxString ODBCSource, UserName, Password; wxString ODBCSource, UserName, Password;
mjDoc *pDoc; MainDoc *pDoc;
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
wxString Temp0, Temp1, Temp2, Temp3, Temp4, Temp5; wxString Temp0, Temp1, Temp2, Temp3, Temp4, Temp5;
wxString ODBCText; wxString ODBCText;

View File

@@ -222,7 +222,7 @@ bool MainApp::OnInit(void) // Does everything needed for a program start
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
frame->p_Splitter = new DocSplitterWindow(frame,-1); frame->p_Splitter = new DocSplitterWindow(frame,-1);
// p_Splitter->SetCursor(wxCursor(wxCURSOR_PENCIL)); // p_Splitter->SetCursor(wxCursor(wxCURSOR_PENCIL));
frame->pDoc = new mjDoc(); frame->pDoc = new MainDoc();
frame->pDoc->p_MainFrame = frame; frame->pDoc->p_MainFrame = frame;
frame->pDoc->p_Splitter = frame->p_Splitter; frame->pDoc->p_Splitter = frame->p_Splitter;
frame->pDoc->p_Splitter->pDoc = frame->pDoc; // ControlBase: saving the Sash frame->pDoc->p_Splitter->pDoc = frame->pDoc; // ControlBase: saving the Sash
@@ -285,7 +285,7 @@ MainFrame::~MainFrame(void)
// delete wxConfigBase::Set((wxConfigBase *) NULL); // delete wxConfigBase::Set((wxConfigBase *) NULL);
p_ProgramCfg->Flush(TRUE); // saves Objekt p_ProgramCfg->Flush(TRUE); // saves Objekt
if (!frame->pDoc) // If we have a Valid Document if (!frame->pDoc) // If we have a Valid Document
delete frame->pDoc; // Cleanup (mjDoc::~mjDoc) delete frame->pDoc; // Cleanup (MainDoc::~MainDoc)
} // MainFrame::~MainFrame(void) } // MainFrame::~MainFrame(void)
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
void MainFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) void MainFrame::OnQuit(wxCommandEvent& WXUNUSED(event))

View File

@@ -34,7 +34,7 @@ class MainFrame: public wxFrame
wxHtmlHelpController *p_Help; wxHtmlHelpController *p_Help;
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
int DiffW, DiffH; int DiffW, DiffH;
mjDoc *pDoc; MainDoc *pDoc;
DocSplitterWindow *p_Splitter; DocSplitterWindow *p_Splitter;
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()

View File

@@ -12,7 +12,7 @@
#error "DBGrid requires the new wxGrid class" #error "DBGrid requires the new wxGrid class"
#endif #endif
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
class mjDoc; class MainDoc;
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
class DBGrid: public wxGrid class DBGrid: public wxGrid
{ {
@@ -24,7 +24,7 @@ class DBGrid: public wxGrid
int i_ViewNr; // View Nummer in Tab / Page int i_ViewNr; // View Nummer in Tab / Page
int i_Which; // Which View, Database is this/using int i_Which; // Which View, Database is this/using
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
mjDoc* pDoc; MainDoc* pDoc;
wxDbInf* ct_BrowserDB; wxDbInf* ct_BrowserDB;
BrowserDB* db_Br; BrowserDB* db_Br;
wxMenu *popupMenu1; // OnDBClass wxMenu *popupMenu1; // OnDBClass

View File

@@ -8,7 +8,7 @@
// Licence: wxWindows license // Licence: wxWindows license
// RCS-ID: $Id$ // RCS-ID: $Id$
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
class mjDoc; // Declared in Doc.h file class MainDoc; // Declared in Doc.h file
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
class DBTreeData : public wxTreeItemData class DBTreeData : public wxTreeItemData
{ {
@@ -42,7 +42,7 @@ class DBTree : public wxTreeCtrl
DBTree(wxWindow *parent); DBTree(wxWindow *parent);
DBTree(wxWindow *parent, const wxWindowID id,const wxPoint& pos, const wxSize& size,long style); DBTree(wxWindow *parent, const wxWindowID id,const wxPoint& pos, const wxSize& size,long style);
virtual ~DBTree(); virtual ~DBTree();
mjDoc *pDoc; MainDoc *pDoc;
wxDbInf *ct_BrowserDB; wxDbInf *ct_BrowserDB;
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
int i_TabArt; // Tab = 0 ; Page = 1; int i_TabArt; // Tab = 0 ; Page = 1;

Binary file not shown.

View File

@@ -130,10 +130,11 @@ msgid "\n"
"-I-> BrowserDB::OnCloseDB() : Begin " "-I-> BrowserDB::OnCloseDB() : Begin "
msgstr "" msgstr ""
#: ../BrowserDB.cpp:161 #: ../BrowserDB.cpp:148
msgid "\n" msgid "\n"
"-I-> BrowserDB::OnCloseDB() : Ende " "-I-> BrowserDB::OnCloseDB() : End"
msgstr "" msgstr "\n"
"-I-> BrowserDB::OnCloseDB() : Ende"
#: ../BrowserDB.cpp:139 #: ../BrowserDB.cpp:139
#, c-format #, c-format
@@ -178,9 +179,9 @@ msgstr "\n"
#: ../Doc.cpp:268 ../Doc.cpp:281 #: ../Doc.cpp:268 ../Doc.cpp:281
#, c-format #, c-format
msgid "\n" msgid "\n"
"mjDoc::OnLeer(%s) : even this function will one day be available !" "MainDoc::OnLeer(%s) : even this function will one day be available !"
msgstr "\n" msgstr "\n"
"mjDoc::OnLeer(%s) : eines Tages steht auch diese Funktion zur Verf<72>gung !" "MainDoc::OnLeer(%s) : eines Tages steht auch diese Funktion zur Verf<72>gung !"
#: ../BrowserDB.cpp:47 #: ../BrowserDB.cpp:47
msgid " Line: " msgid " Line: "
@@ -191,8 +192,8 @@ msgid "Time"
msgstr "Zeit" msgstr "Zeit"
#: ../BrowserDB.cpp:47 #: ../BrowserDB.cpp:47
msgid "-I-> mjDoc::OnNewDocument() - End - Time needed : %ld ms" msgid "-I-> MainDoc::OnNewDocument() - End - Time needed : %ld ms"
msgstr "-I-> mjDoc::OnNewDocument() - Ende - Dauer : %ld ms" msgstr "-I-> MainDoc::OnNewDocument() - Ende - Dauer : %ld ms"
#: ../BrowserDB.cpp:47 #: ../BrowserDB.cpp:47
msgid "OK" msgid "OK"
@@ -361,6 +362,10 @@ msgstr "-I-> DBGrid::OnTableView(%s) - Satz %6d wurde gelesen."
msgid "-I-> DBTree::OnPopulate(%s) - %6d Tables have been read. - Time needed : %ld ms" msgid "-I-> DBTree::OnPopulate(%s) - %6d Tables have been read. - Time needed : %ld ms"
msgstr "-I-> DBTree::OnPopulate(%s) - %6d Tabellen wurde gelesen. - Dauer : %ld ms" msgstr "-I-> DBTree::OnPopulate(%s) - %6d Tabellen wurde gelesen. - Dauer : %ld ms"
#, c-format
msgid "-I-> DBTree::OnPopulate() - %6d Tables have been read. - Time needed : %ld ms"
msgstr "-I-> DBTree::OnPopulate() - %6d Tabellen wurde gelesen. - Dauer : %ld ms"
#: ../DBTree.cpp:110 #: ../DBTree.cpp:110
#, c-format #, c-format
msgid "-I-> DBTree::OnPopulate(%s) - Table %6d has been read." msgid "-I-> DBTree::OnPopulate(%s) - Table %6d has been read."
@@ -378,8 +383,8 @@ msgstr "-I-> PgmCtrl::OnSelChanged - %s"
#: ../Doc.cpp:126 #: ../Doc.cpp:126
#, c-format #, c-format
msgid "-I-> mjDoc::OnInitView() - End - %d DSN's found" msgid "-I-> MainDoc::OnInitView() - End - %d DSN's found"
msgstr "-I-> mjDoc::OnInitView() - Ende - %d DSN's gefunden" msgstr "-I-> MainDoc::OnInitView() - Ende - %d DSN's gefunden"
#: ../PgmCtrl.cpp:160 ../PgmCtrl.cpp:163 #: ../PgmCtrl.cpp:160 ../PgmCtrl.cpp:163
msgid "-I-> wxConfigBase.p_ProgramCfg->DeleteAll() was succesfull." msgid "-I-> wxConfigBase.p_ProgramCfg->DeleteAll() was succesfull."

View File

@@ -30,7 +30,7 @@
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
#include "std.h" #include "std.h"
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
DlgUser::DlgUser(wxWindow *parent, mjDoc *p_Doc, const wxString& title) : DlgUser::DlgUser(wxWindow *parent, MainDoc *p_Doc, const wxString& title) :
wxDialog(parent, ID_DIALOG_DSN, title) wxDialog(parent, ID_DIALOG_DSN, title)
{ {
int chSize; // Height of Font * 1.4 = Height of wxTextCtrl int chSize; // Height of Font * 1.4 = Height of wxTextCtrl

View File

@@ -16,7 +16,7 @@
#define ID_PASSWORD 103 #define ID_PASSWORD 103
#define ID_TEXT 104 #define ID_TEXT 104
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
class mjDoc; class MainDoc;
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
class DlgUser: public wxDialog class DlgUser: public wxDialog
{ {
@@ -25,9 +25,9 @@ class DlgUser: public wxDialog
wxStaticText *m_Label1, *m_Label2; wxStaticText *m_Label1, *m_Label2;
wxTextCtrl *m_UserName, *m_Password; wxTextCtrl *m_UserName, *m_Password;
wxButton *m_OK, *m_Cancel; wxButton *m_OK, *m_Cancel;
mjDoc *pDoc; MainDoc *pDoc;
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
DlgUser(wxWindow *parent,mjDoc *pDoc, const wxString& title); DlgUser(wxWindow *parent,MainDoc *pDoc, const wxString& title);
void OnInit(); void OnInit();
void OnOk(wxCommandEvent& event); void OnOk(wxCommandEvent& event);
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------

View File

@@ -39,7 +39,7 @@ wxConfigBase *p_ProgramCfg; // All Config and Path information
wxLogTextCtrl *p_LogBook; // All Log messages wxLogTextCtrl *p_LogBook; // All Log messages
wxString LogBuf; // String for all Logs wxString LogBuf; // String for all Logs
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
mjDoc::mjDoc() MainDoc::MainDoc()
{ {
db_Br = NULL; db_Br = NULL;
p_DSN = NULL; p_DSN = NULL;
@@ -58,7 +58,7 @@ mjDoc::mjDoc()
ft_Doc = new wxFont(wxSystemSettings::GetSystemFont(wxSYS_SYSTEM_FONT)); ft_Doc = new wxFont(wxSystemSettings::GetSystemFont(wxSYS_SYSTEM_FONT));
} }
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
mjDoc::~mjDoc() MainDoc::~MainDoc()
{ {
// ---------------------------------------------------------- // ----------------------------------------------------------
// -E-> The Tree Controls take to long to close : Why ?? // -E-> The Tree Controls take to long to close : Why ??
@@ -75,10 +75,10 @@ mjDoc::~mjDoc()
p_Splitter = NULL; p_Splitter = NULL;
delete p_Splitter; delete p_Splitter;
delete [] db_Br; delete [] db_Br;
// wxMessageBox("~mjDoc"); // wxMessageBox("~MainDoc");
} }
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
bool mjDoc::OnNewDocument() bool MainDoc::OnNewDocument()
{ {
wxStopWatch sw; wxStopWatch sw;
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
@@ -86,14 +86,14 @@ bool mjDoc::OnNewDocument()
return FALSE; return FALSE;
p_PgmCtrl->OnPopulate(); p_PgmCtrl->OnPopulate();
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
wxLogMessage(_("-I-> mjDoc::OnNewDocument() - End - Time needed : %ld ms"),sw.Time()); wxLogMessage(_("-I-> MainDoc::OnNewDocument() - End - Time needed : %ld ms"),sw.Time());
return TRUE; return TRUE;
} }
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
bool mjDoc::OnInitView() bool MainDoc::OnInitView()
{ {
Sash = p_ProgramCfg->Read("/MainFrame/Sash", 200); Sash = p_ProgramCfg->Read("/MainFrame/Sash", 200);
// wxMessageBox("OnInitView() - Begin ","-I->mjDoc::OnInitView"); // wxMessageBox("OnInitView() - Begin ","-I->MainDoc::OnInitView");
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
// create "workplace" window // create "workplace" window
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
@@ -136,13 +136,13 @@ bool mjDoc::OnInitView()
if (!OnInitODBC()) if (!OnInitODBC())
return FALSE; return FALSE;
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
Temp0.Printf(_("-I-> mjDoc::OnInitView() - End - %d DSN's found"),i_DSN); Temp0.Printf(_("-I-> MainDoc::OnInitView() - End - %d DSN's found"),i_DSN);
p_MainFrame->SetStatusText(Temp0, 0); p_MainFrame->SetStatusText(Temp0, 0);
wxLogMessage(Temp0); wxLogMessage(Temp0);
return TRUE; return TRUE;
} }
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
bool mjDoc::OnInitODBC() bool MainDoc::OnInitODBC()
{ {
char Dsn[SQL_MAX_DSN_LENGTH + 1]; char Dsn[SQL_MAX_DSN_LENGTH + 1];
char DsDesc[255]; // BJO20002501 instead of 512 char DsDesc[255]; // BJO20002501 instead of 512
@@ -222,7 +222,7 @@ bool mjDoc::OnInitODBC()
return TRUE; return TRUE;
} }
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
bool mjDoc::OnChosenDSN(int Which) bool MainDoc::OnChosenDSN(int Which)
{ {
// wxLogMessage("OnChosenDSN(%d) - Begin",Which); // wxLogMessage("OnChosenDSN(%d) - Begin",Which);
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
@@ -251,7 +251,7 @@ bool mjDoc::OnChosenDSN(int Which)
return TRUE; return TRUE;
} }
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
bool mjDoc::OnChosenTbl(int Tab,wxString Table) bool MainDoc::OnChosenTbl(int Tab,wxString Table)
{ {
// wxLogMessage("OnChosenTbl(%d,%s)",Tab,Table.c_str()); // wxLogMessage("OnChosenTbl(%d,%s)",Tab,Table.c_str());
//------------------------- //-------------------------
@@ -307,10 +307,10 @@ bool mjDoc::OnChosenTbl(int Tab,wxString Table)
return TRUE;; return TRUE;;
} }
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
void mjDoc::OnLeer(wxString Aufrufer) void MainDoc::OnLeer(wxString Aufrufer)
{ {
// Temp0.Printf(_("\nmjDoc::OnLeer(%s) : auch diese funktion steht eines Tages zur Verf<72>gung !"),Aufrufer.c_str()); // Temp0.Printf(_("\nMainDoc::OnLeer(%s) : auch diese funktion steht eines Tages zur Verf<72>gung !"),Aufrufer.c_str());
Temp0.Printf(_("\nmjDoc::OnLeer(%s) : even this function will one day be available !"),Aufrufer.c_str()); Temp0.Printf(_("\nMainDoc::OnLeer(%s) : even this function will one day be available !"),Aufrufer.c_str());
wxLogMessage(Temp0); Temp0.Empty(); wxLogMessage(Temp0); Temp0.Empty();
return; return;
} }

View File

@@ -29,12 +29,12 @@ extern wxString LogBuf; // String for all Logs
class PgmCtrl; // Declared in PgmCtrl.h file class PgmCtrl; // Declared in PgmCtrl.h file
class DocSplitterWindow; // Declared at the end of the file class DocSplitterWindow; // Declared at the end of the file
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
class mjDoc class MainDoc
{ {
public: public:
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
mjDoc(); MainDoc();
virtual ~mjDoc(); virtual ~MainDoc();
int Sash; int Sash;
//--------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------
//-- declare document Vars here --------------------------------------------------------- //-- declare document Vars here ---------------------------------------------------------
@@ -72,7 +72,7 @@ class mjDoc
class DocSplitterWindow: public wxSplitterWindow class DocSplitterWindow: public wxSplitterWindow
{ {
public: public:
mjDoc *pDoc; MainDoc *pDoc;
DocSplitterWindow(wxWindow *parent, wxWindowID id); DocSplitterWindow(wxWindow *parent, wxWindowID id);
virtual bool OnSashPositionChange(int newSashPosition) virtual bool OnSashPositionChange(int newSashPosition)
{ {

View File

@@ -8,7 +8,7 @@
// Copyright: (c) Mark Johnson, Berlin Germany, mj10777@gmx.net // Copyright: (c) Mark Johnson, Berlin Germany, mj10777@gmx.net
// Licence: wxWindows license // Licence: wxWindows license
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
class mjDoc; // Declared in doc.h file class MainDoc; // Declared in doc.h file
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
class TreeData : public wxTreeItemData class TreeData : public wxTreeItemData
{ {
@@ -37,7 +37,7 @@ class PgmCtrl : public wxTreeCtrl
PgmCtrl(wxWindow *parent); PgmCtrl(wxWindow *parent);
PgmCtrl(wxWindow *parent, const wxWindowID id,const wxPoint& pos, const wxSize& size,long style); PgmCtrl(wxWindow *parent, const wxWindowID id,const wxPoint& pos, const wxSize& size,long style);
virtual ~PgmCtrl(); virtual ~PgmCtrl();
mjDoc *pDoc; MainDoc *pDoc;
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
int i_TabArt; // Tab = 0 ; Page = 1; int i_TabArt; // Tab = 0 ; Page = 1;
int i_ViewNr; // View Nummer in Tab / Page int i_ViewNr; // View Nummer in Tab / Page