12e2212a7SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 32e2212a7SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 42e2212a7SAndrew Rist * or more contributor license agreements. See the NOTICE file 52e2212a7SAndrew Rist * distributed with this work for additional information 62e2212a7SAndrew Rist * regarding copyright ownership. The ASF licenses this file 72e2212a7SAndrew Rist * to you under the Apache License, Version 2.0 (the 82e2212a7SAndrew Rist * "License"); you may not use this file except in compliance 92e2212a7SAndrew Rist * with the License. You may obtain a copy of the License at 102e2212a7SAndrew Rist * 112e2212a7SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 122e2212a7SAndrew Rist * 132e2212a7SAndrew Rist * Unless required by applicable law or agreed to in writing, 142e2212a7SAndrew Rist * software distributed under the License is distributed on an 152e2212a7SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 162e2212a7SAndrew Rist * KIND, either express or implied. See the License for the 172e2212a7SAndrew Rist * specific language governing permissions and limitations 182e2212a7SAndrew Rist * under the License. 192e2212a7SAndrew Rist * 202e2212a7SAndrew Rist *************************************************************/ 212e2212a7SAndrew Rist 222e2212a7SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef DBAUI_CONNECTIONPAGE_HXX 25cdf0e10cSrcweir #define DBAUI_CONNECTIONPAGE_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #ifndef DBAUI_CONNECTIONHELPER_HXX 28cdf0e10cSrcweir #include "ConnectionHelper.hxx" 29cdf0e10cSrcweir #endif 30cdf0e10cSrcweir #ifndef _DBAUI_ADMINPAGES_HXX_ 31cdf0e10cSrcweir #include "adminpages.hxx" 32cdf0e10cSrcweir #endif 33cdf0e10cSrcweir #ifndef _UCBHELPER_CONTENT_HXX 34cdf0e10cSrcweir #include <ucbhelper/content.hxx> 35cdf0e10cSrcweir #endif 36cdf0e10cSrcweir #ifndef _DBAUI_CURLEDIT_HXX_ 37cdf0e10cSrcweir #include "curledit.hxx" 38cdf0e10cSrcweir #endif 39cdf0e10cSrcweir 40cdf0e10cSrcweir //......................................................................... 41cdf0e10cSrcweir namespace dbaui 42cdf0e10cSrcweir { 43cdf0e10cSrcweir //......................................................................... 44cdf0e10cSrcweir 45cdf0e10cSrcweir class IDatabaseSettingsDialog; 46cdf0e10cSrcweir //========================================================================= 47cdf0e10cSrcweir //= OConnectionTabPage 48cdf0e10cSrcweir //========================================================================= 49cdf0e10cSrcweir 50*07a3d7f1SPedro Giffuni /** implements the connection page of the data source properties dialog. 51cdf0e10cSrcweir */ 52cdf0e10cSrcweir class OConnectionTabPage : public OConnectionHelper 53cdf0e10cSrcweir { 54cdf0e10cSrcweir sal_Bool m_bUserGrabFocus : 1; 55cdf0e10cSrcweir protected: 56cdf0e10cSrcweir // connection 57cdf0e10cSrcweir FixedLine m_aFL1; 58cdf0e10cSrcweir // user authentification 59cdf0e10cSrcweir FixedLine m_aFL2; 60cdf0e10cSrcweir FixedText m_aUserNameLabel; 61cdf0e10cSrcweir Edit m_aUserName; 62cdf0e10cSrcweir CheckBox m_aPasswordRequired; 63cdf0e10cSrcweir 64cdf0e10cSrcweir // jdbc driver 65cdf0e10cSrcweir FixedLine m_aFL3; 66cdf0e10cSrcweir FixedText m_aJavaDriverLabel; 67cdf0e10cSrcweir Edit m_aJavaDriver; 68cdf0e10cSrcweir PushButton m_aTestJavaDriver; 69cdf0e10cSrcweir 70cdf0e10cSrcweir // connection test 71cdf0e10cSrcweir PushButton m_aTestConnection; 72cdf0e10cSrcweir 73cdf0e10cSrcweir 74cdf0e10cSrcweir // called when the test connection button was clicked 75cdf0e10cSrcweir DECL_LINK(OnTestJavaClickHdl,PushButton*); 76cdf0e10cSrcweir DECL_LINK(OnEditModified,Edit*); 77cdf0e10cSrcweir 78cdf0e10cSrcweir public: 79cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, const SfxItemSet& _rAttrSet ); 80cdf0e10cSrcweir virtual sal_Bool FillItemSet (SfxItemSet& _rCoreAttrs); 81cdf0e10cSrcweir 82cdf0e10cSrcweir virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); 83cdf0e10cSrcweir enableConnectionURL()84cdf0e10cSrcweir inline void enableConnectionURL() { m_aConnectionURL.SetReadOnly(sal_False); } disableConnectionURL()85cdf0e10cSrcweir inline void disableConnectionURL() { m_aConnectionURL.SetReadOnly(); } 86cdf0e10cSrcweir 87cdf0e10cSrcweir /** changes the connection URL. 88cdf0e10cSrcweir <p>The new URL must be of the type which is currently selected, only the parts which do not 89cdf0e10cSrcweir affect the type may be changed (compared to the previous URL).</p> 90cdf0e10cSrcweir */ 91cdf0e10cSrcweir private: 92cdf0e10cSrcweir OConnectionTabPage(Window* pParent, const SfxItemSet& _rCoreAttrs); 93cdf0e10cSrcweir // nControlFlags ist eine Kombination der CBTP_xxx-Konstanten 94cdf0e10cSrcweir virtual ~OConnectionTabPage(); 95cdf0e10cSrcweir 96cdf0e10cSrcweir // <method>OGenericAdministrationPage::fillControls</method> 97cdf0e10cSrcweir virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList); 98cdf0e10cSrcweir // <method>OGenericAdministrationPage::fillWindows</method> 99cdf0e10cSrcweir virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList); 100cdf0e10cSrcweir 101cdf0e10cSrcweir private: 102cdf0e10cSrcweir /** enables the test connection button, if allowed 103cdf0e10cSrcweir */ 104cdf0e10cSrcweir virtual bool checkTestConnection(); 105cdf0e10cSrcweir }; 106cdf0e10cSrcweir //......................................................................... 107cdf0e10cSrcweir } // namespace dbaui 108cdf0e10cSrcweir //......................................................................... 109cdf0e10cSrcweir 110cdf0e10cSrcweir #endif // _DBAUI_DETAILPAGES_HXX_ 111