LibreOffice Module chart2 (master) 1
ChartSeriesPanel.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 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#pragma once
20
25
28
29namespace com::sun::star::util { class XModifyListener; }
30namespace com::sun::star::view { class XSelectionChangeListener; }
31
32namespace chart {
33
34class ChartController;
35
36namespace sidebar {
37
39 public ::sfx2::sidebar::IContextChangeReceiver,
41 public sfx2::sidebar::SidebarModelUpdate,
44{
45public:
46 static std::unique_ptr<PanelLayout> Create(
47 weld::Widget* pParent,
48 ChartController* pController);
49
50 virtual void DataChanged(
51 const DataChangedEvent& rEvent) override;
52
53 virtual void HandleContextChange(
54 const vcl::EnumContext& rContext) override;
55
56 virtual void NotifyItemUpdate(
57 const sal_uInt16 nSId,
58 const SfxItemState eState,
59 const SfxPoolItem* pState) override;
60
61 virtual void GetControlState(
62 const sal_uInt16 /*nSId*/,
63 boost::property_tree::ptree& /*rState*/) override {};
64
65 // constructor/destructor
67 weld::Widget* pParent,
68 ChartController* pController);
69 virtual ~ChartSeriesPanel() override;
70
71 virtual void updateData() override;
72 virtual void modelInvalid() override;
73
74 virtual void selectionChanged(bool bCorrectType) override;
75
76 virtual void updateModel(css::uno::Reference<css::frame::XModel> xModel) override;
77
78private:
79 //ui controls
80 std::unique_ptr<weld::CheckButton> mxCBLabel;
81 std::unique_ptr<weld::CheckButton> mxCBTrendline;
82 std::unique_ptr<weld::CheckButton> mxCBXError;
83 std::unique_ptr<weld::CheckButton> mxCBYError;
84
85 std::unique_ptr<weld::RadioButton> mxRBPrimaryAxis;
86 std::unique_ptr<weld::RadioButton> mxRBSecondaryAxis;
87
88 std::unique_ptr<weld::Widget> mxBoxLabelPlacement;
89 std::unique_ptr<weld::ComboBox> mxLBLabelPlacement;
90
91 std::unique_ptr<weld::Label> mxFTSeriesName;
92 std::unique_ptr<weld::Label> mxFTSeriesTemplate;
93
95 css::uno::Reference<css::util::XModifyListener> mxListener;
96 css::uno::Reference<css::view::XSelectionChangeListener> mxSelectionListener;
97
99
100 void Initialize();
102
103 DECL_LINK(CheckBoxHdl, weld::Toggleable&, void);
104 DECL_LINK(RadioBtnHdl, weld::Toggleable&, void);
105 DECL_LINK(ListBoxHdl, weld::ComboBox&, void);
106};
107
108} } // end of namespace ::chart::sidebar
109
110/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ChartSeriesPanel(weld::Widget *pParent, ChartController *pController)
std::unique_ptr< weld::Label > mxFTSeriesName
std::unique_ptr< weld::CheckButton > mxCBLabel
virtual void updateData() override
virtual void DataChanged(const DataChangedEvent &rEvent) override
static std::unique_ptr< PanelLayout > Create(weld::Widget *pParent, ChartController *pController)
std::unique_ptr< weld::Label > mxFTSeriesTemplate
DECL_LINK(CheckBoxHdl, weld::Toggleable &, void)
virtual void modelInvalid() override
virtual void NotifyItemUpdate(const sal_uInt16 nSId, const SfxItemState eState, const SfxPoolItem *pState) override
std::unique_ptr< weld::CheckButton > mxCBYError
css::uno::Reference< css::util::XModifyListener > mxListener
void doUpdateModel(rtl::Reference<::chart::ChartModel > xModel)
css::uno::Reference< css::view::XSelectionChangeListener > mxSelectionListener
std::unique_ptr< weld::ComboBox > mxLBLabelPlacement
std::unique_ptr< weld::CheckButton > mxCBXError
std::unique_ptr< weld::RadioButton > mxRBPrimaryAxis
virtual void updateModel(css::uno::Reference< css::frame::XModel > xModel) override
virtual void GetControlState(const sal_uInt16, boost::property_tree::ptree &) override
DECL_LINK(RadioBtnHdl, weld::Toggleable &, void)
DECL_LINK(ListBoxHdl, weld::ComboBox &, void)
std::unique_ptr< weld::RadioButton > mxRBSecondaryAxis
rtl::Reference<::chart::ChartModel > mxModel
std::unique_ptr< weld::Widget > mxBoxLabelPlacement
virtual void HandleContextChange(const vcl::EnumContext &rContext) override
virtual void selectionChanged(bool bCorrectType) override
std::unique_ptr< weld::CheckButton > mxCBTrendline
SfxItemState