Debian Codegraph @

chart2/source/controller/sidebar/ChartColorWrapper.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 <ChartModel.hxx>
13
14 #include <sfx2/namedcolor.hxx>
15 #include <rtl/ref.hxx>
16
17 class SvxColorToolBoxControl;
18 class SvxLineStyleToolBoxControl;
19
20 namespace chart::sidebar {
21
22 class ChartColorWrapper
23 {
24 public:
25 ChartColorWrapper(rtl::Reference<::chart::ChartModel> xModel,
26 SvxColorToolBoxControl* pControl,
27 OUString rPropertyName);
28
29 void operator()(const OUString& rCommand, const NamedColor& rColor);
30 // ColorSelectFunction signature
31
32 void updateModel(const rtl::Reference<::chart::ChartModel>& xModel);
33
34 void updateData();
35
36 private:
37
38 rtl::Reference<::chart::ChartModel> mxModel;
39
40 SvxColorToolBoxControl* mpControl;
41
42 OUString maPropertyName;
43 };
44
45 class ChartLineStyleWrapper
46 {
47 public:
48 ChartLineStyleWrapper(rtl::Reference<::chart::ChartModel> xModel,
49 SvxLineStyleToolBoxControl* pControl);
50
51 bool operator()(std::u16string_view rCommand, const css::uno::Any& rValue);
52
53 void updateModel(const rtl::Reference<::chart::ChartModel>& xModel);
54
55 void updateData();
56
57 private:
58
59 rtl::Reference<::chart::ChartModel> mxModel;
60
61 SvxLineStyleToolBoxControl* mpControl;
62 };
63
64 }
65
66 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */