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 #ifndef INCLUDED_SC_SOURCE_UI_INC_STATISTICSTWOVARIABLEDIALOG_HXX
12 #define INCLUDED_SC_SOURCE_UI_INC_STATISTICSTWOVARIABLEDIALOG_HXX
13 
14 #include <address.hxx>
15 #include "anyrefdg.hxx"
16 #include "viewdata.hxx"
17 
19 {
20 public:
21  enum GroupedBy {
24  };
25 
27  SfxBindings* pB, SfxChildWindow* pCW,
28  weld::Window* pParent, ScViewData& rViewData,
29  const OUString& rUIXMLDescription, const OString& rID);
30 
31  virtual ~ScStatisticsTwoVariableDialog() override;
32 
33  virtual void SetReference( const ScRange& rRef, ScDocument& rDoc ) override;
34  virtual void SetActive() override;
35 
36 protected:
38 
39  virtual ScRange ApplyOutput(ScDocShell* pDocShell) = 0;
40  virtual const char* GetUndoNameId() = 0;
41  virtual bool InputRangesValid();
42  void ValidateDialogInput();
43 
44  // Widgets
45  std::unique_ptr<weld::Label> mxVariable1RangeLabel;
46  std::unique_ptr<formula::RefEdit> mxVariable1RangeEdit;
47  std::unique_ptr<formula::RefButton> mxVariable1RangeButton;
48 
49  std::unique_ptr<weld::Label> mxVariable2RangeLabel;
50  std::unique_ptr<formula::RefEdit> mxVariable2RangeEdit;
51  std::unique_ptr<formula::RefButton> mxVariable2RangeButton;
52 
53  std::unique_ptr<weld::Label> mxOutputRangeLabel;
54  std::unique_ptr<formula::RefEdit> mxOutputRangeEdit;
55  std::unique_ptr<formula::RefButton> mxOutputRangeButton;
56 
57  // Data
60 
63 
67 
68 private:
69  // Widgets
70  std::unique_ptr<weld::Button> mxButtonOk;
71  std::unique_ptr<weld::Button> mxButtonCancel;
72 
73  std::unique_ptr<weld::RadioButton> mxGroupByColumnsRadio;
74  std::unique_ptr<weld::RadioButton> mxGroupByRowsRadio;
75 
79 
80  void Init();
81  void GetRangeFromSelection();
82 
83  DECL_LINK( GroupByChanged, weld::ToggleButton&, void );
84  DECL_LINK( ButtonClicked, weld::Button&, void );
85  DECL_LINK( GetEditFocusHandler, formula::RefEdit&, void );
86  DECL_LINK( GetButtonFocusHandler, formula::RefButton&, void );
87  DECL_LINK( LoseEditFocusHandler, formula::RefEdit&, void );
88  DECL_LINK( LoseButtonFocusHandler, formula::RefButton&, void );
89  DECL_LINK( RefInputModifyHandler, formula::RefEdit&, void );
90 };
91 
92 #endif
93 
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< formula::RefEdit > mxOutputRangeEdit
std::unique_ptr< weld::Label > mxVariable2RangeLabel
virtual const char * GetUndoNameId()=0
DECL_LINK(GroupByChanged, weld::ToggleButton &, void)
std::unique_ptr< formula::RefEdit > mxVariable2RangeEdit
virtual ScRange ApplyOutput(ScDocShell *pDocShell)=0
std::unique_ptr< formula::RefButton > mxVariable2RangeButton
std::unique_ptr< formula::RefButton > mxVariable1RangeButton
std::unique_ptr< weld::Button > mxButtonOk
std::unique_ptr< weld::Label > mxVariable1RangeLabel
std::unique_ptr< weld::RadioButton > mxGroupByColumnsRadio
std::unique_ptr< formula::RefButton > mxOutputRangeButton
std::unique_ptr< formula::RefEdit > mxVariable1RangeEdit
std::unique_ptr< weld::Label > mxOutputRangeLabel
std::unique_ptr< weld::Button > mxButtonCancel
std::unique_ptr< weld::RadioButton > mxGroupByRowsRadio
ScStatisticsTwoVariableDialog(SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScViewData &rViewData, const OUString &rUIXMLDescription, const OString &rID)
virtual void SetReference(const ScRange &rRef, ScDocument &rDoc) override