1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _OFFAPP_CONNPOOLOPTIONS_HXX_
25 #define _OFFAPP_CONNPOOLOPTIONS_HXX_
26 
27 #include <svl/solar.hrc>
28 #include <sfx2/tabdlg.hxx>
29 #include <vcl/fixed.hxx>
30 #include <vcl/button.hxx>
31 #include <vcl/field.hxx>
32 #include <svx/databaseregistrationui.hxx>
33 
34 //........................................................................
35 namespace offapp
36 {
37 //........................................................................
38 
39 	//====================================================================
40 	//= ConnectionPoolOptionsPage
41 	//====================================================================
42 	class DriverListControl;
43 	class ConnectionPoolOptionsPage : public SfxTabPage
44 	{
45 		using TabPage::ActivatePage;
46 
47 	protected:
48 		FixedLine				m_aFrame;
49 		CheckBox				m_aEnablePooling;
50 		FixedText				m_aDriversLabel;
51 		DriverListControl*		m_pDriverList;
52 		FixedText				m_aDriverLabel;
53 		FixedText				m_aDriver;
54 		CheckBox				m_aDriverPoolingEnabled;
55 		FixedText				m_aTimeoutLabel;
56 		NumericField			m_aTimeout;
57 
58 	protected:
59 		ConnectionPoolOptionsPage(Window* _pParent, const SfxItemSet& _rAttrSet);
60 
61 	public:
62 		static SfxTabPage*	Create(Window* _pParent, const SfxItemSet& _rAttrSet);
63 
64 		~ConnectionPoolOptionsPage();
65 
66 	protected:
67 		virtual long		Notify( NotifyEvent& _rNEvt );
68 
69 		virtual sal_Bool		FillItemSet(SfxItemSet& _rSet);
70 		virtual void		Reset(const SfxItemSet& _rSet);
71 		virtual void		ActivatePage( const SfxItemSet& _rSet);
72 
73 	protected:
74 		DECL_LINK( OnEnabledDisabled, const CheckBox* );
75 		DECL_LINK( OnDriverRowChanged, const void* );
76 
77 		void implInitControls(const SfxItemSet& _rSet, sal_Bool _bFromReset);
78 
79 		void commitTimeoutField();
80 	};
81 
82 //........................................................................
83 }	// namespace offapp
84 //........................................................................
85 
86 #endif // _OFFAPP_CONNPOOLOPTIONS_HXX_
87 
88 
89