update dev300-m58
[ooovba.git] / dbaccess / source / ui / dlg / ConnectionPage.hxx
blob340be1fa02c5720e85b448ebd2c146abe081f2b6
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ConnectionPage.hxx,v $
10 * $Revision: 1.7.68.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef DBAUI_CONNECTIONPAGE_HXX
32 #define DBAUI_CONNECTIONPAGE_HXX
34 #ifndef DBAUI_CONNECTIONHELPER_HXX
35 #include "ConnectionHelper.hxx"
36 #endif
37 #ifndef _DBAUI_ADMINPAGES_HXX_
38 #include "adminpages.hxx"
39 #endif
40 #ifndef _UCBHELPER_CONTENT_HXX
41 #include <ucbhelper/content.hxx>
42 #endif
43 #ifndef _DBAUI_CURLEDIT_HXX_
44 #include "curledit.hxx"
45 #endif
47 //.........................................................................
48 namespace dbaui
50 //.........................................................................
52 class IDatabaseSettingsDialog;
53 //=========================================================================
54 //= OConnectionTabPage
55 //=========================================================================
57 /** implements the connection page of teh data source properties dialog.
59 class OConnectionTabPage : public OConnectionHelper
61 sal_Bool m_bUserGrabFocus : 1;
62 protected:
63 // connection
64 FixedLine m_aFL1;
65 // user authentification
66 FixedLine m_aFL2;
67 FixedText m_aUserNameLabel;
68 Edit m_aUserName;
69 CheckBox m_aPasswordRequired;
71 // jdbc driver
72 FixedLine m_aFL3;
73 FixedText m_aJavaDriverLabel;
74 Edit m_aJavaDriver;
75 PushButton m_aTestJavaDriver;
77 // connection test
78 PushButton m_aTestConnection;
81 // called when the test connection button was clicked
82 DECL_LINK(OnTestJavaClickHdl,PushButton*);
83 DECL_LINK(OnEditModified,Edit*);
85 public:
86 static SfxTabPage* Create( Window* pParent, const SfxItemSet& _rAttrSet );
87 virtual BOOL FillItemSet (SfxItemSet& _rCoreAttrs);
89 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
91 inline void enableConnectionURL() { m_aConnectionURL.SetReadOnly(sal_False); }
92 inline void disableConnectionURL() { m_aConnectionURL.SetReadOnly(); }
94 /** changes the connection URL.
95 <p>The new URL must be of the type which is currently selected, only the parts which do not
96 affect the type may be changed (compared to the previous URL).</p>
98 private:
99 OConnectionTabPage(Window* pParent, const SfxItemSet& _rCoreAttrs);
100 // nControlFlags ist eine Kombination der CBTP_xxx-Konstanten
101 virtual ~OConnectionTabPage();
103 // <method>OGenericAdministrationPage::fillControls</method>
104 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
105 // <method>OGenericAdministrationPage::fillWindows</method>
106 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
108 private:
109 /** enables the test connection button, if allowed
111 virtual bool checkTestConnection();
113 //.........................................................................
114 } // namespace dbaui
115 //.........................................................................
117 #endif // _DBAUI_DETAILPAGES_HXX_