LCOV - code coverage report
Current view: top level - sc/source/ui/inc - dpgroupdlg.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 5 0.0 %
Date: 2014-04-14 Functions: 0 9 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 SC_DPGROUPDLG_HXX
      21             : #define SC_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             : 
      46             : private:
      47             :     virtual bool        ImplGetValue( double& rfValue ) const = 0;
      48             :     virtual void        ImplSetValue( double fValue ) = 0;
      49             : 
      50             :     DECL_LINK( ClickHdl, RadioButton* );
      51             : 
      52             : private:
      53             :     RadioButton*        mpRbAuto;
      54             :     RadioButton*        mpRbMan;
      55             :     Edit*               mpEdValue;
      56             : };
      57             : 
      58             : class ScDPNumGroupEditHelper : public ScDPGroupEditHelper
      59             : {
      60             : public:
      61             :     explicit            ScDPNumGroupEditHelper(
      62             :                             RadioButton* pRbAuto, RadioButton* pRbMan,
      63             :                             ScDoubleField* pEdValue );
      64             : 
      65           0 :     virtual ~ScDPNumGroupEditHelper() {}
      66             : 
      67             : private:
      68             :     virtual bool        ImplGetValue( double& rfValue ) const SAL_OVERRIDE;
      69             :     virtual void        ImplSetValue( double fValue ) SAL_OVERRIDE;
      70             : 
      71             : private:
      72             :     ScDoubleField*      mpEdValue;
      73             : };
      74             : 
      75             : class ScDPDateGroupEditHelper : public ScDPGroupEditHelper
      76             : {
      77             : public:
      78             :     explicit            ScDPDateGroupEditHelper(
      79             :                             RadioButton* pRbAuto, RadioButton* pRbMan,
      80             :                             DateField* pEdValue, const Date& rNullDate );
      81             : 
      82           0 :     virtual ~ScDPDateGroupEditHelper() {}
      83             : 
      84             : private:
      85             :     virtual bool        ImplGetValue( double& rfValue ) const SAL_OVERRIDE;
      86             :     virtual void        ImplSetValue( double fValue ) SAL_OVERRIDE;
      87             : 
      88             : private:
      89             :     DateField*          mpEdValue;
      90             :     Date                maNullDate;
      91             : };
      92             : 
      93             : 
      94           0 : class ScDPNumGroupDlg : public ModalDialog
      95             : {
      96             : public:
      97             :     explicit            ScDPNumGroupDlg( Window* pParent, const ScDPNumGroupInfo& rInfo );
      98             : 
      99             :     ScDPNumGroupInfo    GetGroupInfo() const;
     100             : 
     101             : private:
     102             :     RadioButton*         mpRbAutoStart;
     103             :     RadioButton*         mpRbManStart;
     104             :     ScDoubleField*       mpEdStart;
     105             :     RadioButton*         mpRbAutoEnd;
     106             :     RadioButton*         mpRbManEnd;
     107             :     ScDoubleField*       mpEdEnd;
     108             :     ScDoubleField*       mpEdBy;
     109             :     OKButton*            mpBtnOk;
     110             :     ScDPNumGroupEditHelper maStartHelper;
     111             :     ScDPNumGroupEditHelper maEndHelper;
     112             : };
     113             : 
     114           0 : class ScDPDateGroupDlg : public ModalDialog
     115             : {
     116             : public:
     117             :     explicit            ScDPDateGroupDlg( Window* pParent, const ScDPNumGroupInfo& rInfo,
     118             :                             sal_Int32 nDatePart, const Date& rNullDate );
     119             : 
     120             :     ScDPNumGroupInfo    GetGroupInfo() const;
     121             :     sal_Int32           GetDatePart() const;
     122             : 
     123             : private:
     124             :     DECL_LINK( ClickHdl, RadioButton* );
     125             :     DECL_LINK( CheckHdl, SvxCheckListBox* );
     126             : 
     127             : private:
     128             :     RadioButton*         mpRbAutoStart;
     129             :     RadioButton*         mpRbManStart;
     130             :     DateField*           mpEdStart;
     131             :     RadioButton*         mpRbAutoEnd;
     132             :     RadioButton*         mpRbManEnd;
     133             :     DateField*           mpEdEnd;
     134             :     RadioButton*         mpRbNumDays;
     135             :     RadioButton*         mpRbUnits;
     136             :     NumericField*        mpEdNumDays;
     137             :     SvxCheckListBox*     mpLbUnits;
     138             :     OKButton*            mpBtnOk;
     139             :     ScDPDateGroupEditHelper maStartHelper;
     140             :     ScDPDateGroupEditHelper maEndHelper;
     141             : };
     142             : 
     143             : #endif
     144             : 
     145             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10