LibreOffice Module chart2 (master) 1
ChartErrorBarPanel.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
18
19namespace com::sun::star::util { class XModifyListener; }
20
21namespace chart {
22
23class ChartController;
24class ChartModel;
25
26namespace sidebar {
27
29 public ::sfx2::sidebar::IContextChangeReceiver,
31 public sfx2::sidebar::SidebarModelUpdate,
33{
34public:
35 static std::unique_ptr<PanelLayout> Create(
36 weld::Widget* pParent,
37 ChartController* pController);
38
39 virtual void DataChanged(
40 const DataChangedEvent& rEvent) override;
41
42 virtual void HandleContextChange(
43 const vcl::EnumContext& rContext) override;
44
45 virtual void NotifyItemUpdate(
46 const sal_uInt16 nSId,
47 const SfxItemState eState,
48 const SfxPoolItem* pState) override;
49
50 virtual void GetControlState(
51 const sal_uInt16 /*nSId*/,
52 boost::property_tree::ptree& /*rState*/) override {};
53
54 // constructor/destructor
56 weld::Widget* pParent,
57 ChartController* pController);
58 virtual ~ChartErrorBarPanel() override;
59
60 virtual void updateData() override;
61 virtual void modelInvalid() override;
62
63 virtual void updateModel(css::uno::Reference<css::frame::XModel> xModel) override;
64
65private:
66 //ui controls
67 std::unique_ptr<weld::RadioButton> mxRBPosAndNeg;
68 std::unique_ptr<weld::RadioButton> mxRBPos;
69 std::unique_ptr<weld::RadioButton> mxRBNeg;
70
71 std::unique_ptr<weld::ComboBox> mxLBType;
72
73 std::unique_ptr<weld::SpinButton> mxMFPos;
74 std::unique_ptr<weld::SpinButton> mxMFNeg;
75
77 css::uno::Reference<css::util::XModifyListener> mxListener;
78
80
81 void Initialize();
83
84 DECL_LINK(RadioBtnHdl, weld::Toggleable&, void);
85 DECL_LINK(ListBoxHdl, weld::ComboBox&, void);
86 DECL_LINK(NumericFieldHdl, weld::SpinButton&, void);
87};
88
89} } // end of namespace ::chart::sidebar
90
91/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
DECL_LINK(NumericFieldHdl, weld::SpinButton &, void)
virtual void updateModel(css::uno::Reference< css::frame::XModel > xModel) override
virtual void GetControlState(const sal_uInt16, boost::property_tree::ptree &) override
css::uno::Reference< css::util::XModifyListener > mxListener
std::unique_ptr< weld::SpinButton > mxMFPos
virtual void HandleContextChange(const vcl::EnumContext &rContext) override
std::unique_ptr< weld::RadioButton > mxRBPos
std::unique_ptr< weld::RadioButton > mxRBPosAndNeg
void doUpdateModel(rtl::Reference<::chart::ChartModel > xModel)
std::unique_ptr< weld::ComboBox > mxLBType
ChartErrorBarPanel(weld::Widget *pParent, ChartController *pController)
rtl::Reference<::chart::ChartModel > mxModel
static std::unique_ptr< PanelLayout > Create(weld::Widget *pParent, ChartController *pController)
virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem *pState) override
std::unique_ptr< weld::RadioButton > mxRBNeg
DECL_LINK(RadioBtnHdl, weld::Toggleable &, void)
DECL_LINK(ListBoxHdl, weld::ComboBox &, void)
virtual void DataChanged(const DataChangedEvent &rEvent) override
std::unique_ptr< weld::SpinButton > mxMFNeg
SfxItemState