1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: detailpages.hxx,v $
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_DETAILPAGES_HXX_
32 #define _DBAUI_DETAILPAGES_HXX_
34 #ifndef _DBAUI_ADMINPAGES_HXX_
35 #include "adminpages.hxx"
37 #ifndef _DBAUI_CHARSETS_HXX_
38 #include "charsets.hxx"
40 #ifndef CHARSETLISTBOX_HXX
41 #include "charsetlistbox.hxx"
44 #include <vcl/field.hxx>
47 #include <vcl/fixed.hxx>
49 #ifndef _SV_LSTBOX_HXX
50 #include <vcl/lstbox.hxx>
53 #include <vcl/edit.hxx>
55 #ifndef _SV_BUTTON_HXX
56 #include <vcl/button.hxx>
58 #ifndef DBAUI_TEXTCONNECTIONHELPER_HXX
59 #include "TextConnectionHelper.hxx"
61 #include "admincontrols.hxx"
63 #include <svtools/dialogcontrolling.hxx>
66 //.........................................................................
69 //.........................................................................
70 //=========================================================================
71 //= OCommonBehaviourTabPage
72 //=========================================================================
73 #define CBTP_NONE 0x00000000
74 #define CBTP_USE_CHARSET 0x00000002
75 #define CBTP_USE_OPTIONS 0x00000004
77 /** eases the implementation of tab pages handling user/password and/or character
78 set and/or generic options input
80 The controls to be used habe to be defined within the resource, as usual, but
81 this class does all the handling necessary.
83 class OCommonBehaviourTabPage
: public OGenericAdministrationPage
87 FixedText
* m_pOptionsLabel
;
90 FixedLine
* m_pDataConvertFixedLine
;
91 FixedText
* m_pCharsetLabel
;
92 CharSetListBox
* m_pCharset
;
94 FixedLine
* m_pAutoFixedLine
;
95 CheckBox
* m_pAutoRetrievingEnabled
;
96 FixedText
* m_pAutoIncrementLabel
;
97 Edit
* m_pAutoIncrement
;
98 FixedText
* m_pAutoRetrievingLabel
;
99 Edit
* m_pAutoRetrieving
;
101 sal_uInt32 m_nControlFlags
;
104 virtual BOOL
FillItemSet (SfxItemSet
& _rCoreAttrs
);
106 OCommonBehaviourTabPage(Window
* pParent
, USHORT nResId
, const SfxItemSet
& _rCoreAttrs
, sal_uInt32 nControlFlags
,bool _bFreeResource
= true);
109 // nControlFlags ist eine Kombination der CBTP_xxx-Konstanten
110 virtual ~OCommonBehaviourTabPage();
112 // must be overloaded by subclasses, but it isn't pure virtual
113 virtual void implInitControls(const SfxItemSet
& _rSet
, sal_Bool _bSaveValue
);
115 // <method>OGenericAdministrationPage::fillControls</method>
116 virtual void fillControls(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
118 // <method>OGenericAdministrationPage::fillWindows</method>
119 virtual void fillWindows(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
122 //========================================================================
123 //= ODbaseDetailsPage
124 //========================================================================
125 class ODbaseDetailsPage
: public OCommonBehaviourTabPage
128 virtual BOOL
FillItemSet ( SfxItemSet
& _rCoreAttrs
);
130 ODbaseDetailsPage(Window
* pParent
, const SfxItemSet
& _rCoreAttrs
);
132 // please add new controls also to <method>fillControls</method> or <method>fillWindows</method>
133 CheckBox m_aShowDeleted
;
135 FixedText m_aFT_Message
;
136 PushButton m_aIndexes
;
142 virtual ~ODbaseDetailsPage();
145 virtual void implInitControls(const SfxItemSet
& _rSet
, sal_Bool _bSaveValue
);
146 virtual void fillControls(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
147 virtual void fillWindows(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
150 DECL_LINK( OnButtonClicked
, Button
* );
153 //========================================================================
155 //========================================================================
156 class OAdoDetailsPage
: public OCommonBehaviourTabPage
159 virtual ~OAdoDetailsPage();
162 OAdoDetailsPage( Window
* pParent
, const SfxItemSet
& _rCoreAttrs
);
165 //========================================================================
167 //========================================================================
168 class OOdbcDetailsPage
: public OCommonBehaviourTabPage
171 virtual BOOL
FillItemSet ( SfxItemSet
& _rCoreAttrs
);
173 OOdbcDetailsPage( Window
* pParent
, const SfxItemSet
& _rCoreAttrs
);
175 virtual void implInitControls(const SfxItemSet
& _rSet
, sal_Bool _bSaveValue
);
176 virtual void fillControls(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
177 virtual void fillWindows(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
180 CheckBox m_aUseCatalog
;
184 //========================================================================
185 //= OUserDriverDetailsPage
186 //========================================================================
187 class OUserDriverDetailsPage
: public OCommonBehaviourTabPage
190 virtual BOOL
FillItemSet ( SfxItemSet
& _rCoreAttrs
);
192 OUserDriverDetailsPage( Window
* pParent
, const SfxItemSet
& _rCoreAttrs
);
194 virtual void implInitControls(const SfxItemSet
& _rSet
, sal_Bool _bSaveValue
);
195 virtual void fillControls(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
196 virtual void fillWindows(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
198 FixedText m_aFTHostname
;
200 FixedText m_aPortNumber
;
201 NumericField m_aNFPortNumber
;
202 CheckBox m_aUseCatalog
;
205 //========================================================================
206 //= OMySQLODBCDetailsPage
207 //========================================================================
208 class OMySQLODBCDetailsPage
: public OCommonBehaviourTabPage
211 OMySQLODBCDetailsPage( Window
* pParent
, const SfxItemSet
& _rCoreAttrs
);
214 //========================================================================
215 //= OGeneralSpecialJDBCDetailsPage
216 //========================================================================
217 class OGeneralSpecialJDBCDetailsPage
: public OCommonBehaviourTabPage
220 OGeneralSpecialJDBCDetailsPage( Window
* pParent
222 , const SfxItemSet
& _rCoreAttrs
229 virtual BOOL
FillItemSet( SfxItemSet
& _rCoreAttrs
);
230 virtual void implInitControls(const SfxItemSet
& _rSet
, sal_Bool _bSaveValue
);
231 virtual void fillControls(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
232 virtual void fillWindows(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
234 DECL_LINK(OnTestJavaClickHdl
,PushButton
*);
235 DECL_LINK(OnEditModified
,Edit
*);
238 FixedText m_aFTHostname
;
240 FixedText m_aPortNumber
;
241 NumericField m_aNFPortNumber
;
242 FixedText m_aFTSocket
;
245 FixedText m_aFTDriverClass
;
246 Edit m_aEDDriverClass
;
247 PushButton m_aTestJavaDriver
;
249 String m_sDefaultJdbcDriverName
;
254 //========================================================================
256 //========================================================================
257 class MySQLNativePage
: public OCommonBehaviourTabPage
260 MySQLNativePage( Window
* pParent
,
261 const SfxItemSet
& _rCoreAttrs
);
264 FixedLine m_aSeparator1
;
265 MySQLNativeSettings m_aMySQLSettings
;
267 FixedLine m_aSeparator2
;
268 FixedText m_aUserNameLabel
;
270 CheckBox m_aPasswordRequired
;
273 virtual BOOL
FillItemSet( SfxItemSet
& _rCoreAttrs
);
274 virtual void implInitControls(const SfxItemSet
& _rSet
, sal_Bool _bSaveValue
);
275 virtual void fillControls(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
276 virtual void fillWindows(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
279 //========================================================================
280 //= OAdabasDetailsPage
281 //========================================================================
282 class OAdabasDetailsPage
: public OCommonBehaviourTabPage
285 virtual BOOL
FillItemSet (SfxItemSet
& _rCoreAttrs
);
287 OAdabasDetailsPage( Window
* pParent
, const SfxItemSet
& _rCoreAttrs
);
289 virtual void implInitControls(const SfxItemSet
& _rSet
, sal_Bool _bSaveValue
);
290 virtual void fillControls(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
291 virtual void fillWindows(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
294 FixedText m_aFTHostname
;
297 FixedText m_FT_CACHE_SIZE
;
298 NumericField m_NF_CACHE_SIZE
;
300 FixedText m_FT_DATA_INCREMENT
;
301 NumericField m_NF_DATA_INCREMENT
;
304 FixedText m_FT_CTRLUSERNAME
;
305 Edit m_ET_CTRLUSERNAME
;
306 FixedText m_FT_CTRLPASSWORD
;
307 Edit m_ET_CTRLPASSWORD
;
309 CheckBox m_CB_SHUTDB
;
310 PushButton m_PB_STAT
;
314 DECL_LINK( AttributesChangedHdl
, void * );
315 DECL_LINK( UserSettingsHdl
, void * );
316 DECL_LINK( LoseFocusHdl
, Edit
* );
317 DECL_LINK( PBClickHdl
, Button
*);
320 //========================================================================
322 //========================================================================
323 class OLDAPDetailsPage
: public OCommonBehaviourTabPage
326 virtual BOOL
FillItemSet ( SfxItemSet
& _rCoreAttrs
);
328 OLDAPDetailsPage( Window
* pParent
, const SfxItemSet
& _rCoreAttrs
);
330 virtual void implInitControls(const SfxItemSet
& _rSet
, sal_Bool _bSaveValue
);
331 virtual void fillControls(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
332 virtual void fillWindows(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
337 CheckBox m_aCBUseSSL
;
338 FixedText m_aPortNumber
;
339 NumericField m_aNFPortNumber
;
340 FixedText m_aFTRowCount
;
341 NumericField m_aNFRowCount
;
343 sal_Int32 m_iSSLPort
;
344 sal_Int32 m_iNormalPort
;
345 DECL_LINK( OnCheckBoxClick
, CheckBox
* );
348 //========================================================================
349 //= OMozillaDetailsPage Detail page for Mozilla and Thunderbird addressbook
350 //========================================================================
351 class OMozillaDetailsPage
: public OCommonBehaviourTabPage
354 virtual ~OMozillaDetailsPage();
357 OMozillaDetailsPage( Window
* pParent
, const SfxItemSet
& _rCoreAttrs
);
360 //========================================================================
362 //========================================================================
363 class OTextDetailsPage
: public OCommonBehaviourTabPage
366 virtual BOOL
FillItemSet ( SfxItemSet
& _rCoreAttrs
);
368 OTextDetailsPage( Window
* pParent
, const SfxItemSet
& _rCoreAttrs
);
369 OTextConnectionHelper
* m_pTextConnectionHelper
;
373 String m_aFieldSeparatorList
;
374 String m_aTextSeparatorList
;
377 virtual ~OTextDetailsPage();
378 virtual sal_Bool
prepareLeave();
380 virtual void implInitControls(const SfxItemSet
& _rSet
, sal_Bool _bSaveValue
);
381 virtual void fillControls(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
382 virtual void fillWindows(::std::vector
< ISaveValueWrapper
* >& _rControlList
);
387 //.........................................................................
389 //.........................................................................
391 #endif // _DBAUI_DETAILPAGES_HXX_