LCOV - code coverage report
Current view: top level - dbaccess/source/ui/dlg - detailpages.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 6 0.0 %
Date: 2014-04-14 Functions: 0 12 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_DBACCESS_SOURCE_UI_DLG_DETAILPAGES_HXX
      21             : #define INCLUDED_DBACCESS_SOURCE_UI_DLG_DETAILPAGES_HXX
      22             : 
      23             : #include "adminpages.hxx"
      24             : #include "charsets.hxx"
      25             : #include "charsetlistbox.hxx"
      26             : #include <vcl/field.hxx>
      27             : #include <vcl/fixed.hxx>
      28             : #include <vcl/lstbox.hxx>
      29             : #include <vcl/edit.hxx>
      30             : #include <vcl/button.hxx>
      31             : #include "TextConnectionHelper.hxx"
      32             : #include "admincontrols.hxx"
      33             : 
      34             : #include <svtools/dialogcontrolling.hxx>
      35             : 
      36             : namespace dbaui
      37             : {
      38             :     // OCommonBehaviourTabPage
      39             :     #define     CBTP_NONE                           0x00000000
      40             :     #define     CBTP_USE_CHARSET                    0x00000002
      41             :     #define     CBTP_USE_OPTIONS                    0x00000004
      42             : 
      43             :     /** eases the implementation of tab pages handling user/password and/or character
      44             :         set and/or generic options input
      45             :         <BR>
      46             :         The controls to be used habe to be defined within the resource, as usual, but
      47             :         this class does all the handling necessary.
      48             :     */
      49             :     class OCommonBehaviourTabPage : public OGenericAdministrationPage
      50             :     {
      51             :     protected:
      52             : 
      53             :         FixedText*          m_pOptionsLabel;
      54             :         Edit*               m_pOptions;
      55             : 
      56             :         FixedLine*          m_pDataConvertFixedLine;
      57             :         FixedText*          m_pCharsetLabel;
      58             :         CharSetListBox*     m_pCharset;
      59             : 
      60             :         FixedLine*          m_pAutoFixedLine;
      61             :         CheckBox*           m_pAutoRetrievingEnabled;
      62             :         FixedText*          m_pAutoIncrementLabel;
      63             :         Edit*               m_pAutoIncrement;
      64             :         FixedText*          m_pAutoRetrievingLabel;
      65             :         Edit*               m_pAutoRetrieving;
      66             : 
      67             :         sal_uInt32          m_nControlFlags;
      68             : 
      69             :     public:
      70             :         virtual bool        FillItemSet (SfxItemSet& _rCoreAttrs) SAL_OVERRIDE;
      71             : 
      72             :         // nControlFlags is a combination of the CBTP_xxx-constants
      73             :         OCommonBehaviourTabPage(Window* pParent, sal_uInt16 nResId, const SfxItemSet& _rCoreAttrs, sal_uInt32 nControlFlags,bool _bFreeResource = true);
      74             :     protected:
      75             : 
      76             :         virtual ~OCommonBehaviourTabPage();
      77             : 
      78             :         // must be overloaded by subclasses, but it isn't pure virtual
      79             :         virtual void        implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE;
      80             : 
      81             :         // <method>OGenericAdministrationPage::fillControls</method>
      82             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
      83             : 
      84             :         // <method>OGenericAdministrationPage::fillWindows</method>
      85             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
      86             :     };
      87             : 
      88             :     // ODbaseDetailsPage
      89             :     class ODbaseDetailsPage : public OCommonBehaviourTabPage
      90             :     {
      91             :     public:
      92             :         virtual bool        FillItemSet ( SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE;
      93             : 
      94             :         ODbaseDetailsPage(Window* pParent, const SfxItemSet& _rCoreAttrs);
      95             :     private:
      96             :         // please add new controls also to <method>fillControls</method> or <method>fillWindows</method>
      97             :         CheckBox            m_aShowDeleted;
      98             :         FixedLine           m_aFL_1;
      99             :         FixedText           m_aFT_Message;
     100             :         PushButton          m_aIndexes;
     101             : 
     102             :         OUString            m_sDsn;
     103             : 
     104             :     protected:
     105             : 
     106             :         virtual ~ODbaseDetailsPage();
     107             : 
     108             :     protected:
     109             :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE;
     110             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     111             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     112             : 
     113             :     private:
     114             :         DECL_LINK( OnButtonClicked, Button * );
     115             :     };
     116             : 
     117             :     // OAdoDetailsPage
     118             :     class OAdoDetailsPage : public OCommonBehaviourTabPage
     119             :     {
     120             :     protected:
     121             :         virtual ~OAdoDetailsPage();
     122             :     public:
     123             : 
     124             :         OAdoDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
     125             :     };
     126             : 
     127             :     // OOdbcDetailsPage
     128           0 :     class OOdbcDetailsPage : public OCommonBehaviourTabPage
     129             :     {
     130             :     public:
     131             :         virtual bool        FillItemSet ( SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE;
     132             : 
     133             :         OOdbcDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
     134             :     protected:
     135             :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE;
     136             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     137             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     138             :     private:
     139             :         FixedLine           m_aFL_1;
     140             :         CheckBox            m_aUseCatalog;
     141             :     };
     142             : 
     143             :     // OUserDriverDetailsPage
     144           0 :     class OUserDriverDetailsPage : public OCommonBehaviourTabPage
     145             :     {
     146             :     public:
     147             :         virtual bool        FillItemSet ( SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE;
     148             : 
     149             :         OUserDriverDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
     150             :     protected:
     151             :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE;
     152             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     153             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     154             :     private:
     155             :         FixedText           m_aFTHostname;
     156             :         Edit                m_aEDHostname;
     157             :         FixedText           m_aPortNumber;
     158             :         NumericField        m_aNFPortNumber;
     159             :         CheckBox            m_aUseCatalog;
     160             :     };
     161             : 
     162             :     // OMySQLODBCDetailsPage
     163           0 :     class OMySQLODBCDetailsPage : public OCommonBehaviourTabPage
     164             :     {
     165             :     public:
     166             :         OMySQLODBCDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
     167             :     };
     168             : 
     169             :     // OGeneralSpecialJDBCDetailsPage
     170           0 :     class OGeneralSpecialJDBCDetailsPage : public OCommonBehaviourTabPage
     171             :     {
     172             :     public:
     173             :         OGeneralSpecialJDBCDetailsPage(   Window* pParent
     174             :                                         , sal_uInt16 _nResId
     175             :                                         , const SfxItemSet& _rCoreAttrs
     176             :                                         , sal_uInt16 _nPortId
     177             :                                         );
     178             : 
     179             :     protected:
     180             : 
     181             :         virtual bool FillItemSet( SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE;
     182             :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE;
     183             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     184             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     185             : 
     186             :         DECL_LINK(OnTestJavaClickHdl,PushButton*);
     187             :         DECL_LINK(OnEditModified,Edit*);
     188             : 
     189             :         FixedLine           m_aFL_1;
     190             :         FixedText           m_aFTHostname;
     191             :         Edit                m_aEDHostname;
     192             :         FixedText           m_aPortNumber;
     193             :         NumericField        m_aNFPortNumber;
     194             :         FixedText           m_aFTSocket;
     195             :         Edit                m_aEDSocket;
     196             : 
     197             :         FixedText           m_aFTDriverClass;
     198             :         Edit                m_aEDDriverClass;
     199             :         PushButton          m_aTestJavaDriver;
     200             : 
     201             :         OUString              m_sDefaultJdbcDriverName;
     202             :         sal_uInt16              m_nPortId;
     203             :         bool                m_bUseClass;
     204             :     };
     205             : 
     206             :     // MySQLNativePage
     207           0 :     class MySQLNativePage : public OCommonBehaviourTabPage
     208             :     {
     209             :     public:
     210             :         MySQLNativePage(    Window* pParent,
     211             :                             const SfxItemSet& _rCoreAttrs );
     212             : 
     213             :     private:
     214             :         FixedLine           m_aSeparator1;
     215             :         MySQLNativeSettings m_aMySQLSettings;
     216             : 
     217             :         FixedLine           m_aSeparator2;
     218             :         FixedText           m_aUserNameLabel;
     219             :         Edit                m_aUserName;
     220             :         CheckBox            m_aPasswordRequired;
     221             : 
     222             :     protected:
     223             :         virtual bool FillItemSet( SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE;
     224             :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE;
     225             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     226             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     227             :     };
     228             : 
     229             :     // OOdbcDetailsPage
     230           0 :     class OLDAPDetailsPage : public OCommonBehaviourTabPage
     231             :     {
     232             :     public:
     233             :         virtual bool        FillItemSet ( SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE;
     234             : 
     235             :         OLDAPDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
     236             :     protected:
     237             :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE;
     238             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     239             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     240             :     private:
     241             :         FixedLine           m_aFL_1;
     242             :         FixedText           m_aBaseDN;
     243             :         Edit                m_aETBaseDN;
     244             :         CheckBox            m_aCBUseSSL;
     245             :         FixedText           m_aPortNumber;
     246             :         NumericField        m_aNFPortNumber;
     247             :         FixedText           m_aFTRowCount;
     248             :         NumericField        m_aNFRowCount;
     249             : 
     250             :         sal_Int32           m_iSSLPort;
     251             :         sal_Int32           m_iNormalPort;
     252             :         DECL_LINK( OnCheckBoxClick, CheckBox * );
     253             :     };
     254             : 
     255             :     // OMozillaDetailsPage Detail page for Mozilla and Thunderbird addressbook
     256             :     class OMozillaDetailsPage : public OCommonBehaviourTabPage
     257             :     {
     258             :     protected:
     259             :         virtual ~OMozillaDetailsPage();
     260             :     public:
     261             : 
     262             :         OMozillaDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
     263             :     };
     264             : 
     265             :     // OTextDetailsPage
     266             :     class OTextDetailsPage : public OCommonBehaviourTabPage
     267             :     {
     268             :     public:
     269             :         virtual bool        FillItemSet ( SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE;
     270             : 
     271             :         OTextDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
     272             :         OTextConnectionHelper*  m_pTextConnectionHelper;
     273             : 
     274             :     private:
     275             : 
     276             :         OUString      m_aFieldSeparatorList;
     277             :         OUString      m_aTextSeparatorList;
     278             :         OUString      m_aTextNone;
     279             :     protected:
     280             :         virtual ~OTextDetailsPage();
     281             :         virtual sal_Bool prepareLeave() SAL_OVERRIDE;
     282             : 
     283             :         virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) SAL_OVERRIDE;
     284             :         virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     285             :         virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
     286             : 
     287             :     private:
     288             :     };
     289             : 
     290             : }   // namespace dbaui
     291             : 
     292             : #endif // INCLUDED_DBACCESS_SOURCE_UI_DLG_DETAILPAGES_HXX
     293             : 
     294             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10