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/.
13 #include <sfx2/sidebar/ControllerItem.hxx>
14 #include <sfx2/sidebar/IContextChangeReceiver.hxx>
15 #include <sfx2/sidebar/SidebarModelUpdate.hxx>
16 #include <sfx2/sidebar/PanelLayout.hxx>
17 #include "ChartSidebarModifyListener.hxx"
19 namespace com::sun::star::util
{ class XModifyListener
; }
23 class ChartController
;
28 class ChartErrorBarPanel
: public PanelLayout
,
29 public ::sfx2::sidebar::IContextChangeReceiver
,
30 public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
,
31 public sfx2::sidebar::SidebarModelUpdate
,
32 public ChartSidebarModifyListenerParent
35 static std::unique_ptr
<PanelLayout
> Create(
36 weld::Widget
* pParent
,
37 ChartController
* pController
);
39 virtual void DataChanged(
40 const DataChangedEvent
& rEvent
) override
;
42 virtual void HandleContextChange(
43 const vcl::EnumContext
& rContext
) override
;
45 virtual void NotifyItemUpdate(
46 const sal_uInt16 nSId
,
47 const SfxItemState eState
,
48 const SfxPoolItem
* pState
) override
;
50 virtual void GetControlState(
51 const sal_uInt16
/*nSId*/,
52 boost::property_tree::ptree
& /*rState*/) override
{};
54 // constructor/destructor
56 weld::Widget
* pParent
,
57 ChartController
* pController
);
58 virtual ~ChartErrorBarPanel() override
;
60 virtual void updateData() override
;
61 virtual void modelInvalid() override
;
63 virtual void updateModel(css::uno::Reference
<css::frame::XModel
> xModel
) override
;
67 std::unique_ptr
<weld::RadioButton
> mxRBPosAndNeg
;
68 std::unique_ptr
<weld::RadioButton
> mxRBPos
;
69 std::unique_ptr
<weld::RadioButton
> mxRBNeg
;
71 std::unique_ptr
<weld::ComboBox
> mxLBType
;
73 std::unique_ptr
<weld::SpinButton
> mxMFPos
;
74 std::unique_ptr
<weld::SpinButton
> mxMFNeg
;
76 rtl::Reference
<::chart::ChartModel
> mxModel
;
77 css::uno::Reference
<css::util::XModifyListener
> mxListener
;
82 void doUpdateModel(const rtl::Reference
<::chart::ChartModel
>& xModel
);
84 DECL_LINK(RadioBtnHdl
, weld::Toggleable
&, void);
85 DECL_LINK(ListBoxHdl
, weld::ComboBox
&, void);
86 DECL_LINK(NumericFieldHdl
, weld::SpinButton
&, void);
89 } } // end of namespace ::chart::sidebar
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */