LCOV - code coverage report
Current view: top level - sc/source/ui/inc - dpgroupdlg.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 0 3 0.0 %
Date: 2015-06-13 12:38:46 Functions: 0 5 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_SC_SOURCE_UI_INC_DPGROUPDLG_HXX
      21             : #define INCLUDED_SC_SOURCE_UI_INC_DPGROUPDLG_HXX
      22             : 
      23             : #include <vcl/fixed.hxx>
      24             : #include <vcl/dialog.hxx>
      25             : #include <vcl/button.hxx>
      26             : #include <vcl/field.hxx>
      27             : #include <svx/checklbx.hxx>
      28             : #include "editfield.hxx"
      29             : #include "dpgroup.hxx"
      30             : 
      31             : class ScDPGroupEditHelper
      32             : {
      33             : public:
      34             :     explicit            ScDPGroupEditHelper(
      35             :                             RadioButton* rRbAuto, RadioButton* rRbMan,
      36             :                             Edit* rEdValue );
      37             : 
      38             :     bool                IsAuto() const;
      39             :     double              GetValue() const;
      40             :     void                SetValue( bool bAuto, double fValue );
      41             : 
      42             : protected:
      43           0 :     ~ScDPGroupEditHelper() {}
      44             : 
      45             : private:
      46             :     virtual bool        ImplGetValue( double& rfValue ) const = 0;
      47             :     virtual void        ImplSetValue( double fValue ) = 0;
      48             : 
      49             :     DECL_LINK( ClickHdl, RadioButton* );
      50             : 
      51             : private:
      52             :     VclPtr<RadioButton>        mpRbAuto;
      53             :     VclPtr<RadioButton>        mpRbMan;
      54             :     VclPtr<Edit>               mpEdValue;
      55             : };
      56             : 
      57             : class ScDPNumGroupEditHelper : public ScDPGroupEditHelper
      58             : {
      59             : public:
      60             :     explicit            ScDPNumGroupEditHelper(
      61             :                             RadioButton* pRbAuto, RadioButton* pRbMan,
      62             :                             ScDoubleField* pEdValue );
      63             : 
      64           0 :     virtual             ~ScDPNumGroupEditHelper() {}
      65             : private:
      66             :     virtual bool        ImplGetValue( double& rfValue ) const SAL_OVERRIDE;
      67             :     virtual void        ImplSetValue( double fValue ) SAL_OVERRIDE;
      68             : 
      69             : private:
      70             :     VclPtr<ScDoubleField>      mpEdValue;
      71             : };
      72             : 
      73             : class ScDPDateGroupEditHelper : public ScDPGroupEditHelper
      74             : {
      75             : public:
      76             :     explicit            ScDPDateGroupEditHelper(
      77             :                             RadioButton* pRbAuto, RadioButton* pRbMan,
      78             :                             DateField* pEdValue, const Date& rNullDate );
      79             : 
      80           0 :     virtual ~ScDPDateGroupEditHelper() {}
      81             : 
      82             : private:
      83             :     virtual bool        ImplGetValue( double& rfValue ) const SAL_OVERRIDE;
      84             :     virtual void        ImplSetValue( double fValue ) SAL_OVERRIDE;
      85             : 
      86             : private:
      87             :     VclPtr<DateField>          mpEdValue;
      88             :     Date                maNullDate;
      89             : };
      90             : 
      91             : class ScDPNumGroupDlg : public ModalDialog
      92             : {
      93             : public:
      94             :     explicit            ScDPNumGroupDlg( vcl::Window* pParent, const ScDPNumGroupInfo& rInfo );
      95             :     virtual             ~ScDPNumGroupDlg();
      96             :     virtual void        dispose() SAL_OVERRIDE;
      97             :     ScDPNumGroupInfo    GetGroupInfo() const;
      98             : 
      99             : private:
     100             :     VclPtr<RadioButton>         mpRbAutoStart;
     101             :     VclPtr<RadioButton>         mpRbManStart;
     102             :     VclPtr<ScDoubleField>       mpEdStart;
     103             :     VclPtr<RadioButton>         mpRbAutoEnd;
     104             :     VclPtr<RadioButton>         mpRbManEnd;
     105             :     VclPtr<ScDoubleField>       mpEdEnd;
     106             :     VclPtr<ScDoubleField>       mpEdBy;
     107             :     ScDPNumGroupEditHelper maStartHelper;
     108             :     ScDPNumGroupEditHelper maEndHelper;
     109             : };
     110             : 
     111             : class ScDPDateGroupDlg : public ModalDialog
     112             : {
     113             : public:
     114             :     explicit            ScDPDateGroupDlg( vcl::Window* pParent, const ScDPNumGroupInfo& rInfo,
     115             :                             sal_Int32 nDatePart, const Date& rNullDate );
     116             :     virtual             ~ScDPDateGroupDlg();
     117             :     virtual void        dispose() SAL_OVERRIDE;
     118             :     ScDPNumGroupInfo    GetGroupInfo() const;
     119             :     sal_Int32           GetDatePart() const;
     120             : 
     121             : private:
     122             :     DECL_LINK( ClickHdl, RadioButton* );
     123             :     DECL_LINK( CheckHdl, SvxCheckListBox* );
     124             : 
     125             : private:
     126             :     VclPtr<RadioButton>         mpRbAutoStart;
     127             :     VclPtr<RadioButton>         mpRbManStart;
     128             :     VclPtr<DateField>           mpEdStart;
     129             :     VclPtr<RadioButton>         mpRbAutoEnd;
     130             :     VclPtr<RadioButton>         mpRbManEnd;
     131             :     VclPtr<DateField>           mpEdEnd;
     132             :     VclPtr<RadioButton>         mpRbNumDays;
     133             :     VclPtr<RadioButton>         mpRbUnits;
     134             :     VclPtr<NumericField>        mpEdNumDays;
     135             :     VclPtr<SvxCheckListBox>     mpLbUnits;
     136             :     VclPtr<OKButton>            mpBtnOk;
     137             :     ScDPDateGroupEditHelper maStartHelper;
     138             :     ScDPDateGroupEditHelper maEndHelper;
     139             : };
     140             : 
     141             : #endif
     142             : 
     143             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11