LibreOffice Module chart2 (master) 1
res_LegendPosition.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
21#include <svl/itemset.hxx>
22#include <tools/link.hxx>
23#include <rtl/ref.hxx>
24
25namespace com::sun::star::frame { class XModel; }
26namespace com::sun::star::uno { class XComponentContext; }
27namespace weld { class Builder; }
28namespace weld { class CheckButton; }
29namespace weld { class RadioButton; }
30namespace weld { class Toggleable; }
31
32namespace chart
33{
34class ChartModel;
35
37{
38
39public:
40 //constructor without Display checkbox
42 //constructor inclusive Display checkbox
43 LegendPositionResources(weld::Builder& rBuilder, css::uno::Reference<
44 css::uno::XComponentContext> xCC );
46
48 void writeToModel( const rtl::Reference<::chart::ChartModel>& xChartModel ) const;
49
50 void initFromItemSet( const SfxItemSet& rInAttrs );
51 void writeToItemSet( SfxItemSet& rOutAttrs ) const;
52
53 void SetChangeHdl( const Link<LinkParamNone*,void>& rLink );
54
55 DECL_LINK( PositionEnableHdl, weld::Toggleable&, void );
56 DECL_LINK( PositionChangeHdl, weld::Toggleable&, void );
57
58private:
60 void PositionEnable();
61
62private:
63 css::uno::Reference< css::uno::XComponentContext> m_xCC;
65
66 std::unique_ptr<weld::CheckButton> m_xCbxShow;
67 std::unique_ptr<weld::RadioButton> m_xRbtLeft;
68 std::unique_ptr<weld::RadioButton> m_xRbtRight;
69 std::unique_ptr<weld::RadioButton> m_xRbtTop;
70 std::unique_ptr<weld::RadioButton> m_xRbtBottom;
71};
72
73} //namespace chart
74
75/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Link< LinkParamNone *, void > m_aChangeLink
void SetChangeHdl(const Link< LinkParamNone *, void > &rLink)
std::unique_ptr< weld::RadioButton > m_xRbtTop
std::unique_ptr< weld::CheckButton > m_xCbxShow
void writeToModel(const rtl::Reference<::chart::ChartModel > &xChartModel) const
std::unique_ptr< weld::RadioButton > m_xRbtLeft
void writeToItemSet(SfxItemSet &rOutAttrs) const
DECL_LINK(PositionEnableHdl, weld::Toggleable &, void)
void writeToResources(const rtl::Reference<::chart::ChartModel > &xChartModel)
css::uno::Reference< css::uno::XComponentContext > m_xCC
DECL_LINK(PositionChangeHdl, weld::Toggleable &, void)
std::unique_ptr< weld::RadioButton > m_xRbtBottom
LegendPositionResources(weld::Builder &rBuilder)
void initFromItemSet(const SfxItemSet &rInAttrs)
std::unique_ptr< weld::RadioButton > m_xRbtRight
LegendPositionResources(weld::Builder &rBuilder, css::uno::Reference< css::uno::XComponentContext > xCC)