Version 3.6.0.2, tag libreoffice-3.6.0.2
[LibreOffice.git] / dbaccess / source / ui / dlg / detailpages.hxx
blobbb0a6f388d93c409547de402b582ebfb14f40f90
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _DBAUI_DETAILPAGES_HXX_
30 #define _DBAUI_DETAILPAGES_HXX_
32 #include "adminpages.hxx"
33 #include "charsets.hxx"
34 #include "charsetlistbox.hxx"
35 #include <vcl/field.hxx>
36 #include <vcl/fixed.hxx>
37 #include <vcl/lstbox.hxx>
38 #include <vcl/edit.hxx>
39 #include <vcl/button.hxx>
40 #include "TextConnectionHelper.hxx"
41 #include "admincontrols.hxx"
43 #include <svtools/dialogcontrolling.hxx>
46 //.........................................................................
47 namespace dbaui
49 //.........................................................................
50 //=========================================================================
51 //= OCommonBehaviourTabPage
52 //=========================================================================
53 #define CBTP_NONE 0x00000000
54 #define CBTP_USE_CHARSET 0x00000002
55 #define CBTP_USE_OPTIONS 0x00000004
57 /** eases the implementation of tab pages handling user/password and/or character
58 set and/or generic options input
59 <BR>
60 The controls to be used habe to be defined within the resource, as usual, but
61 this class does all the handling necessary.
63 class OCommonBehaviourTabPage : public OGenericAdministrationPage
65 protected:
67 FixedText* m_pOptionsLabel;
68 Edit* m_pOptions;
70 FixedLine* m_pDataConvertFixedLine;
71 FixedText* m_pCharsetLabel;
72 CharSetListBox* m_pCharset;
74 FixedLine* m_pAutoFixedLine;
75 CheckBox* m_pAutoRetrievingEnabled;
76 FixedText* m_pAutoIncrementLabel;
77 Edit* m_pAutoIncrement;
78 FixedText* m_pAutoRetrievingLabel;
79 Edit* m_pAutoRetrieving;
81 sal_uInt32 m_nControlFlags;
83 public:
84 virtual sal_Bool FillItemSet (SfxItemSet& _rCoreAttrs);
86 OCommonBehaviourTabPage(Window* pParent, sal_uInt16 nResId, const SfxItemSet& _rCoreAttrs, sal_uInt32 nControlFlags,bool _bFreeResource = true);
87 protected:
89 // nControlFlags ist eine Kombination der CBTP_xxx-Konstanten
90 virtual ~OCommonBehaviourTabPage();
92 // must be overloaded by subclasses, but it isn't pure virtual
93 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
95 // <method>OGenericAdministrationPage::fillControls</method>
96 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
98 // <method>OGenericAdministrationPage::fillWindows</method>
99 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
102 //========================================================================
103 //= ODbaseDetailsPage
104 //========================================================================
105 class ODbaseDetailsPage : public OCommonBehaviourTabPage
107 public:
108 virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs );
110 ODbaseDetailsPage(Window* pParent, const SfxItemSet& _rCoreAttrs);
111 private:
112 // please add new controls also to <method>fillControls</method> or <method>fillWindows</method>
113 CheckBox m_aShowDeleted;
114 FixedLine m_aFL_1;
115 FixedText m_aFT_Message;
116 PushButton m_aIndexes;
118 String m_sDsn;
120 protected:
122 virtual ~ODbaseDetailsPage();
124 protected:
125 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
126 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
127 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
129 private:
130 DECL_LINK( OnButtonClicked, Button * );
133 //========================================================================
134 //= OAdoDetailsPage
135 //========================================================================
136 class OAdoDetailsPage : public OCommonBehaviourTabPage
138 protected:
139 virtual ~OAdoDetailsPage();
140 public:
142 OAdoDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
145 //========================================================================
146 //= OOdbcDetailsPage
147 //========================================================================
148 class OOdbcDetailsPage : public OCommonBehaviourTabPage
150 public:
151 virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs );
153 OOdbcDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
154 protected:
155 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
156 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
157 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
158 private:
159 FixedLine m_aFL_1;
160 CheckBox m_aUseCatalog;
164 //========================================================================
165 //= OUserDriverDetailsPage
166 //========================================================================
167 class OUserDriverDetailsPage : public OCommonBehaviourTabPage
169 public:
170 virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs );
172 OUserDriverDetailsPage( 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 FixedText m_aFTHostname;
179 Edit m_aEDHostname;
180 FixedText m_aPortNumber;
181 NumericField m_aNFPortNumber;
182 CheckBox m_aUseCatalog;
185 //========================================================================
186 //= OMySQLODBCDetailsPage
187 //========================================================================
188 class OMySQLODBCDetailsPage : public OCommonBehaviourTabPage
190 public:
191 OMySQLODBCDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
194 //========================================================================
195 //= OGeneralSpecialJDBCDetailsPage
196 //========================================================================
197 class OGeneralSpecialJDBCDetailsPage : public OCommonBehaviourTabPage
199 public:
200 OGeneralSpecialJDBCDetailsPage( Window* pParent
201 , sal_uInt16 _nResId
202 , const SfxItemSet& _rCoreAttrs
203 , sal_uInt16 _nPortId
206 protected:
209 virtual sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs );
210 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
211 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
212 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
214 DECL_LINK(OnTestJavaClickHdl,PushButton*);
215 DECL_LINK(OnEditModified,Edit*);
217 FixedLine m_aFL_1;
218 FixedText m_aFTHostname;
219 Edit m_aEDHostname;
220 FixedText m_aPortNumber;
221 NumericField m_aNFPortNumber;
222 FixedText m_aFTSocket;
223 Edit m_aEDSocket;
225 FixedText m_aFTDriverClass;
226 Edit m_aEDDriverClass;
227 PushButton m_aTestJavaDriver;
229 String m_sDefaultJdbcDriverName;
230 sal_uInt16 m_nPortId;
231 bool m_bUseClass;
234 //========================================================================
235 //= MySQLNativePage
236 //========================================================================
237 class MySQLNativePage : public OCommonBehaviourTabPage
239 public:
240 MySQLNativePage( Window* pParent,
241 const SfxItemSet& _rCoreAttrs );
243 private:
244 FixedLine m_aSeparator1;
245 MySQLNativeSettings m_aMySQLSettings;
247 FixedLine m_aSeparator2;
248 FixedText m_aUserNameLabel;
249 Edit m_aUserName;
250 CheckBox m_aPasswordRequired;
252 protected:
253 virtual sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs );
254 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
255 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
256 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
259 //========================================================================
260 //= OOdbcDetailsPage
261 //========================================================================
262 class OLDAPDetailsPage : public OCommonBehaviourTabPage
264 public:
265 virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs );
267 OLDAPDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
268 protected:
269 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
270 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
271 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
272 private:
273 FixedLine m_aFL_1;
274 FixedText m_aBaseDN;
275 Edit m_aETBaseDN;
276 CheckBox m_aCBUseSSL;
277 FixedText m_aPortNumber;
278 NumericField m_aNFPortNumber;
279 FixedText m_aFTRowCount;
280 NumericField m_aNFRowCount;
282 sal_Int32 m_iSSLPort;
283 sal_Int32 m_iNormalPort;
284 DECL_LINK( OnCheckBoxClick, CheckBox * );
287 //========================================================================
288 //= OMozillaDetailsPage Detail page for Mozilla and Thunderbird addressbook
289 //========================================================================
290 class OMozillaDetailsPage : public OCommonBehaviourTabPage
292 protected:
293 virtual ~OMozillaDetailsPage();
294 public:
296 OMozillaDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
299 //========================================================================
300 //= OTextDetailsPage
301 //========================================================================
302 class OTextDetailsPage : public OCommonBehaviourTabPage
304 public:
305 virtual sal_Bool FillItemSet ( SfxItemSet& _rCoreAttrs );
307 OTextDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
308 OTextConnectionHelper* m_pTextConnectionHelper;
310 private:
312 String m_aFieldSeparatorList;
313 String m_aTextSeparatorList;
314 String m_aTextNone;
315 protected:
316 virtual ~OTextDetailsPage();
317 virtual sal_Bool prepareLeave();
319 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
320 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
321 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
323 private:
326 //.........................................................................
327 } // namespace dbaui
328 //.........................................................................
330 #endif // _DBAUI_DETAILPAGES_HXX_
332 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */