2
* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License as
6
* published by the Free Software Foundation; version 2 of the
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19
#ifndef _GRTDBCONNECTIONEDITOR_H_
20
#define _GRTDBCONNECTIONEDITOR_H_
22
#include "wb_config.h"
24
#include "mforms/form.h"
25
#include "mforms/box.h"
26
#include "mforms/button.h"
27
#include "mforms/treeview.h"
29
#include "db_conn_be.h"
30
#include "grtdb_connect_panel.h"
31
#include "grt/grt_manager.h"
36
class WBPUBLICBACKEND_PUBLIC_FUNC DbConnectionEditor : public mforms::Form
39
DbConnectionEditor(const db_mgmt_ManagementRef &mgmt);
40
~DbConnectionEditor();
43
db_mgmt_ConnectionRef run(const db_mgmt_ConnectionRef &connection);
46
db_mgmt_ManagementRef _mgmt;
47
DbConnectPanel _panel;
49
mforms::Box _top_vbox;
50
mforms::Box _top_hbox;
52
mforms::Box _conn_list_buttons_hbox;
53
mforms::Button _add_conn_button;
54
mforms::Button _del_conn_button;
55
mforms::Button _dup_conn_button;
56
mforms::Button _move_up_button;
57
mforms::Button _move_down_button;
58
mforms::TreeView _stored_connection_list;
59
mforms::TextEntry *_conn_name;
61
mforms::Box _bottom_hbox;
62
mforms::Button _ok_button;
63
mforms::Button _cancel_button;
64
mforms::Button _test_button;
66
//! Called from selector/list of connections to tell that things changed
67
void change_active_stored_conn();
71
void add_stored_conn(bool copy);
72
void del_stored_conn();
75
void cancel_clicked();
76
void reorder_conn(bool up);
78
void reset_stored_conn_list();
80
bool rename_stored_conn(const std::string &oname, const std::string &name);
85
#endif /* _GRTDBCONNECTIONEDITOR_H_ */