LibreOffice Module chart2 (master) 1
ChartAxisPanel.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
19
20namespace com::sun::star::util { class XModifyListener; }
21namespace com::sun::star::view { class XSelectionChangeListener; }
22
23namespace chart {
24
25class ChartController;
26
27namespace sidebar {
28
30 public ::sfx2::sidebar::IContextChangeReceiver,
32 public sfx2::sidebar::SidebarModelUpdate,
35{
36public:
37 static std::unique_ptr<PanelLayout> Create(
38 weld::Widget* pParent,
39 ChartController* pController);
40
41 virtual void DataChanged(
42 const DataChangedEvent& rEvent) override;
43
44 virtual void HandleContextChange(
45 const vcl::EnumContext& rContext) override;
46
47 virtual void NotifyItemUpdate(
48 const sal_uInt16 nSId,
49 const SfxItemState eState,
50 const SfxPoolItem* pState) override;
51
52 virtual void GetControlState(
53 const sal_uInt16 /*nSId*/,
54 boost::property_tree::ptree& /*rState*/) override {};
55
56 // constructor/destructor
58 weld::Widget* pParent,
59 ChartController* pController);
60 virtual ~ChartAxisPanel() override;
61
62 virtual void updateData() override;
63 virtual void modelInvalid() override;
64
65 virtual void selectionChanged(bool bCorrectType) override;
66
67 virtual void updateModel(css::uno::Reference<css::frame::XModel> xModel) override;
68
69private:
70 //ui controls
71 std::unique_ptr<weld::CheckButton> mxCBShowLabel;
72 std::unique_ptr<weld::CheckButton> mxCBReverse;
73 std::unique_ptr<weld::ComboBox> mxLBLabelPos;
74 std::unique_ptr<weld::Widget> mxGridLabel;
75 std::unique_ptr<weld::MetricSpinButton> mxNFRotation;
76
78 css::uno::Reference<css::util::XModifyListener> mxModifyListener;
79 css::uno::Reference<css::view::XSelectionChangeListener> mxSelectionListener;
80
82
83 void Initialize();
85
86 DECL_LINK(CheckBoxHdl, weld::Toggleable&, void);
87 DECL_LINK(ListBoxHdl, weld::ComboBox&, void);
88 DECL_LINK(TextRotationHdl, weld::MetricSpinButton&, void);
89};
90
91} } // end of namespace ::chart::sidebar
92
93/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::ComboBox > mxLBLabelPos
std::unique_ptr< weld::MetricSpinButton > mxNFRotation
css::uno::Reference< css::view::XSelectionChangeListener > mxSelectionListener
rtl::Reference<::chart::ChartModel > mxModel
css::uno::Reference< css::util::XModifyListener > mxModifyListener
virtual void selectionChanged(bool bCorrectType) override
virtual void updateModel(css::uno::Reference< css::frame::XModel > xModel) override
virtual void DataChanged(const DataChangedEvent &rEvent) override
ChartAxisPanel(weld::Widget *pParent, ChartController *pController)
void doUpdateModel(rtl::Reference<::chart::ChartModel > xModel)
DECL_LINK(CheckBoxHdl, weld::Toggleable &, void)
virtual void updateData() override
DECL_LINK(TextRotationHdl, weld::MetricSpinButton &, void)
virtual ~ChartAxisPanel() override
std::unique_ptr< weld::Widget > mxGridLabel
virtual void HandleContextChange(const vcl::EnumContext &rContext) override
std::unique_ptr< weld::CheckButton > mxCBShowLabel
std::unique_ptr< weld::CheckButton > mxCBReverse
virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem *pState) override
virtual void GetControlState(const sal_uInt16, boost::property_tree::ptree &) override
DECL_LINK(ListBoxHdl, weld::ComboBox &, void)
static std::unique_ptr< PanelLayout > Create(weld::Widget *pParent, ChartController *pController)
virtual void modelInvalid() override
SfxItemState