~ubuntu-branches/debian/sid/pgadmin3/sid

« back to all changes in this revision

Viewing changes to pgadmin/include/dlg/dlgSelectDatabase.h

  • Committer: Bazaar Package Importer
  • Author(s): Gerfried Fuchs
  • Date: 2009-07-30 12:27:16 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090730122716-fddbh42on721bbs2
Tags: 1.10.0-1
* New upstream release.
* Adjusted watch file to match release candidates.
* Updated to Standards-Version 3.8.2:
  - Moved to Section: database.
  - Add DEB_BUILD_OPTIONS support for parallel building.
  - Move from findstring to filter suggestion for DEB_BUILD_OPTIONS parsing.
* pgagent got split into its own separate source package by upstream.
* Exclude Docs.vcproj from installation.
* Move doc-base.enus from pgadmin3 to pgadmin3-data package, the files are
  in there too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//////////////////////////////////////////////////////////////////////////
 
2
//
 
3
// pgAdmin III - PostgreSQL Tools
 
4
// RCS-ID:      $Id:$
 
5
// Copyright (C) 2002 - 2009, The pgAdmin Development Team
 
6
// This software is released under the BSD Licence
 
7
//
 
8
// dlgSelectDatabase.h - Connect to a database
 
9
//
 
10
//////////////////////////////////////////////////////////////////////////
 
11
 
 
12
#ifndef DLGSELECTDATABASE_H
 
13
#define DLGSELECTDATABASE_H
 
14
 
 
15
#include <wx/wx.h>
 
16
#include <wx/image.h>
 
17
#include <wx/treectrl.h>
 
18
 
 
19
 
 
20
class pgServer;
 
21
 
 
22
 
 
23
class dlgSelDBNode : public wxTreeItemData
 
24
{
 
25
 
 
26
public:
 
27
    dlgSelDBNode(pgServer* server, const wxString& dbname=wxEmptyString);
 
28
    dlgSelDBNode* createChild(const wxString& dbName);
 
29
 
 
30
    wxString getDatabase() { return dbname; }
 
31
    wxString getConnectionString();
 
32
 
 
33
private:
 
34
    pgServer*        server;  // Do not remove it, not owned by this
 
35
    wxString         dbname;
 
36
 
 
37
    friend class dlgSelectDatabase;
 
38
   
 
39
};
 
40
 
 
41
 
 
42
class dlgSelectDatabase: public wxDialog
 
43
{
 
44
 
 
45
public:
 
46
    dlgSelectDatabase(wxWindow* parent, int id, const wxPoint& pos=wxDefaultPosition, const wxSize& size=wxDefaultSize, long style=wxCLOSE_BOX);
 
47
 
 
48
    wxString getConnInfo();
 
49
    static bool getValidConnectionString(wxString connStr, wxString& resultStr);
 
50
 
 
51
protected:
 
52
    void Initialize();
 
53
    void OnSelect(wxTreeEvent& ev);
 
54
    void OnSelActivate(wxTreeEvent& ev);
 
55
 
 
56
    wxTreeCtrl *tcServers;
 
57
    dlgSelDBNode *selectedConn;
 
58
 
 
59
    DECLARE_EVENT_TABLE()
 
60
};
 
61
 
 
62
#endif
 
63