1
//////////////////////////////////////////////////////////////////////////
3
// pgAdmin III - PostgreSQL Tools
5
// Copyright (C) 2002 - 2009, The pgAdmin Development Team
6
// This software is released under the BSD Licence
8
// dlgSelectDatabase.h - Connect to a database
10
//////////////////////////////////////////////////////////////////////////
12
#ifndef DLGSELECTDATABASE_H
13
#define DLGSELECTDATABASE_H
17
#include <wx/treectrl.h>
23
class dlgSelDBNode : public wxTreeItemData
27
dlgSelDBNode(pgServer* server, const wxString& dbname=wxEmptyString);
28
dlgSelDBNode* createChild(const wxString& dbName);
30
wxString getDatabase() { return dbname; }
31
wxString getConnectionString();
34
pgServer* server; // Do not remove it, not owned by this
37
friend class dlgSelectDatabase;
42
class dlgSelectDatabase: public wxDialog
46
dlgSelectDatabase(wxWindow* parent, int id, const wxPoint& pos=wxDefaultPosition, const wxSize& size=wxDefaultSize, long style=wxCLOSE_BOX);
48
wxString getConnInfo();
49
static bool getValidConnectionString(wxString connStr, wxString& resultStr);
53
void OnSelect(wxTreeEvent& ev);
54
void OnSelActivate(wxTreeEvent& ev);
56
wxTreeCtrl *tcServers;
57
dlgSelDBNode *selectedConn;