Update ooo320-m1
[ooovba.git] / dbaccess / source / ui / dlg / detailpages.hxx
blob74f550889fbc83910591ab8532c15fdb950e99fb
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: detailpages.hxx,v $
10 * $Revision: 1.31 $
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"
36 #endif
37 #ifndef _DBAUI_CHARSETS_HXX_
38 #include "charsets.hxx"
39 #endif
40 #ifndef CHARSETLISTBOX_HXX
41 #include "charsetlistbox.hxx"
42 #endif
43 #ifndef _SV_FIELD_HXX
44 #include <vcl/field.hxx>
45 #endif
46 #ifndef _SV_FIXED_HXX
47 #include <vcl/fixed.hxx>
48 #endif
49 #ifndef _SV_LSTBOX_HXX
50 #include <vcl/lstbox.hxx>
51 #endif
52 #ifndef _SV_EDIT_HXX
53 #include <vcl/edit.hxx>
54 #endif
55 #ifndef _SV_BUTTON_HXX
56 #include <vcl/button.hxx>
57 #endif
58 #ifndef DBAUI_TEXTCONNECTIONHELPER_HXX
59 #include "TextConnectionHelper.hxx"
60 #endif
61 #include "admincontrols.hxx"
63 #include <svtools/dialogcontrolling.hxx>
66 //.........................................................................
67 namespace dbaui
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
79 <BR>
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
85 protected:
87 FixedText* m_pOptionsLabel;
88 Edit* m_pOptions;
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;
103 public:
104 virtual BOOL FillItemSet (SfxItemSet& _rCoreAttrs);
106 OCommonBehaviourTabPage(Window* pParent, USHORT nResId, const SfxItemSet& _rCoreAttrs, sal_uInt32 nControlFlags,bool _bFreeResource = true);
107 protected:
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
127 public:
128 virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
130 ODbaseDetailsPage(Window* pParent, const SfxItemSet& _rCoreAttrs);
131 private:
132 // please add new controls also to <method>fillControls</method> or <method>fillWindows</method>
133 CheckBox m_aShowDeleted;
134 FixedLine m_aFL_1;
135 FixedText m_aFT_Message;
136 PushButton m_aIndexes;
138 String m_sDsn;
140 protected:
142 virtual ~ODbaseDetailsPage();
144 protected:
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);
149 private:
150 DECL_LINK( OnButtonClicked, Button * );
153 //========================================================================
154 //= OAdoDetailsPage
155 //========================================================================
156 class OAdoDetailsPage : public OCommonBehaviourTabPage
158 protected:
159 virtual ~OAdoDetailsPage();
160 public:
162 OAdoDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
165 //========================================================================
166 //= OOdbcDetailsPage
167 //========================================================================
168 class OOdbcDetailsPage : public OCommonBehaviourTabPage
170 public:
171 virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
173 OOdbcDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
174 protected:
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);
178 private:
179 FixedLine m_aFL_1;
180 CheckBox m_aUseCatalog;
184 //========================================================================
185 //= OUserDriverDetailsPage
186 //========================================================================
187 class OUserDriverDetailsPage : public OCommonBehaviourTabPage
189 public:
190 virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
192 OUserDriverDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
193 protected:
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);
197 private:
198 FixedText m_aFTHostname;
199 Edit m_aEDHostname;
200 FixedText m_aPortNumber;
201 NumericField m_aNFPortNumber;
202 CheckBox m_aUseCatalog;
205 //========================================================================
206 //= OMySQLODBCDetailsPage
207 //========================================================================
208 class OMySQLODBCDetailsPage : public OCommonBehaviourTabPage
210 public:
211 OMySQLODBCDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
214 //========================================================================
215 //= OGeneralSpecialJDBCDetailsPage
216 //========================================================================
217 class OGeneralSpecialJDBCDetailsPage : public OCommonBehaviourTabPage
219 public:
220 OGeneralSpecialJDBCDetailsPage( Window* pParent
221 , USHORT _nResId
222 , const SfxItemSet& _rCoreAttrs
223 , USHORT _nPortId
226 protected:
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*);
237 FixedLine m_aFL_1;
238 FixedText m_aFTHostname;
239 Edit m_aEDHostname;
240 FixedText m_aPortNumber;
241 NumericField m_aNFPortNumber;
242 FixedText m_aFTSocket;
243 Edit m_aEDSocket;
245 FixedText m_aFTDriverClass;
246 Edit m_aEDDriverClass;
247 PushButton m_aTestJavaDriver;
249 String m_sDefaultJdbcDriverName;
250 USHORT m_nPortId;
251 bool m_bUseClass;
254 //========================================================================
255 //= MySQLNativePage
256 //========================================================================
257 class MySQLNativePage : public OCommonBehaviourTabPage
259 public:
260 MySQLNativePage( Window* pParent,
261 const SfxItemSet& _rCoreAttrs );
263 private:
264 FixedLine m_aSeparator1;
265 MySQLNativeSettings m_aMySQLSettings;
267 FixedLine m_aSeparator2;
268 FixedText m_aUserNameLabel;
269 Edit m_aUserName;
270 CheckBox m_aPasswordRequired;
272 protected:
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
284 public:
285 virtual BOOL FillItemSet (SfxItemSet& _rCoreAttrs);
287 OAdabasDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
288 protected:
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);
293 private:
294 FixedText m_aFTHostname;
295 Edit m_aEDHostname;
296 FixedLine m_aFL_1;
297 FixedText m_FT_CACHE_SIZE;
298 NumericField m_NF_CACHE_SIZE;
300 FixedText m_FT_DATA_INCREMENT;
301 NumericField m_NF_DATA_INCREMENT;
303 FixedLine m_aFL_2;
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;
311 String m_sUser;
312 BOOL bAttrsChanged;
314 DECL_LINK( AttributesChangedHdl, void * );
315 DECL_LINK( UserSettingsHdl, void * );
316 DECL_LINK( LoseFocusHdl, Edit * );
317 DECL_LINK( PBClickHdl, Button *);
320 //========================================================================
321 //= OOdbcDetailsPage
322 //========================================================================
323 class OLDAPDetailsPage : public OCommonBehaviourTabPage
325 public:
326 virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
328 OLDAPDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
329 protected:
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);
333 private:
334 FixedLine m_aFL_1;
335 FixedText m_aBaseDN;
336 Edit m_aETBaseDN;
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
353 protected:
354 virtual ~OMozillaDetailsPage();
355 public:
357 OMozillaDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
360 //========================================================================
361 //= OTextDetailsPage
362 //========================================================================
363 class OTextDetailsPage : public OCommonBehaviourTabPage
365 public:
366 virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
368 OTextDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
369 OTextConnectionHelper* m_pTextConnectionHelper;
371 private:
373 String m_aFieldSeparatorList;
374 String m_aTextSeparatorList;
375 String m_aTextNone;
376 protected:
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);
384 private:
387 //.........................................................................
388 } // namespace dbaui
389 //.........................................................................
391 #endif // _DBAUI_DETAILPAGES_HXX_