LCOV - code coverage report
Current view: top level - extensions/source/dbpilots - groupboxwiz.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 15 0.0 %
Date: 2014-11-03 Functions: 0 21 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_EXTENSIONS_SOURCE_DBPILOTS_GROUPBOXWIZ_HXX
      21             : #define INCLUDED_EXTENSIONS_SOURCE_DBPILOTS_GROUPBOXWIZ_HXX
      22             : 
      23             : #include "controlwizard.hxx"
      24             : #include "commonpagesdbp.hxx"
      25             : 
      26             : 
      27             : namespace dbp
      28             : {
      29             : 
      30             : 
      31             : 
      32             :     //= OOptionGroupSettings
      33             : 
      34           0 :     struct OOptionGroupSettings : public OControlWizardSettings
      35             :     {
      36             :         StringArray     aLabels;
      37             :         StringArray     aValues;
      38             :         OUString        sDefaultField;
      39             :         OUString        sDBField;
      40             :         OUString        sName;
      41             :     };
      42             : 
      43             : 
      44             :     //= OGroupBoxWizard
      45             : 
      46           0 :     class OGroupBoxWizard : public OControlWizard
      47             :     {
      48             :     protected:
      49             :         OOptionGroupSettings        m_aSettings;
      50             : 
      51             :         bool        m_bVisitedDefault   : 1;
      52             :         bool        m_bVisitedDB        : 1;
      53             : 
      54             :     public:
      55             :         OGroupBoxWizard(
      56             :             vcl::Window* _pParent,
      57             :             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObjectModel,
      58             :             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext
      59             :         );
      60             : 
      61           0 :         OOptionGroupSettings& getSettings() { return m_aSettings; }
      62             : 
      63             :     protected:
      64             :         // OWizardMachine overridables
      65             :         virtual ::svt::OWizardPage* createPage( WizardState _nState ) SAL_OVERRIDE;
      66             :         virtual WizardState         determineNextState( WizardState _nCurrentState ) const SAL_OVERRIDE;
      67             :         virtual void                enterState( WizardState _nState ) SAL_OVERRIDE;
      68             :         virtual bool                onFinish() SAL_OVERRIDE;
      69             : 
      70             :         virtual bool                approveControl(sal_Int16 _nClassId) SAL_OVERRIDE;
      71             : 
      72             :     protected:
      73             :         void createRadios();
      74             :     };
      75             : 
      76             : 
      77             :     //= OGBWPage
      78             : 
      79           0 :     class OGBWPage : public OControlWizardPage
      80             :     {
      81             :     public:
      82           0 :         OGBWPage(OControlWizard* _pParent, const OString& _rID, const OUString& _rUIXMLDescription)
      83           0 :             : OControlWizardPage(_pParent, _rID, _rUIXMLDescription)
      84             :     {
      85           0 :     }
      86             : 
      87             :     protected:
      88           0 :         OOptionGroupSettings& getSettings() { return static_cast<OGroupBoxWizard*>(getDialog())->getSettings(); }
      89             :     };
      90             : 
      91             : 
      92             :     //= ORadioSelectionPage
      93             : 
      94           0 :     class ORadioSelectionPage : public OGBWPage
      95             :     {
      96             :     protected:
      97             :         Edit            *m_pRadioName;
      98             :         PushButton      *m_pMoveRight;
      99             :         PushButton      *m_pMoveLeft;
     100             :         ListBox         *m_pExistingRadios;
     101             : 
     102             :     public:
     103             :         ORadioSelectionPage( OControlWizard* _pParent );
     104             : 
     105             :     protected:
     106             :         // TabPage overridables
     107             :         void ActivatePage() SAL_OVERRIDE;
     108             : 
     109             :         // OWizardPage overridables
     110             :         virtual void        initializePage() SAL_OVERRIDE;
     111             :         virtual bool        commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) SAL_OVERRIDE;
     112             :         virtual bool        canAdvance() const SAL_OVERRIDE;
     113             : 
     114             :         DECL_LINK( OnMoveEntry, PushButton* );
     115             :         DECL_LINK( OnEntrySelected, ListBox* );
     116             :         DECL_LINK( OnNameModified, Edit* );
     117             : 
     118             :         void implCheckMoveButtons();
     119             :     };
     120             : 
     121             : 
     122             :     //= ODefaultFieldSelectionPage
     123             : 
     124           0 :     class ODefaultFieldSelectionPage : public OMaybeListSelectionPage
     125             :     {
     126             :     protected:
     127             :         RadioButton     *m_pDefSelYes;
     128             :         RadioButton     *m_pDefSelNo;
     129             :         ListBox         *m_pDefSelection;
     130             : 
     131             :     public:
     132             :         ODefaultFieldSelectionPage( OControlWizard* _pParent );
     133             : 
     134             :     protected:
     135             :         // OWizardPage overridables
     136             :         virtual void        initializePage() SAL_OVERRIDE;
     137             :         virtual bool        commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) SAL_OVERRIDE;
     138             : 
     139           0 :         OOptionGroupSettings& getSettings() { return static_cast<OGroupBoxWizard*>(getDialog())->getSettings(); }
     140             :     };
     141             : 
     142             : 
     143             :     //= OOptionValuesPage
     144             : 
     145           0 :     class OOptionValuesPage : public OGBWPage
     146             :     {
     147             :     protected:
     148             :         Edit            *m_pValue;
     149             :         ListBox         *m_pOptions;
     150             : 
     151             :         StringArray     m_aUncommittedValues;
     152             :         ::svt::WizardTypes::WizardState
     153             :                         m_nLastSelection;
     154             : 
     155             :     public:
     156             :         OOptionValuesPage( OControlWizard* _pParent );
     157             : 
     158             :     protected:
     159             :         // TabPage overridables
     160             :         void ActivatePage() SAL_OVERRIDE;
     161             : 
     162             :         // OWizardPage overridables
     163             :         virtual void        initializePage() SAL_OVERRIDE;
     164             :         virtual bool        commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) SAL_OVERRIDE;
     165             : 
     166             :         void implTraveledOptions();
     167             : 
     168             :         DECL_LINK( OnOptionSelected, ListBox* );
     169             :     };
     170             : 
     171             : 
     172             :     //= OOptionDBFieldPage
     173             : 
     174           0 :     class OOptionDBFieldPage : public ODBFieldPage
     175             :     {
     176             :     public:
     177             :         OOptionDBFieldPage( OControlWizard* _pParent );
     178             : 
     179             :     protected:
     180           0 :         OOptionGroupSettings& getSettings() { return static_cast<OGroupBoxWizard*>(getDialog())->getSettings(); }
     181             : 
     182             :         // ODBFieldPage overridables
     183             :         virtual OUString& getDBFieldSetting() SAL_OVERRIDE;
     184             :     };
     185             : 
     186             : 
     187             :     //= OFinalizeGBWPage
     188             : 
     189           0 :     class OFinalizeGBWPage : public OGBWPage
     190             :     {
     191             :     protected:
     192             :         Edit            *m_pName;
     193             : 
     194             :     public:
     195             :         OFinalizeGBWPage( OControlWizard* _pParent );
     196             : 
     197             :     protected:
     198             :         // TabPage overridables
     199             :         void ActivatePage() SAL_OVERRIDE;
     200             : 
     201             :         // OWizardPage overridables
     202             :         virtual void        initializePage() SAL_OVERRIDE;
     203             :         virtual bool        commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) SAL_OVERRIDE;
     204             :         virtual bool        canAdvance() const SAL_OVERRIDE;
     205             :     };
     206             : 
     207             : 
     208             : }   // namespace dbp
     209             : 
     210             : 
     211             : #endif // INCLUDED_EXTENSIONS_SOURCE_DBPILOTS_GROUPBOXWIZ_HXX
     212             : 
     213             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10