LCOV - code coverage report
Current view: top level - extensions/source/dbpilots - gridwizard.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 7 0.0 %
Date: 2014-11-03 Functions: 0 11 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_GRIDWIZARD_HXX
      21             : #define INCLUDED_EXTENSIONS_SOURCE_DBPILOTS_GRIDWIZARD_HXX
      22             : 
      23             : #include "controlwizard.hxx"
      24             : #include "commonpagesdbp.hxx"
      25             : 
      26             : 
      27             : namespace dbp
      28             : {
      29             : 
      30             : 
      31             : 
      32             :     //= OGridSettings
      33             : 
      34           0 :     struct OGridSettings : public OControlWizardSettings
      35             :     {
      36             :         ::com::sun::star::uno::Sequence< OUString >      aSelectedFields;
      37             :     };
      38             : 
      39             : 
      40             :     //= OGridWizard
      41             : 
      42           0 :     class OGridWizard : public OControlWizard
      43             :     {
      44             :     protected:
      45             :         OGridSettings   m_aSettings;
      46             :         bool        m_bHadDataSelection : 1;
      47             : 
      48             :     public:
      49             :         OGridWizard(
      50             :             vcl::Window* _pParent,
      51             :             const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObjectModel,
      52             :             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext
      53             :         );
      54             : 
      55           0 :         OGridSettings& getSettings() { return m_aSettings; }
      56             : 
      57             :     protected:
      58             :         // OWizardMachine overridables
      59             :         virtual ::svt::OWizardPage* createPage( WizardState _nState ) SAL_OVERRIDE;
      60             :         virtual WizardState         determineNextState( WizardState _nCurrentState ) const SAL_OVERRIDE;
      61             :         virtual void                enterState( WizardState _nState ) SAL_OVERRIDE;
      62             :         virtual bool                leaveState( WizardState _nState ) SAL_OVERRIDE;
      63             :         virtual bool                onFinish() SAL_OVERRIDE;
      64             : 
      65             :         virtual bool                approveControl(sal_Int16 _nClassId) SAL_OVERRIDE;
      66             : 
      67             :     protected:
      68             :         void implApplySettings();
      69             :     };
      70             : 
      71             :     //= OGridPage
      72           0 :     class OGridPage : public OControlWizardPage
      73             :     {
      74             :     public:
      75           0 :         OGridPage( OGridWizard* _pParent, const OString& _rID, const OUString& _rUIXMLDescription ) : OControlWizardPage(_pParent, _rID, _rUIXMLDescription) { }
      76             : 
      77             :     protected:
      78           0 :         OGridSettings& getSettings() { return static_cast<OGridWizard*>(getDialog())->getSettings(); }
      79             :     };
      80             : 
      81             :     //= OGridFieldsSelection
      82           0 :     class OGridFieldsSelection : public OGridPage
      83             :     {
      84             :     protected:
      85             :         ListBox         *m_pExistFields;
      86             :         PushButton      *m_pSelectOne;
      87             :         PushButton      *m_pSelectAll;
      88             :         PushButton      *m_pDeselectOne;
      89             :         PushButton      *m_pDeselectAll;
      90             :         ListBox         *m_pSelFields;
      91             : 
      92             :     public:
      93             :         OGridFieldsSelection( OGridWizard* _pParent );
      94             : 
      95             :     protected:
      96             :         // TabPage overridables
      97             :         virtual void ActivatePage() SAL_OVERRIDE;
      98             : 
      99             :         // OWizardPage overridables
     100             :         virtual void        initializePage() SAL_OVERRIDE;
     101             :         virtual bool        commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) SAL_OVERRIDE;
     102             :         virtual bool        canAdvance() const SAL_OVERRIDE;
     103             : 
     104             :     protected:
     105             :         DECL_LINK(OnMoveOneEntry, PushButton*);
     106             :         DECL_LINK(OnMoveAllEntries, PushButton*);
     107             :         DECL_LINK(OnEntrySelected, ListBox*);
     108             :         DECL_LINK(OnEntryDoubleClicked, ListBox*);
     109             : 
     110             :         void implCheckButtons();
     111             :         void implApplySettings();
     112             : 
     113             :         ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > implGetColumns(bool _bShowError = true);
     114             :     };
     115             : 
     116             : 
     117             : }   // namespace dbp
     118             : 
     119             : 
     120             : #endif // INCLUDED_EXTENSIONS_SOURCE_DBPILOTS_GRIDWIZARD_HXX
     121             : 
     122             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10