1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef CHART2_RES_TRENDLINE_HXX
24 #define CHART2_RES_TRENDLINE_HXX
25 
26 #include <vcl/window.hxx>
27 #include <vcl/button.hxx>
28 #include <vcl/fixed.hxx>
29 #include <svtools/valueset.hxx>
30 #include <svl/itemset.hxx>
31 #include <svx/chrtitem.hxx>
32 
33 namespace chart
34 {
35 
36 class TrendlineResources
37 {
38 public:
39     TrendlineResources( Window* pParent, const SfxItemSet& rInAttrs, bool bNoneAvailable );
40     virtual ~TrendlineResources();
41 
42     void Reset(const SfxItemSet& rInAttrs);
43     sal_Bool FillItemSet(SfxItemSet& rOutAttrs) const;
44 
45     void FillValueSets();
46 
47     long adjustControlSizes();
48 
49 private:
50     FixedLine m_aFLType;
51     RadioButton m_aRBNone;
52     RadioButton m_aRBLinear;
53     RadioButton m_aRBLogarithmic;
54     RadioButton m_aRBExponential;
55     RadioButton m_aRBPower;
56 
57     FixedImage  m_aFINone;
58     FixedImage  m_aFILinear;
59     FixedImage  m_aFILogarithmic;
60     FixedImage  m_aFIExponential;
61     FixedImage  m_aFIPower;
62 
63     FixedLine m_aFLEquation;
64     CheckBox m_aCBShowEquation;
65     CheckBox m_aCBShowCorrelationCoeff;
66 
67     SvxChartRegress     m_eTrendLineType;
68 
69     bool                m_bNoneAvailable;
70     bool                m_bTrendLineUnique;
71 
72     void UpdateControlStates();
73     DECL_LINK( SelectTrendLine, RadioButton * );
74 };
75 
76 } //  namespace chart
77 
78 // CHART2_RES_TRENDLINE_HXX
79 #endif
80