vcl: allow for overriding the default PDF rendering resolution
[LibreOffice.git] / chart2 / source / controller / dialogs / res_Trendline.hxx
blob91f70f241bfc80b1e0eb2e3ff52f9217ace07540
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 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_RES_TRENDLINE_HXX
20 #define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_RES_TRENDLINE_HXX
22 #include <tools/link.hxx>
23 #include <svl/itemset.hxx>
24 #include <svx/chrtitem.hxx>
26 namespace weld { class Builder; }
27 namespace weld { class CheckButton; }
28 namespace weld { class Entry; }
29 namespace weld { class FormattedSpinButton; }
30 namespace weld { class Image; }
31 namespace weld { class RadioButton; }
32 namespace weld { class SpinButton; }
33 namespace weld { class ToggleButton; }
35 class SvNumberFormatter;
37 namespace chart
40 class TrendlineResources final
42 public:
43 TrendlineResources(weld::Builder& rParent, const SfxItemSet& rInAttrs);
44 ~TrendlineResources();
46 void Reset(const SfxItemSet& rInAttrs);
47 void FillItemSet(SfxItemSet* rOutAttrs) const;
49 void FillValueSets();
51 void SetNumFormatter( SvNumberFormatter* pFormatter );
52 void SetNbPoints( sal_Int32 nNbPoints );
54 private:
55 SvxChartRegress m_eTrendLineType;
57 bool m_bTrendLineUnique;
59 SvNumberFormatter* m_pNumFormatter;
60 sal_Int32 m_nNbPoints;
62 std::unique_ptr<weld::RadioButton> m_xRB_Linear;
63 std::unique_ptr<weld::RadioButton> m_xRB_Logarithmic;
64 std::unique_ptr<weld::RadioButton> m_xRB_Exponential;
65 std::unique_ptr<weld::RadioButton> m_xRB_Power;
66 std::unique_ptr<weld::RadioButton> m_xRB_Polynomial;
67 std::unique_ptr<weld::RadioButton> m_xRB_MovingAverage;
69 std::unique_ptr<weld::Image> m_xFI_Linear;
70 std::unique_ptr<weld::Image> m_xFI_Logarithmic;
71 std::unique_ptr<weld::Image> m_xFI_Exponential;
72 std::unique_ptr<weld::Image> m_xFI_Power;
73 std::unique_ptr<weld::Image> m_xFI_Polynomial;
74 std::unique_ptr<weld::Image> m_xFI_MovingAverage;
76 std::unique_ptr<weld::SpinButton> m_xNF_Degree;
77 std::unique_ptr<weld::SpinButton> m_xNF_Period;
78 std::unique_ptr<weld::Entry> m_xEE_Name;
79 std::unique_ptr<weld::FormattedSpinButton> m_xFmtFld_ExtrapolateForward;
80 std::unique_ptr<weld::FormattedSpinButton> m_xFmtFld_ExtrapolateBackward;
81 std::unique_ptr<weld::CheckButton> m_xCB_SetIntercept;
82 std::unique_ptr<weld::FormattedSpinButton> m_xFmtFld_InterceptValue;
83 std::unique_ptr<weld::CheckButton> m_xCB_ShowEquation;
84 std::unique_ptr<weld::Entry> m_xEE_XName;
85 std::unique_ptr<weld::Entry> m_xEE_YName;
86 std::unique_ptr<weld::CheckButton> m_xCB_ShowCorrelationCoeff;
88 void UpdateControlStates();
89 DECL_LINK(SelectTrendLine, weld::ToggleButton&, void);
90 DECL_LINK(ChangeSpinValue, weld::SpinButton&, void);
91 DECL_LINK(ChangeFormattedValue, weld::FormattedSpinButton&, void);
92 DECL_LINK(ShowEquation, weld::ToggleButton&, void);
95 } // namespace chart
97 // INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_RES_TRENDLINE_HXX
98 #endif
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */