1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
11 #ifndef SAMPLING_DIALOG_HXX
12 #define SAMPLING_DIALOG_HXX
15 #include "address.hxx"
16 #include "anyrefdg.hxx"
18 #include <vcl/fixed.hxx>
19 #include <vcl/group.hxx>
20 #include <vcl/lstbox.hxx>
22 class ScSamplingDialog
: public ScAnyRefDlg
26 SfxBindings
* pB
, SfxChildWindow
* pCW
,
27 Window
* pParent
, ScViewData
* pViewData
);
29 virtual ~ScSamplingDialog();
31 virtual void SetReference( const ScRange
& rRef
, ScDocument
* pDoc
);
32 virtual void SetActive();
33 virtual sal_Bool
Close();
37 FixedText
* mpInputRangeLabel
;
38 formula::RefEdit
* mpInputRangeEdit
;
39 formula::RefButton
* mpInputRangeButton
;
41 FixedText
* mpOutputRangeLabel
;
42 formula::RefEdit
* mpOutputRangeEdit
;
43 formula::RefButton
* mpOutputRangeButton
;
45 NumericField
* mpSampleSize
;
46 NumericField
* mpPeriod
;
48 RadioButton
* mpRandomMethodRadio
;
49 RadioButton
* mpPeriodicMethodRadio
;
51 PushButton
* mpButtonApply
;
53 CloseButton
* mpButtonClose
;
56 formula::RefEdit
* mpActiveEdit
;
59 ScViewData
* mViewData
;
60 ScDocument
* mDocument
;
63 ScAddress::Details mAddressDetails
;
64 ScAddress mOutputAddress
;
66 ScAddress mCurrentAddress
;
68 bool mDialogLostFocus
;
71 void GetRangeFromSelection();
72 void PerformSampling();
74 ScRange
PerformRandomSampling(ScDocShell
* pDocShell
);
75 ScRange
PerformPeriodicSampling(ScDocShell
* pDocShell
);
77 DECL_LINK( OkClicked
, PushButton
* );
78 DECL_LINK( CloseClicked
, PushButton
* );
79 DECL_LINK( ApplyClicked
, PushButton
* );
80 DECL_LINK( GetFocusHandler
, Control
* );
81 DECL_LINK( LoseFocusHandler
, void* );
82 DECL_LINK( SamplingSizeValueModified
, void* );
83 DECL_LINK( ToggleSamplingMethod
, void* );
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */