| 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 <tools/link.hxx> |
| 22 |
#include <svl/itemset.hxx> |
| 23 |
#include <svx/chrtitem.hxx> |
| 24 |
|
| 25 |
namespace weld { class Builder; } |
| 26 |
namespace weld { class CheckButton; } |
| 27 |
namespace weld { class ComboBox; } |
| 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 Toggleable; } |
| 34 |
|
| 35 |
class SvNumberFormatter; |
| 36 |
|
| 37 |
namespace chart |
| 38 |
{ |
| 39 |
|
| 40 |
class TrendlineResources final |
| 41 |
{ |
| 42 |
public: |
| 43 |
TrendlineResources(weld::Builder& rParent, const SfxItemSet& rInAttrs); |
| 44 |
~TrendlineResources(); |
| 45 |
|
| 46 |
void Reset(const SfxItemSet& rInAttrs); |
| 47 |
void FillItemSet(SfxItemSet* rOutAttrs) const; |
| 48 |
|
| 49 |
void FillValueSets(); |
| 50 |
|
| 51 |
void SetNumFormatter( SvNumberFormatter* pFormatter ); |
| 52 |
void SetNbPoints( sal_Int32 nNbPoints ); |
| 53 |
|
| 54 |
private: |
| 55 |
SvxChartRegress m_eTrendLineType; |
| 56 |
|
| 57 |
bool m_bTrendLineUnique; |
| 58 |
|
| 59 |
SvNumberFormatter* m_pNumFormatter; |
| 60 |
sal_Int32 m_nNbPoints; |
| 61 |
|
| 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; |
| 68 |
|
| 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; |
| 75 |
|
| 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; |
| 87 |
std::unique_ptr<weld::ComboBox> m_xCB_RegressionMovingType; |
| 88 |
|
| 89 |
void UpdateControlStates(); |
| 90 |
DECL_LINK(SelectTrendLine, weld::Toggleable&, void); |
| 91 |
DECL_LINK(ChangeSpinValue, weld::SpinButton&, void); |
| 92 |
DECL_LINK(ChangeFormattedValue, weld::FormattedSpinButton&, void); |
| 93 |
DECL_LINK(ShowEquation, weld::Toggleable&, void); |
| 94 |
}; |
| 95 |
|
| 96 |
} // namespace chart |
| 97 |
|
| 98 |
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |