update dev300-m58
[ooovba.git] / dbaccess / source / ui / dlg / detailpages.hxx
blob04cc1ddc682ebd6bcc53ff41663785f8e7d48aee
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
62 #include <svtools/dialogcontrolling.hxx>
65 //.........................................................................
66 namespace dbaui
68 //.........................................................................
69 //=========================================================================
70 //= OCommonBehaviourTabPage
71 //=========================================================================
72 #define CBTP_NONE 0x00000000
73 #define CBTP_USE_CHARSET 0x00000002
74 #define CBTP_USE_OPTIONS 0x00000004
76 /** eases the implementation of tab pages handling user/password and/or character
77 set and/or generic options input
78 <BR>
79 The controls to be used habe to be defined within the resource, as usual, but
80 this class does all the handling necessary.
82 class OCommonBehaviourTabPage : public OGenericAdministrationPage
84 protected:
86 FixedText* m_pOptionsLabel;
87 Edit* m_pOptions;
89 FixedLine* m_pDataConvertFixedLine;
90 FixedText* m_pCharsetLabel;
91 CharSetListBox* m_pCharset;
93 FixedLine* m_pAutoFixedLine;
94 CheckBox* m_pAutoRetrievingEnabled;
95 FixedText* m_pAutoIncrementLabel;
96 Edit* m_pAutoIncrement;
97 FixedText* m_pAutoRetrievingLabel;
98 Edit* m_pAutoRetrieving;
100 sal_uInt32 m_nControlFlags;
102 public:
103 virtual BOOL FillItemSet (SfxItemSet& _rCoreAttrs);
105 OCommonBehaviourTabPage(Window* pParent, USHORT nResId, const SfxItemSet& _rCoreAttrs, sal_uInt32 nControlFlags,bool _bFreeResource = true);
106 protected:
108 // nControlFlags ist eine Kombination der CBTP_xxx-Konstanten
109 virtual ~OCommonBehaviourTabPage();
111 // must be overloaded by subclasses, but it isn't pure virtual
112 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
114 // <method>OGenericAdministrationPage::fillControls</method>
115 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
117 // <method>OGenericAdministrationPage::fillWindows</method>
118 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
121 //========================================================================
122 //= ODbaseDetailsPage
123 //========================================================================
124 class ODbaseDetailsPage : public OCommonBehaviourTabPage
126 public:
127 virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
129 ODbaseDetailsPage(Window* pParent, const SfxItemSet& _rCoreAttrs);
130 private:
131 // please add new controls also to <method>fillControls</method> or <method>fillWindows</method>
132 CheckBox m_aShowDeleted;
133 FixedLine m_aFL_1;
134 FixedText m_aFT_Message;
135 PushButton m_aIndexes;
137 String m_sDsn;
139 protected:
141 virtual ~ODbaseDetailsPage();
143 protected:
144 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
145 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
146 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
148 private:
149 DECL_LINK( OnButtonClicked, Button * );
152 //========================================================================
153 //= OAdoDetailsPage
154 //========================================================================
155 class OAdoDetailsPage : public OCommonBehaviourTabPage
157 protected:
158 virtual ~OAdoDetailsPage();
159 public:
161 OAdoDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
164 //========================================================================
165 //= OOdbcDetailsPage
166 //========================================================================
167 class OOdbcDetailsPage : public OCommonBehaviourTabPage
169 public:
170 virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
172 OOdbcDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
173 protected:
174 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
175 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
176 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
177 private:
178 FixedLine m_aFL_1;
179 CheckBox m_aUseCatalog;
183 //========================================================================
184 //= OUserDriverDetailsPage
185 //========================================================================
186 class OUserDriverDetailsPage : public OCommonBehaviourTabPage
188 public:
189 virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
191 OUserDriverDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
192 protected:
193 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
194 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
195 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
196 private:
197 FixedText m_aFTHostname;
198 Edit m_aEDHostname;
199 FixedText m_aPortNumber;
200 NumericField m_aNFPortNumber;
201 CheckBox m_aUseCatalog;
204 //========================================================================
205 //= OMySQLODBCDetailsPage
206 //========================================================================
207 class OMySQLODBCDetailsPage : public OCommonBehaviourTabPage
209 public:
210 OMySQLODBCDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
213 //========================================================================
214 //= OGeneralSpecialJDBCDetailsPage
215 //========================================================================
216 class OGeneralSpecialJDBCDetailsPage : public OCommonBehaviourTabPage
218 public:
219 OGeneralSpecialJDBCDetailsPage( Window* pParent
220 , USHORT _nResId
221 , const SfxItemSet& _rCoreAttrs
222 , USHORT _nPortId
225 protected:
228 virtual BOOL FillItemSet( SfxItemSet& _rCoreAttrs );
229 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
230 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
231 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
233 DECL_LINK(OnTestJavaClickHdl,PushButton*);
234 DECL_LINK(OnEditModified,Edit*);
236 FixedLine m_aFL_1;
237 FixedText m_aFTHostname;
238 Edit m_aEDHostname;
239 FixedText m_aPortNumber;
240 NumericField m_aNFPortNumber;
241 FixedText m_aFTSocket;
242 Edit m_aEDSocket;
244 FixedText m_aFTDriverClass;
245 Edit m_aEDDriverClass;
246 PushButton m_aTestJavaDriver;
248 String m_sDefaultJdbcDriverName;
249 USHORT m_nPortId;
250 bool m_bUseClass;
253 //========================================================================
254 //= MySQLNativePage
255 //========================================================================
256 class MySQLNativePage : public OCommonBehaviourTabPage
258 public:
259 MySQLNativePage( Window* pParent,
260 const SfxItemSet& _rCoreAttrs );
262 private:
263 FixedLine m_aSeparator1;
264 FixedText m_aDatabaseNameLabel;
265 Edit m_aDatabaseName;
266 FixedText m_aFTHostname;
267 Edit m_aEDHostname;
268 FixedText m_aPortNumber;
269 NumericField m_aNFPortNumber;
270 FixedText m_aFTSocket;
271 Edit m_aEDSocket;
273 FixedLine m_aSeparator2;
274 FixedText m_aUserNameLabel;
275 Edit m_aUserName;
276 CheckBox m_aPasswordRequired;
278 protected:
279 virtual BOOL FillItemSet( SfxItemSet& _rCoreAttrs );
280 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
281 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
282 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
285 //========================================================================
286 //= OAdabasDetailsPage
287 //========================================================================
288 class OAdabasDetailsPage : public OCommonBehaviourTabPage
290 public:
291 virtual BOOL FillItemSet (SfxItemSet& _rCoreAttrs);
293 OAdabasDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
294 protected:
295 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
296 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
297 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
299 private:
300 FixedText m_aFTHostname;
301 Edit m_aEDHostname;
302 FixedLine m_aFL_1;
303 FixedText m_FT_CACHE_SIZE;
304 NumericField m_NF_CACHE_SIZE;
306 FixedText m_FT_DATA_INCREMENT;
307 NumericField m_NF_DATA_INCREMENT;
309 FixedLine m_aFL_2;
310 FixedText m_FT_CTRLUSERNAME;
311 Edit m_ET_CTRLUSERNAME;
312 FixedText m_FT_CTRLPASSWORD;
313 Edit m_ET_CTRLPASSWORD;
315 CheckBox m_CB_SHUTDB;
316 PushButton m_PB_STAT;
317 String m_sUser;
318 BOOL bAttrsChanged;
320 DECL_LINK( AttributesChangedHdl, void * );
321 DECL_LINK( UserSettingsHdl, void * );
322 DECL_LINK( LoseFocusHdl, Edit * );
323 DECL_LINK( PBClickHdl, Button *);
326 //========================================================================
327 //= OOdbcDetailsPage
328 //========================================================================
329 class OLDAPDetailsPage : public OCommonBehaviourTabPage
331 public:
332 virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
334 OLDAPDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
335 protected:
336 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
337 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
338 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
339 private:
340 FixedLine m_aFL_1;
341 FixedText m_aBaseDN;
342 Edit m_aETBaseDN;
343 CheckBox m_aCBUseSSL;
344 FixedText m_aPortNumber;
345 NumericField m_aNFPortNumber;
346 FixedText m_aFTRowCount;
347 NumericField m_aNFRowCount;
349 sal_Int32 m_iSSLPort;
350 sal_Int32 m_iNormalPort;
351 DECL_LINK( OnCheckBoxClick, CheckBox * );
354 //========================================================================
355 //= OMozillaDetailsPage Detail page for Mozilla and Thunderbird addressbook
356 //========================================================================
357 class OMozillaDetailsPage : public OCommonBehaviourTabPage
359 protected:
360 virtual ~OMozillaDetailsPage();
361 public:
363 OMozillaDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
366 //========================================================================
367 //= OTextDetailsPage
368 //========================================================================
369 class OTextDetailsPage : public OCommonBehaviourTabPage
371 public:
372 virtual BOOL FillItemSet ( SfxItemSet& _rCoreAttrs );
374 OTextDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
375 OTextConnectionHelper* m_pTextConnectionHelper;
377 private:
379 String m_aFieldSeparatorList;
380 String m_aTextSeparatorList;
381 String m_aTextNone;
382 protected:
383 virtual ~OTextDetailsPage();
384 virtual sal_Bool prepareLeave();
386 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
387 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
388 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
390 private:
393 //.........................................................................
394 } // namespace dbaui
395 //.........................................................................
397 #endif // _DBAUI_DETAILPAGES_HXX_