LCOV - code coverage report
Current view: top level - extensions/source/dbpilots - groupboxwiz.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 13 0.0 %
Date: 2014-04-14 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 _EXTENSIONS_DBP_GROUPBOXWIZ_HXX_
      21             : #define _EXTENSIONS_DBP_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             :         sal_Bool        m_bVisitedDefault   : 1;
      52             :         sal_Bool        m_bVisitedDB        : 1;
      53             : 
      54             :     public:
      55             :         OGroupBoxWizard(
      56             :             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 sal_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 ResId& _rId ) : OControlWizardPage(_pParent, _rId) { }
      83             : 
      84             :     protected:
      85           0 :         OOptionGroupSettings& getSettings() { return static_cast<OGroupBoxWizard*>(getDialog())->getSettings(); }
      86             :     };
      87             : 
      88             : 
      89             :     //= ORadioSelectionPage
      90             : 
      91           0 :     class ORadioSelectionPage : public OGBWPage
      92             :     {
      93             :     protected:
      94             :         FixedLine       m_aFrame;
      95             :         FixedText       m_aRadioNameLabel;
      96             :         Edit            m_aRadioName;
      97             :         PushButton      m_aMoveRight;
      98             :         PushButton      m_aMoveLeft;
      99             :         FixedText       m_aExistingRadiosLabel;
     100             :         ListBox         m_aExistingRadios;
     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             :         FixedLine       m_aFrame;
     128             :         FixedText       m_aDefaultSelectionLabel;
     129             :         RadioButton     m_aDefSelYes;
     130             :         RadioButton     m_aDefSelNo;
     131             :         ListBox         m_aDefSelection;
     132             : 
     133             :     public:
     134             :         ODefaultFieldSelectionPage( OControlWizard* _pParent );
     135             : 
     136             :     protected:
     137             :         // OWizardPage overridables
     138             :         virtual void        initializePage() SAL_OVERRIDE;
     139             :         virtual bool        commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) SAL_OVERRIDE;
     140             : 
     141           0 :         OOptionGroupSettings& getSettings() { return static_cast<OGroupBoxWizard*>(getDialog())->getSettings(); }
     142             :     };
     143             : 
     144             : 
     145             :     //= OOptionValuesPage
     146             : 
     147           0 :     class OOptionValuesPage : public OGBWPage
     148             :     {
     149             :     protected:
     150             :         FixedLine       m_aFrame;
     151             :         FixedText       m_aDescription;
     152             :         FixedText       m_aValueLabel;
     153             :         Edit            m_aValue;
     154             :         FixedText       m_aOptionsLabel;
     155             :         ListBox         m_aOptions;
     156             : 
     157             :         StringArray     m_aUncommittedValues;
     158             :         ::svt::WizardTypes::WizardState
     159             :                         m_nLastSelection;
     160             : 
     161             :     public:
     162             :         OOptionValuesPage( OControlWizard* _pParent );
     163             : 
     164             :     protected:
     165             :         // TabPage overridables
     166             :         void ActivatePage() SAL_OVERRIDE;
     167             : 
     168             :         // OWizardPage overridables
     169             :         virtual void        initializePage() SAL_OVERRIDE;
     170             :         virtual bool        commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) SAL_OVERRIDE;
     171             : 
     172             :         void implTraveledOptions();
     173             : 
     174             :         DECL_LINK( OnOptionSelected, ListBox* );
     175             :     };
     176             : 
     177             : 
     178             :     //= OOptionDBFieldPage
     179             : 
     180           0 :     class OOptionDBFieldPage : public ODBFieldPage
     181             :     {
     182             :     public:
     183             :         OOptionDBFieldPage( OControlWizard* _pParent );
     184             : 
     185             :     protected:
     186           0 :         OOptionGroupSettings& getSettings() { return static_cast<OGroupBoxWizard*>(getDialog())->getSettings(); }
     187             : 
     188             :         // ODBFieldPage overridables
     189             :         virtual OUString& getDBFieldSetting() SAL_OVERRIDE;
     190             :     };
     191             : 
     192             : 
     193             :     //= OFinalizeGBWPage
     194             : 
     195           0 :     class OFinalizeGBWPage : public OGBWPage
     196             :     {
     197             :     protected:
     198             :         FixedLine       m_aFrame;
     199             :         FixedText       m_aNameLabel;
     200             :         Edit            m_aName;
     201             :         FixedText       m_aThatsAll;
     202             : 
     203             :     public:
     204             :         OFinalizeGBWPage( OControlWizard* _pParent );
     205             : 
     206             :     protected:
     207             :         // TabPage overridables
     208             :         void ActivatePage() SAL_OVERRIDE;
     209             : 
     210             :         // OWizardPage overridables
     211             :         virtual void        initializePage() SAL_OVERRIDE;
     212             :         virtual bool        commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) SAL_OVERRIDE;
     213             :         virtual bool        canAdvance() const SAL_OVERRIDE;
     214             :     };
     215             : 
     216             : 
     217             : }   // namespace dbp
     218             : 
     219             : 
     220             : #endif // _EXTENSIONS_DBP_GROUPBOXWIZ_HXX_
     221             : 
     222             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10