LibreOffice Module chart2 (master) 1
res_ErrorBar.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 <memory>
22#include <tools/link.hxx>
23#include <svl/itemset.hxx>
24#include <svx/chrtitem.hxx>
26#include <rtl/ref.hxx>
27
28namespace com::sun::star::chart2 { class XChartDocument; }
29namespace weld { class Builder; }
30namespace weld { class Button; }
31namespace weld { class CheckButton; }
32namespace weld { class ComboBox; }
33namespace weld { class DialogController; }
34namespace weld { class Entry; }
35namespace weld { class Frame; }
36namespace weld { class Image; }
37namespace weld { class Label; }
38namespace weld { class MetricSpinButton; }
39namespace weld { class RadioButton; }
40namespace weld { class Toggleable; }
41namespace weld { class Widget; }
42
43namespace chart
44{
45class ChartModel;
46class RangeSelectionHelper;
47
49{
50public:
52 {
55 };
56
58 weld::Builder* pParent, weld::DialogController* pControllerDialog, const SfxItemSet& rInAttrs, bool bNoneAvailable, chart::ErrorBarResources::tErrorBarType eType = ERROR_BAR_Y);
59 virtual ~ErrorBarResources();
60
61 void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth );
62 void SetErrorBarType( tErrorBarType eNewType );
64 const rtl::Reference<::chart::ChartModel> & xChartDocument );
65 void Reset(const SfxItemSet& rInAttrs);
66 void FillItemSet(SfxItemSet& rOutAttrs) const;
67
68 void FillValueSets();
69
70 // ____ RangeSelectionListenerParent ____
71 virtual void listeningFinished( const OUString & rNewRange ) override;
72 virtual void disposingRangeSelection() override;
73
74private:
77
82
88
90 std::unique_ptr< RangeSelectionHelper > m_apRangeSelectionHelper;
94
95
96 // category
97 std::unique_ptr<weld::RadioButton> m_xRbNone;
98 std::unique_ptr<weld::RadioButton> m_xRbConst;
99 std::unique_ptr<weld::RadioButton> m_xRbPercent;
100 std::unique_ptr<weld::RadioButton> m_xRbFunction;
101 std::unique_ptr<weld::RadioButton> m_xRbRange;
102 std::unique_ptr<weld::ComboBox> m_xLbFunction;
103
104 // parameters
105 std::unique_ptr<weld::Frame> m_xFlParameters;
106 std::unique_ptr<weld::Widget> m_xBxPositive;
107 std::unique_ptr<weld::MetricSpinButton> m_xMfPositive;
108 std::unique_ptr<weld::Entry> m_xEdRangePositive;
109 std::unique_ptr<weld::Button> m_xIbRangePositive;
110 std::unique_ptr<weld::Widget> m_xBxNegative;
111 std::unique_ptr<weld::MetricSpinButton> m_xMfNegative;
112 std::unique_ptr<weld::Entry> m_xEdRangeNegative;
113 std::unique_ptr<weld::Button> m_xIbRangeNegative;
114 std::unique_ptr<weld::CheckButton> m_xCbSyncPosNeg;
115
116 // indicator
117 std::unique_ptr<weld::RadioButton> m_xRbBoth;
118 std::unique_ptr<weld::RadioButton> m_xRbPositive;
119 std::unique_ptr<weld::RadioButton> m_xRbNegative;
120 std::unique_ptr<weld::Image> m_xFiBoth;
121 std::unique_ptr<weld::Image> m_xFiPositive;
122 std::unique_ptr<weld::Image> m_xFiNegative;
123
124 std::unique_ptr<weld::Label> m_xUIStringPos;
125 std::unique_ptr<weld::Label> m_xUIStringNeg;
126 std::unique_ptr<weld::Label> m_xUIStringRbRange;
127
128 DECL_LINK( CategoryChosen, weld::Toggleable&, void );
129 DECL_LINK( CategoryChosen2, weld::ComboBox&, void );
130 DECL_LINK( SynchronizePosAndNeg, weld::Toggleable&, void );
131 DECL_LINK( PosValueChanged, weld::MetricSpinButton&, void );
132 DECL_LINK( IndicatorChanged, weld::Toggleable&, void );
133 DECL_LINK( ChooseRange, weld::Button&, void );
134 DECL_LINK( RangeChanged, weld::Entry&, void );
135
136 void UpdateControlStates();
138};
139
140} //namespace chart
141
142/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvxChartIndicate
SvxChartKindError
std::unique_ptr< RangeSelectionHelper > m_apRangeSelectionHelper
void FillItemSet(SfxItemSet &rOutAttrs) const
void SetErrorBarType(tErrorBarType eNewType)
std::unique_ptr< weld::Button > m_xIbRangePositive
std::unique_ptr< weld::Label > m_xUIStringNeg
std::unique_ptr< weld::RadioButton > m_xRbPositive
tErrorBarType m_eErrorBarType
std::unique_ptr< weld::RadioButton > m_xRbRange
std::unique_ptr< weld::Frame > m_xFlParameters
void Reset(const SfxItemSet &rInAttrs)
std::unique_ptr< weld::RadioButton > m_xRbNone
weld::Entry * m_pCurrentRangeChoosingField
DECL_LINK(IndicatorChanged, weld::Toggleable &, void)
SvxChartIndicate m_eIndicate
DECL_LINK(PosValueChanged, weld::MetricSpinButton &, void)
std::unique_ptr< weld::MetricSpinButton > m_xMfNegative
DECL_LINK(CategoryChosen2, weld::ComboBox &, void)
sal_uInt16 m_nConstDecimalDigits
DECL_LINK(ChooseRange, weld::Button &, void)
std::unique_ptr< weld::CheckButton > m_xCbSyncPosNeg
std::unique_ptr< weld::Widget > m_xBxPositive
DECL_LINK(SynchronizePosAndNeg, weld::Toggleable &, void)
void SetAxisMinorStepWidthForErrorBarDecimals(double fMinorStepWidth)
virtual void listeningFinished(const OUString &rNewRange) override
std::unique_ptr< weld::Image > m_xFiBoth
void SetChartDocumentForRangeChoosing(const rtl::Reference<::chart::ChartModel > &xChartDocument)
void isRangeFieldContentValid(weld::Entry &rEdit)
std::unique_ptr< weld::Label > m_xUIStringPos
std::unique_ptr< weld::Label > m_xUIStringRbRange
std::unique_ptr< weld::Entry > m_xEdRangePositive
std::unique_ptr< weld::Entry > m_xEdRangeNegative
virtual void disposingRangeSelection() override
std::unique_ptr< weld::MetricSpinButton > m_xMfPositive
std::unique_ptr< weld::Image > m_xFiPositive
std::unique_ptr< weld::Button > m_xIbRangeNegative
ErrorBarResources(weld::Builder *pParent, weld::DialogController *pControllerDialog, const SfxItemSet &rInAttrs, bool bNoneAvailable, chart::ErrorBarResources::tErrorBarType eType=ERROR_BAR_Y)
std::unique_ptr< weld::RadioButton > m_xRbPercent
SvxChartKindError m_eErrorKind
std::unique_ptr< weld::RadioButton > m_xRbNegative
weld::DialogController * m_pController
std::unique_ptr< weld::ComboBox > m_xLbFunction
std::unique_ptr< weld::Image > m_xFiNegative
DECL_LINK(CategoryChosen, weld::Toggleable &, void)
std::unique_ptr< weld::RadioButton > m_xRbConst
std::unique_ptr< weld::RadioButton > m_xRbFunction
std::unique_ptr< weld::RadioButton > m_xRbBoth
DECL_LINK(RangeChanged, weld::Entry &, void)
std::unique_ptr< weld::Widget > m_xBxNegative