1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef DBAUI_CONNECTIONPAGE_HXX
30 #define DBAUI_CONNECTIONPAGE_HXX
32 #include "ConnectionHelper.hxx"
33 #include "adminpages.hxx"
34 #include <ucbhelper/content.hxx>
35 #include "curledit.hxx"
37 //.........................................................................
40 //.........................................................................
42 class IDatabaseSettingsDialog
;
43 //=========================================================================
44 //= OConnectionTabPage
45 //=========================================================================
47 /** implements the connection page of teh data source properties dialog.
49 class OConnectionTabPage
: public OConnectionHelper
51 sal_Bool m_bUserGrabFocus
: 1;
55 // user authentification
57 FixedText m_aUserNameLabel
;
59 CheckBox m_aPasswordRequired
;
63 FixedText m_aJavaDriverLabel
;
65 PushButton m_aTestJavaDriver
;
68 PushButton m_aTestConnection
;
71 // called when the test connection button was clicked
72 DECL_LINK(OnTestJavaClickHdl
,PushButton
*);
73 DECL_LINK(OnEditModified
,Edit
*);
76 static SfxTabPage
* Create( Window
* pParent
, const SfxItemSet
& _rAttrSet
);
77 virtual sal_Bool
FillItemSet (SfxItemSet
& _rCoreAttrs
);
79 virtual void implInitControls(const SfxItemSet
& _rSet
, sal_Bool _bSaveValue
);
81 inline void enableConnectionURL() { m_aConnectionURL
.SetReadOnly(sal_False
); }
82 inline void disableConnectionURL() { m_aConnectionURL
.SetReadOnly(); }
84 /** changes the connection URL.
85 <p>The new URL must be of the type which is currently selected, only the parts which do not
86 affect the type may be changed (compared to the previous URL).</p>
89 OConnectionTabPage(Window
* pParent
, const SfxItemSet
& _rCoreAttrs
);
90 // nControlFlags ist eine Kombination der CBTP_xxx-Konstanten
91 virtual ~OConnectionTabPage();
93 // <method>OGenericAdministrationPage::fillControls</method>
94 virtual void fillControls(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
95 // <method>OGenericAdministrationPage::fillWindows</method>
96 virtual void fillWindows(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
99 /** enables the test connection button, if allowed
101 virtual bool checkTestConnection();
103 //.........................................................................
105 //.........................................................................
107 #endif // _DBAUI_DETAILPAGES_HXX_
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */