Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / chart2 / source / controller / sidebar / ChartErrorBarPanel.hxx
blobc6e20976f9ae8ab2833a3c9ae76e1f70a0f2df97
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 */
11 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_SIDEBAR_CHARTERRORBARPANEL_HXX
12 #define INCLUDED_CHART2_SOURCE_CONTROLLER_SIDEBAR_CHARTERRORBARPANEL_HXX
14 #include <sfx2/sidebar/ControllerItem.hxx>
15 #include <sfx2/sidebar/IContextChangeReceiver.hxx>
16 #include <sfx2/sidebar/SidebarModelUpdate.hxx>
17 #include <svx/sidebar/PanelLayout.hxx>
19 #include "ChartSidebarModifyListener.hxx"
21 namespace com { namespace sun { namespace star { namespace util { class XModifyListener; } } } }
23 class ListBox;
24 class NumericField;
25 class Edit;
27 namespace chart {
29 class ChartController;
31 namespace sidebar {
33 class ChartErrorBarPanel : public PanelLayout,
34 public ::sfx2::sidebar::IContextChangeReceiver,
35 public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface,
36 public sfx2::sidebar::SidebarModelUpdate,
37 public ChartSidebarModifyListenerParent
39 public:
40 static VclPtr<vcl::Window> Create(
41 vcl::Window* pParent,
42 const css::uno::Reference<css::frame::XFrame>& rxFrame,
43 ChartController* pController);
45 virtual void DataChanged(
46 const DataChangedEvent& rEvent) override;
48 virtual void HandleContextChange(
49 const vcl::EnumContext& rContext) override;
51 virtual void NotifyItemUpdate(
52 const sal_uInt16 nSId,
53 const SfxItemState eState,
54 const SfxPoolItem* pState) override;
56 // constructor/destructor
57 ChartErrorBarPanel(
58 vcl::Window* pParent,
59 const css::uno::Reference<css::frame::XFrame>& rxFrame,
60 ChartController* pController);
61 virtual ~ChartErrorBarPanel() override;
62 virtual void dispose() override;
64 virtual void updateData() override;
65 virtual void modelInvalid() override;
67 virtual void updateModel(css::uno::Reference<css::frame::XModel> xModel) override;
69 private:
70 //ui controls
71 VclPtr<RadioButton> mpRBPosAndNeg;
72 VclPtr<RadioButton> mpRBPos;
73 VclPtr<RadioButton> mpRBNeg;
75 VclPtr<ListBox> mpLBType;
77 VclPtr<NumericField> mpMFPos;
78 VclPtr<NumericField> mpMFNeg;
80 css::uno::Reference<css::frame::XModel> mxModel;
81 css::uno::Reference<css::util::XModifyListener> mxListener;
83 bool mbModelValid;
85 void Initialize();
87 DECL_LINK(RadioBtnHdl, RadioButton&, void);
88 DECL_LINK(ListBoxHdl, ListBox&, void);
89 DECL_LINK(NumericFieldHdl, Edit&, void);
92 } } // end of namespace ::chart::sidebar
94 #endif
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */