LibreOffice Module sc (master) 1
StatisticsTwoVariableDialog.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 */
10
11#pragma once
12
13#include <address.hxx>
14#include "anyrefdg.hxx"
15#include "viewdata.hxx"
16
18{
19public:
20 enum GroupedBy {
22 BY_ROW
23 };
24
27 weld::Window* pParent, ScViewData& rViewData,
28 const OUString& rUIXMLDescription, const OString& rID);
29
30 virtual ~ScStatisticsTwoVariableDialog() override;
31
32 virtual void SetReference( const ScRange& rRef, ScDocument& rDoc ) override;
33 virtual void SetActive() override;
34
35protected:
37
38 virtual ScRange ApplyOutput(ScDocShell* pDocShell) = 0;
40 virtual bool InputRangesValid();
42
43 // Widgets
44 std::unique_ptr<weld::Label> mxVariable1RangeLabel;
45 std::unique_ptr<formula::RefEdit> mxVariable1RangeEdit;
46 std::unique_ptr<formula::RefButton> mxVariable1RangeButton;
47
48 std::unique_ptr<weld::Label> mxVariable2RangeLabel;
49 std::unique_ptr<formula::RefEdit> mxVariable2RangeEdit;
50 std::unique_ptr<formula::RefButton> mxVariable2RangeButton;
51
52 std::unique_ptr<weld::Label> mxOutputRangeLabel;
53 std::unique_ptr<formula::RefEdit> mxOutputRangeEdit;
54 std::unique_ptr<formula::RefButton> mxOutputRangeButton;
55
56 // Data
59
62
66
67private:
68 // Widgets
69 std::unique_ptr<weld::Button> mxButtonOk;
70 std::unique_ptr<weld::Button> mxButtonCancel;
71
72 std::unique_ptr<weld::RadioButton> mxGroupByColumnsRadio;
73 std::unique_ptr<weld::RadioButton> mxGroupByRowsRadio;
74
78
79 void Init();
81
82 DECL_LINK( GroupByChanged, weld::Toggleable&, void );
83 DECL_LINK( ButtonClicked, weld::Button&, void );
84 DECL_LINK( GetEditFocusHandler, formula::RefEdit&, void );
85 DECL_LINK( GetButtonFocusHandler, formula::RefButton&, void );
86 DECL_LINK( LoseEditFocusHandler, formula::RefEdit&, void );
87 DECL_LINK( LoseButtonFocusHandler, formula::RefButton&, void );
88 DECL_LINK( RefInputModifyHandler, formula::RefEdit&, void );
89};
90
91/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< formula::RefEdit > mxVariable2RangeEdit
DECL_LINK(ButtonClicked, weld::Button &, void)
std::unique_ptr< weld::Button > mxButtonCancel
std::unique_ptr< formula::RefEdit > mxVariable1RangeEdit
std::unique_ptr< weld::Button > mxButtonOk
DECL_LINK(GetEditFocusHandler, formula::RefEdit &, void)
std::unique_ptr< formula::RefButton > mxOutputRangeButton
std::unique_ptr< weld::RadioButton > mxGroupByRowsRadio
std::unique_ptr< weld::Label > mxOutputRangeLabel
DECL_LINK(LoseEditFocusHandler, formula::RefEdit &, void)
std::unique_ptr< formula::RefButton > mxVariable1RangeButton
std::unique_ptr< weld::RadioButton > mxGroupByColumnsRadio
virtual ScRange ApplyOutput(ScDocShell *pDocShell)=0
std::unique_ptr< formula::RefEdit > mxOutputRangeEdit
std::unique_ptr< formula::RefButton > mxVariable2RangeButton
virtual TranslateId GetUndoNameId()=0
DECL_LINK(RefInputModifyHandler, formula::RefEdit &, void)
ScStatisticsTwoVariableDialog(SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScViewData &rViewData, const OUString &rUIXMLDescription, const OString &rID)
DECL_LINK(LoseButtonFocusHandler, formula::RefButton &, void)
DECL_LINK(GetButtonFocusHandler, formula::RefButton &, void)
std::unique_ptr< weld::Label > mxVariable1RangeLabel
std::unique_ptr< weld::Label > mxVariable2RangeLabel
virtual void SetReference(const ScRange &rRef, ScDocument &rDoc) override
DECL_LINK(GroupByChanged, weld::Toggleable &, void)