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/.
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>
40 class ChartController
;
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
52 static VclPtr
<vcl::Window
> Create(
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
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
;
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
;
109 DECL_LINK(CheckBoxHdl
, Button
*, void);
110 DECL_LINK(RadioBtnHdl
, RadioButton
&, void);
111 DECL_LINK(ListBoxHdl
, ListBox
&, void);
114 } } // end of namespace ::chart::sidebar
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */