LibreOffice Module sc (master) 1
dpgroupdlg.hxx
Go to the documentation of this file.
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#pragma once
21
22#include <vcl/weld.hxx>
23#include <dpnumgroupinfo.hxx>
24
25class ScDoubleField;
26class SvtCalendarBox;
27
29{
30public:
31 explicit ScDPGroupEditHelper(weld::RadioButton& rRbAuto,
32 weld::RadioButton& rRbMan,
33 weld::Widget& rEdValue);
34
35 bool IsAuto() const;
36 double GetValue() const;
37 void SetValue( bool bAuto, double fValue );
38
39protected:
41
42private:
43 virtual bool ImplGetValue( double& rfValue ) const = 0;
44 virtual void ImplSetValue( double fValue ) = 0;
45
46 DECL_LINK(ToggleHdl, weld::Toggleable&, void);
47
48private:
52};
53
55{
56public:
58 weld::RadioButton& rRbMan,
59 ScDoubleField& rEdValue);
60
62private:
63 virtual bool ImplGetValue( double& rfValue ) const override;
64 virtual void ImplSetValue( double fValue ) override;
65
66private:
68};
69
71{
72public:
74 weld::RadioButton& rRbMan,
75 SvtCalendarBox& rEdValue,
76 const Date& rNullDate);
77
79
80private:
81 virtual bool ImplGetValue( double& rfValue ) const override;
82 virtual void ImplSetValue( double fValue ) override;
83
84private:
87};
88
90{
91public:
92 explicit ScDPNumGroupDlg(weld::Window* pParent, const ScDPNumGroupInfo& rInfo);
93 virtual ~ScDPNumGroupDlg() override;
95
96private:
97 std::unique_ptr<weld::RadioButton> mxRbAutoStart;
98 std::unique_ptr<weld::RadioButton> mxRbManStart;
99 std::unique_ptr<ScDoubleField> mxEdStart;
100 std::unique_ptr<weld::RadioButton> mxRbAutoEnd;
101 std::unique_ptr<weld::RadioButton> mxRbManEnd;
102 std::unique_ptr<ScDoubleField> mxEdEnd;
103 std::unique_ptr<ScDoubleField> mxEdBy;
106};
107
109{
110public:
111 explicit ScDPDateGroupDlg(weld::Window* pParent, const ScDPNumGroupInfo& rInfo,
112 sal_Int32 nDatePart, const Date& rNullDate);
113 virtual ~ScDPDateGroupDlg() override;
115 sal_Int32 GetDatePart() const;
116
117private:
118 DECL_LINK(ToggleHdl, weld::Toggleable&, void);
119 DECL_LINK(CheckHdl, const weld::TreeView::iter_col&, void);
120
121 void Check();
122private:
123 std::unique_ptr<weld::RadioButton> mxRbAutoStart;
124 std::unique_ptr<weld::RadioButton> mxRbManStart;
125 std::unique_ptr<SvtCalendarBox> mxEdStart;
126 std::unique_ptr<weld::RadioButton> mxRbAutoEnd;
127 std::unique_ptr<weld::RadioButton> mxRbManEnd;
128 std::unique_ptr<SvtCalendarBox> mxEdEnd;
129 std::unique_ptr<weld::RadioButton> mxRbNumDays;
130 std::unique_ptr<weld::RadioButton> mxRbUnits;
131 std::unique_ptr<weld::SpinButton> mxEdNumDays;
132 std::unique_ptr<weld::TreeView> mxLbUnits;
133 std::unique_ptr<weld::Button> mxBtnOk;
136};
137
138/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScDPDateGroupEditHelper maStartHelper
Definition: dpgroupdlg.hxx:134
DECL_LINK(CheckHdl, const weld::TreeView::iter_col &, void)
ScDPDateGroupDlg(weld::Window *pParent, const ScDPNumGroupInfo &rInfo, sal_Int32 nDatePart, const Date &rNullDate)
Definition: dpgroupdlg.cxx:202
std::unique_ptr< weld::RadioButton > mxRbNumDays
Definition: dpgroupdlg.hxx:129
sal_Int32 GetDatePart() const
Definition: dpgroupdlg.cxx:291
std::unique_ptr< weld::RadioButton > mxRbUnits
Definition: dpgroupdlg.hxx:130
ScDPNumGroupInfo GetGroupInfo() const
Definition: dpgroupdlg.cxx:271
std::unique_ptr< weld::Button > mxBtnOk
Definition: dpgroupdlg.hxx:133
std::unique_ptr< weld::SpinButton > mxEdNumDays
Definition: dpgroupdlg.hxx:131
std::unique_ptr< weld::RadioButton > mxRbAutoEnd
Definition: dpgroupdlg.hxx:126
DECL_LINK(ToggleHdl, weld::Toggleable &, void)
ScDPDateGroupEditHelper maEndHelper
Definition: dpgroupdlg.hxx:135
virtual ~ScDPDateGroupDlg() override
Definition: dpgroupdlg.cxx:267
std::unique_ptr< weld::TreeView > mxLbUnits
Definition: dpgroupdlg.hxx:132
std::unique_ptr< weld::RadioButton > mxRbManStart
Definition: dpgroupdlg.hxx:124
std::unique_ptr< weld::RadioButton > mxRbAutoStart
Definition: dpgroupdlg.hxx:123
std::unique_ptr< weld::RadioButton > mxRbManEnd
Definition: dpgroupdlg.hxx:127
std::unique_ptr< SvtCalendarBox > mxEdStart
Definition: dpgroupdlg.hxx:125
std::unique_ptr< SvtCalendarBox > mxEdEnd
Definition: dpgroupdlg.hxx:128
SvtCalendarBox & mrEdValue
Definition: dpgroupdlg.hxx:85
virtual bool ImplGetValue(double &rfValue) const override
Definition: dpgroupdlg.cxx:139
ScDPDateGroupEditHelper(weld::RadioButton &rRbAuto, weld::RadioButton &rRbMan, SvtCalendarBox &rEdValue, const Date &rNullDate)
Definition: dpgroupdlg.cxx:131
virtual void ImplSetValue(double fValue) override
Definition: dpgroupdlg.cxx:145
virtual ~ScDPDateGroupEditHelper()
Definition: dpgroupdlg.hxx:78
DECL_LINK(ToggleHdl, weld::Toggleable &, void)
weld::Widget & mrEdValue
Definition: dpgroupdlg.hxx:51
bool IsAuto() const
Definition: dpgroupdlg.cxx:68
double GetValue() const
Definition: dpgroupdlg.cxx:73
virtual bool ImplGetValue(double &rfValue) const =0
ScDPGroupEditHelper(weld::RadioButton &rRbAuto, weld::RadioButton &rRbMan, weld::Widget &rEdValue)
Definition: dpgroupdlg.cxx:59
weld::RadioButton & mrRbMan
Definition: dpgroupdlg.hxx:50
void SetValue(bool bAuto, double fValue)
Definition: dpgroupdlg.cxx:81
virtual void ImplSetValue(double fValue)=0
weld::RadioButton & mrRbAuto
Definition: dpgroupdlg.hxx:49
virtual ~ScDPNumGroupDlg() override
Definition: dpgroupdlg.cxx:178
ScDPNumGroupInfo GetGroupInfo() const
Definition: dpgroupdlg.cxx:182
std::unique_ptr< ScDoubleField > mxEdStart
Definition: dpgroupdlg.hxx:99
std::unique_ptr< weld::RadioButton > mxRbManStart
Definition: dpgroupdlg.hxx:98
std::unique_ptr< weld::RadioButton > mxRbManEnd
Definition: dpgroupdlg.hxx:101
std::unique_ptr< weld::RadioButton > mxRbAutoStart
Definition: dpgroupdlg.hxx:97
ScDPNumGroupEditHelper maEndHelper
Definition: dpgroupdlg.hxx:105
std::unique_ptr< weld::RadioButton > mxRbAutoEnd
Definition: dpgroupdlg.hxx:100
std::unique_ptr< ScDoubleField > mxEdEnd
Definition: dpgroupdlg.hxx:102
std::unique_ptr< ScDoubleField > mxEdBy
Definition: dpgroupdlg.hxx:103
ScDPNumGroupEditHelper maStartHelper
Definition: dpgroupdlg.hxx:104
ScDPNumGroupDlg(weld::Window *pParent, const ScDPNumGroupInfo &rInfo)
Definition: dpgroupdlg.cxx:152
virtual void ImplSetValue(double fValue) override
Definition: dpgroupdlg.cxx:126
ScDPNumGroupEditHelper(weld::RadioButton &rRbAuto, weld::RadioButton &rRbMan, ScDoubleField &rEdValue)
Definition: dpgroupdlg.cxx:114
virtual bool ImplGetValue(double &rfValue) const override
Definition: dpgroupdlg.cxx:121
ScDoubleField & mrEdValue
Definition: dpgroupdlg.hxx:67
virtual ~ScDPNumGroupEditHelper()
Definition: dpgroupdlg.hxx:61
An edit control that contains a double precision floating-point value.
Definition: editfield.hxx:26
std::pair< const TreeIter &, int > iter_col