LibreOffice Module chart2 (master) 1
ChartElementsPanel.hxx
Go to the documentation of this file.
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 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
24#include <vcl/EnumContext.hxx>
26#include <TitleHelper.hxx>
27
28namespace com::sun::star::util { class XModifyListener; }
29
30namespace chart {
31
32class ChartController;
33
34namespace sidebar {
35
37 public ::sfx2::sidebar::IContextChangeReceiver,
38 public sfx2::sidebar::SidebarModelUpdate,
40{
41public:
42 static std::unique_ptr<PanelLayout> Create(
43 weld::Widget* pParent,
44 ChartController* pController);
45
46 virtual void DataChanged(
47 const DataChangedEvent& rEvent) override;
48
49 virtual void HandleContextChange(
50 const vcl::EnumContext& rContext) override;
51
52 // constructor/destructor
54 weld::Widget* pParent,
55 ChartController* pController);
56
57 virtual ~ChartElementsPanel() override;
58
59 virtual void updateData() override;
60 virtual void modelInvalid() override;
61
62 virtual void updateModel(css::uno::Reference<css::frame::XModel> xModel) override;
63
64private:
65 //ui controls
66 std::unique_ptr<weld::CheckButton> mxCBTitle;
67 std::unique_ptr<weld::Entry> mxEditTitle;
68 std::unique_ptr<weld::CheckButton> mxCBSubtitle;
69 std::unique_ptr<weld::Entry> mxEditSubtitle;
70 std::unique_ptr<weld::CheckButton> mxCBXAxis;
71 std::unique_ptr<weld::CheckButton> mxCBXAxisTitle;
72 std::unique_ptr<weld::CheckButton> mxCBYAxis;
73 std::unique_ptr<weld::CheckButton> mxCBYAxisTitle;
74 std::unique_ptr<weld::CheckButton> mxCBZAxis;
75 std::unique_ptr<weld::CheckButton> mxCBZAxisTitle;
76 std::unique_ptr<weld::CheckButton> mxCB2ndXAxis;
77 std::unique_ptr<weld::CheckButton> mxCB2ndXAxisTitle;
78 std::unique_ptr<weld::CheckButton> mxCB2ndYAxis;
79 std::unique_ptr<weld::CheckButton> mxCB2ndYAxisTitle;
80 std::unique_ptr<weld::CheckButton> mxCBLegend;
81 std::unique_ptr<weld::CheckButton> mxCBLegendNoOverlay;
82 std::unique_ptr<weld::CheckButton> mxCBGridVerticalMajor;
83 std::unique_ptr<weld::CheckButton> mxCBGridHorizontalMajor;
84 std::unique_ptr<weld::CheckButton> mxCBGridVerticalMinor;
85 std::unique_ptr<weld::CheckButton> mxCBGridHorizontalMinor;
86 std::unique_ptr<weld::Label> mxTextTitle;
87 std::unique_ptr<weld::Label> mxTextSubTitle;
88 std::unique_ptr<weld::Label> mxLBAxis;
89 std::unique_ptr<weld::Label> mxLBGrid;
90
91 std::unique_ptr<weld::ComboBox> mxLBLegendPosition;
92 std::unique_ptr<weld::Widget> mxBoxLegend;
93
95
97 css::uno::Reference<css::util::XModifyListener> mxListener;
98
100
101 OUString maTextTitle;
103
104 void Initialize();
106
107 void setTitleVisible(TitleHelper::eTitleType eTitle, bool bVisible);
108
109 DECL_LINK(CheckBoxHdl, weld::Toggleable&, void);
110 DECL_LINK(EditHdl, weld::Entry&, void);
111 DECL_LINK(LegendPosHdl, weld::ComboBox&, void);
112};
113
114} } // end of namespace ::chart::sidebar
115
116/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::CheckButton > mxCB2ndXAxisTitle
std::unique_ptr< weld::ComboBox > mxLBLegendPosition
virtual void updateModel(css::uno::Reference< css::frame::XModel > xModel) override
std::unique_ptr< weld::CheckButton > mxCB2ndXAxis
void doUpdateModel(rtl::Reference<::chart::ChartModel > xModel)
std::unique_ptr< weld::CheckButton > mxCBXAxisTitle
std::unique_ptr< weld::Widget > mxBoxLegend
void setTitleVisible(TitleHelper::eTitleType eTitle, bool bVisible)
virtual void HandleContextChange(const vcl::EnumContext &rContext) override
std::unique_ptr< weld::CheckButton > mxCBSubtitle
virtual void DataChanged(const DataChangedEvent &rEvent) override
std::unique_ptr< weld::CheckButton > mxCBTitle
DECL_LINK(LegendPosHdl, weld::ComboBox &, void)
std::unique_ptr< weld::CheckButton > mxCB2ndYAxisTitle
DECL_LINK(EditHdl, weld::Entry &, void)
rtl::Reference<::chart::ChartModel > mxModel
std::unique_ptr< weld::CheckButton > mxCBGridHorizontalMinor
std::unique_ptr< weld::CheckButton > mxCBGridHorizontalMajor
std::unique_ptr< weld::CheckButton > mxCBYAxis
std::unique_ptr< weld::CheckButton > mxCBZAxisTitle
std::unique_ptr< weld::Label > mxLBGrid
ChartElementsPanel(weld::Widget *pParent, ChartController *pController)
css::uno::Reference< css::util::XModifyListener > mxListener
std::unique_ptr< weld::CheckButton > mxCBLegend
std::unique_ptr< weld::CheckButton > mxCBGridVerticalMajor
std::unique_ptr< weld::CheckButton > mxCBXAxis
std::unique_ptr< weld::Label > mxTextSubTitle
std::unique_ptr< weld::CheckButton > mxCBYAxisTitle
std::unique_ptr< weld::Label > mxLBAxis
DECL_LINK(CheckBoxHdl, weld::Toggleable &, void)
std::unique_ptr< weld::CheckButton > mxCB2ndYAxis
std::unique_ptr< weld::Entry > mxEditSubtitle
std::unique_ptr< weld::CheckButton > mxCBLegendNoOverlay
std::unique_ptr< weld::Entry > mxEditTitle
std::unique_ptr< weld::CheckButton > mxCBGridVerticalMinor
static std::unique_ptr< PanelLayout > Create(weld::Widget *pParent, ChartController *pController)
std::unique_ptr< weld::Label > mxTextTitle
std::unique_ptr< weld::CheckButton > mxCBZAxis
Reference< XModel > xModel