tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / chart2 / source / controller / dialogs / res_DataLabel.hxx
blob66a062d2ca24966e88bae05bc1606626dcab4088
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 * This file incorporates work covered by the following license notice:
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 .
19 #pragma once
21 #include <svl/itemset.hxx>
22 #include <svx/dialcontrol.hxx>
23 #include <TextDirectionListBox.hxx>
25 #include <map>
27 class SvNumberFormatter;
29 namespace chart
32 class DataLabelResources final
34 public:
35 DataLabelResources(weld::Builder* pBuilder, weld::Window* pParent, const SfxItemSet& rInAttrs);
36 ~DataLabelResources();
38 void FillItemSet(SfxItemSet* rOutAttrs) const;
39 void Reset(const SfxItemSet& rInAttrs);
41 void SetNumberFormatter( SvNumberFormatter* pFormatter );
43 private:
44 std::map< sal_Int32, sal_uInt16 > m_aPlacementToListBoxMap;
45 std::map< sal_uInt16, sal_Int32 > m_aListBoxToPlacementMap;
47 SvNumberFormatter* m_pNumberFormatter;
48 bool m_bNumberFormatMixedState;
49 bool m_bPercentFormatMixedState;
50 sal_uInt32 m_nNumberFormatForValue;
51 sal_uInt32 m_nNumberFormatForPercent;
53 bool m_bSourceFormatMixedState;
54 bool m_bPercentSourceMixedState;
55 bool m_bSourceFormatForValue;
56 bool m_bSourceFormatForPercent;
58 weld::Window* m_pWindow;
59 SfxItemPool* m_pPool;
61 weld::TriStateEnabled m_aNumberState;
62 weld::TriStateEnabled m_aPercentState;
63 weld::TriStateEnabled m_aCategoryState;
64 weld::TriStateEnabled m_aSymbolState;
65 weld::TriStateEnabled m_aDataSeriesState;
66 weld::TriStateEnabled m_aWrapTextState;
67 weld::TriStateEnabled m_aCustomLeaderLinesState;
69 std::unique_ptr<weld::CheckButton> m_xCBNumber;
70 std::unique_ptr<weld::Button> m_xPB_NumberFormatForValue;
71 std::unique_ptr<weld::CheckButton> m_xCBPercent;
72 std::unique_ptr<weld::Button> m_xPB_NumberFormatForPercent;
73 std::unique_ptr<weld::Label> m_xFT_NumberFormatForPercent;
74 std::unique_ptr<weld::CheckButton> m_xCBCategory;
75 std::unique_ptr<weld::CheckButton> m_xCBSymbol;
76 std::unique_ptr<weld::CheckButton> m_xCBDataSeries;
77 std::unique_ptr<weld::CheckButton> m_xCBWrapText;
79 std::unique_ptr<weld::ComboBox> m_xLB_Separator;
80 std::unique_ptr<weld::ComboBox> m_xLB_LabelPlacement;
82 std::unique_ptr<weld::Widget> m_xBxOrientation;
83 std::unique_ptr<weld::Label> m_xFT_Dial;
84 std::unique_ptr<weld::MetricSpinButton> m_xNF_Degrees;
86 std::unique_ptr<weld::Widget> m_xBxTextDirection;
88 TextDirectionListBox m_aLB_TextDirection;
89 std::unique_ptr<svx::DialControl> m_xDC_Dial;
90 std::unique_ptr<weld::CustomWeld> m_xDC_DialWin;
92 std::unique_ptr<weld::CheckButton> m_xCBCustomLeaderLines;
94 DECL_LINK(NumberFormatDialogHdl, weld::Button&, void );
95 DECL_LINK(CheckHdl, weld::Toggleable&, void );
96 void EnableControls();
99 } //namespace chart
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */