Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / chart2 / source / controller / sidebar / ChartSeriesPanel.hxx
blob2569f617bf18001faef857c45dbba2412efa44cd
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_SIDEBAR_CHARTSERIESPANEL_HXX
20 #define INCLUDED_CHART2_SOURCE_CONTROLLER_SIDEBAR_CHARTSERIESPANEL_HXX
22 #include <sfx2/sidebar/ControllerItem.hxx>
23 #include <sfx2/sidebar/IContextChangeReceiver.hxx>
24 #include <sfx2/sidebar/SidebarModelUpdate.hxx>
25 #include <svx/sidebar/PanelLayout.hxx>
26 #include <vcl/layout.hxx>
28 #include "ChartSidebarModifyListener.hxx"
29 #include "ChartSidebarSelectionListener.hxx"
31 #include <com/sun/star/util/XModifyListener.hpp>
32 #include <com/sun/star/view/XSelectionChangeListener.hpp>
34 class FixedText;
35 class ListBox;
36 class NumericField;
38 namespace chart {
40 class ChartController;
42 namespace sidebar {
44 class ChartSeriesPanel : public PanelLayout,
45 public ::sfx2::sidebar::IContextChangeReceiver,
46 public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface,
47 public sfx2::sidebar::SidebarModelUpdate,
48 public ChartSidebarModifyListenerParent,
49 public ChartSidebarSelectionListenerParent
51 public:
52 static VclPtr<vcl::Window> Create(
53 vcl::Window* pParent,
54 const css::uno::Reference<css::frame::XFrame>& rxFrame,
55 ChartController* pController);
57 virtual void DataChanged(
58 const DataChangedEvent& rEvent) override;
60 virtual void HandleContextChange(
61 const vcl::EnumContext& rContext) override;
63 virtual void NotifyItemUpdate(
64 const sal_uInt16 nSId,
65 const SfxItemState eState,
66 const SfxPoolItem* pState,
67 const bool bIsEnabled) override;
69 // constructor/destructor
70 ChartSeriesPanel(
71 vcl::Window* pParent,
72 const css::uno::Reference<css::frame::XFrame>& rxFrame,
73 ChartController* pController);
74 virtual ~ChartSeriesPanel() override;
75 virtual void dispose() override;
77 virtual void updateData() override;
78 virtual void modelInvalid() override;
80 virtual void selectionChanged(bool bCorrectType) override;
81 virtual void SelectionInvalid() override;
83 virtual void updateModel(css::uno::Reference<css::frame::XModel> xModel) override;
85 private:
86 //ui controls
87 VclPtr<CheckBox> mpCBLabel;
88 VclPtr<CheckBox> mpCBTrendline;
89 VclPtr<CheckBox> mpCBXError;
90 VclPtr<CheckBox> mpCBYError;
92 VclPtr<RadioButton> mpRBPrimaryAxis;
93 VclPtr<RadioButton> mpRBSecondaryAxis;
95 VclPtr<VclHBox> mpBoxLabelPlacement;
96 VclPtr<ListBox> mpLBLabelPlacement;
98 VclPtr<FixedText> mpFTSeriesName;
99 VclPtr<FixedText> mpFTSeriesTemplate;
101 css::uno::Reference<css::frame::XModel> mxModel;
102 css::uno::Reference<css::util::XModifyListener> mxListener;
103 css::uno::Reference<css::view::XSelectionChangeListener> mxSelectionListener;
105 bool mbModelValid;
107 void Initialize();
109 DECL_LINK(CheckBoxHdl, Button*, void);
110 DECL_LINK(RadioBtnHdl, RadioButton&, void);
111 DECL_LINK(ListBoxHdl, ListBox&, void);
114 } } // end of namespace ::chart::sidebar
116 #endif
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */