1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _OFFAPP_CONNPOOLOPTIONS_HXX_
29 #define _OFFAPP_CONNPOOLOPTIONS_HXX_
30 
31 #include <svl/solar.hrc>
32 #include <sfx2/tabdlg.hxx>
33 #include <vcl/fixed.hxx>
34 #include <vcl/button.hxx>
35 #include <vcl/field.hxx>
36 #include <svx/databaseregistrationui.hxx>
37 
38 //........................................................................
39 namespace offapp
40 {
41 //........................................................................
42 
43 	//====================================================================
44 	//= ConnectionPoolOptionsPage
45 	//====================================================================
46 	class DriverListControl;
47 	class ConnectionPoolOptionsPage : public SfxTabPage
48 	{
49 		using TabPage::ActivatePage;
50 
51 	protected:
52 		FixedLine				m_aFrame;
53 		CheckBox				m_aEnablePooling;
54 		FixedText				m_aDriversLabel;
55 		DriverListControl*		m_pDriverList;
56 		FixedText				m_aDriverLabel;
57 		FixedText				m_aDriver;
58 		CheckBox				m_aDriverPoolingEnabled;
59 		FixedText				m_aTimeoutLabel;
60 		NumericField			m_aTimeout;
61 
62 	protected:
63 		ConnectionPoolOptionsPage(Window* _pParent, const SfxItemSet& _rAttrSet);
64 
65 	public:
66 		static SfxTabPage*	Create(Window* _pParent, const SfxItemSet& _rAttrSet);
67 
68 		~ConnectionPoolOptionsPage();
69 
70 	protected:
71 		virtual long		Notify( NotifyEvent& _rNEvt );
72 
73 		virtual sal_Bool		FillItemSet(SfxItemSet& _rSet);
74 		virtual void		Reset(const SfxItemSet& _rSet);
75 		virtual void		ActivatePage( const SfxItemSet& _rSet);
76 
77 	protected:
78 		DECL_LINK( OnEnabledDisabled, const CheckBox* );
79 		DECL_LINK( OnDriverRowChanged, const void* );
80 
81 		void implInitControls(const SfxItemSet& _rSet, sal_Bool _bFromReset);
82 
83 		void commitTimeoutField();
84 	};
85 
86 //........................................................................
87 }	// namespace offapp
88 //........................................................................
89 
90 #endif // _OFFAPP_CONNPOOLOPTIONS_HXX_
91 
92 
93