Debian Codegraph @

chart2/source/controller/sidebar/ChartLinePanel.hxx

raw
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 #pragma once
11
12 #include <sfx2/sidebar/SidebarModelUpdate.hxx>
13 #include <svx/sidebar/LinePropertyPanelBase.hxx>
14
15 #include "ChartSidebarModifyListener.hxx"
16 #include "ChartSidebarSelectionListener.hxx"
17 #include "ChartColorWrapper.hxx"
18
19 namespace chart {
20
21 class ChartController;
22
23 namespace sidebar {
24
25 class ChartLinePanel : public svx::sidebar::LinePropertyPanelBase,
26 public sfx2::sidebar::SidebarModelUpdate,
27 public ChartSidebarModifyListenerParent,
28 public ChartSidebarSelectionListenerParent
29 {
30 public:
31 static std::unique_ptr<PanelLayout> Create(
32 weld::Widget* pParent,
33 const css::uno::Reference<css::frame::XFrame>& rxFrame,
34 ChartController* pController);
35
36 // constructor/destructor
37 ChartLinePanel(
38 weld::Widget* pParent,
39 const css::uno::Reference<css::frame::XFrame>& rxFrame,
40 ChartController* pController);
41
42 virtual ~ChartLinePanel() override;
43
44 virtual void updateData() override;
45 virtual void modelInvalid() override;
46
47 virtual void selectionChanged(bool bCorrectType) override;
48
49 virtual void updateModel(css::uno::Reference<css::frame::XModel> xModel) override;
50
51 virtual void setLineWidth(const XLineWidthItem& rItem) override;
52
53 protected:
54
55 virtual void setLineTransparency(const XLineTransparenceItem& rItem) override;
56
57 virtual void updateLineWidth(bool bDisabled, bool bSetOrDefault, const SfxPoolItem* pItem) override;
58
59 private:
60
61 rtl::Reference<::chart::ChartModel> mxModel;
62 css::uno::Reference<css::util::XModifyListener> mxListener;
63 rtl::Reference<ChartSidebarSelectionListener> mxSelectionListener;
64
65 void Initialize();
66 void doUpdateModel(const rtl::Reference<::chart::ChartModel>& xModel);
67
68 bool mbUpdate;
69 bool mbModelValid;
70 ChartColorWrapper maLineColorWrapper;
71 ChartLineStyleWrapper maLineStyleWrapper;
72 };
73
74 } } // end of namespace svx::sidebar
75
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */