xref: /aoo42x/main/cui/source/inc/optimprove.hxx (revision c4eee24d)
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 _SVX_OPTIMPROVE_HXX
24 #define _SVX_OPTIMPROVE_HXX
25 
26 // include ---------------------------------------------------------------
27 
28 #include <vcl/tabpage.hxx>
29 #include <vcl/fixed.hxx>
30 #include <vcl/button.hxx>
31 #include <svtools/fixedhyper.hxx>
32 #include <sfx2/basedlgs.hxx>
33 #include <sfx2/tabdlg.hxx>
34 
35 // class SvxImprovementPage ----------------------------------------------
36 
37 class SvxImprovementPage : public TabPage
38 {
39 private:
40     FixedLine       m_aImproveFL;
41     FixedText       m_aInvitationFT;
42     RadioButton     m_aYesRB;
43     RadioButton     m_aNoRB;
44     FixedLine       m_aDataFL;
45     FixedText       m_aNumberOfReportsFT;
46     FixedText       m_aNumberOfReportsValueFT;
47     FixedText       m_aNumberOfActionsFT;
48     FixedText       m_aNumberOfActionsValueFT;
49     PushButton      m_aShowDataPB;
50 
51     String          m_sInfo;
52     String          m_sMoreInfo;
53 
54 public:
55     SvxImprovementPage( Window* pParent );
56     ~SvxImprovementPage();
57 
IsYesChecked() const58     inline bool     IsYesChecked() const { return m_aYesRB.IsChecked() != sal_False; }
59 
GetPageText() const60     inline String   GetPageText() const { return GetText(); }
GetInvitationText() const61     inline String   GetInvitationText() const { return m_aInvitationFT.GetText(); }
GetYesButtonText() const62     inline String   GetYesButtonText() const { return m_aYesRB.GetText(); }
GetNoButtonText() const63     inline String   GetNoButtonText() const { return m_aNoRB.GetText(); }
GetInfoText() const64     inline String   GetInfoText() const { return m_sInfo; }
GetTitleText() const65     inline String   GetTitleText() const { return m_aImproveFL.GetText(); }
66 };
67 
68 class SvxImprovementOptionsPage : public SfxTabPage
69 {
70 private:
71     FixedLine                   m_aImproveFL;
72     FixedText                   m_aInvitationFT;
73     RadioButton                 m_aYesRB;
74     RadioButton                 m_aNoRB;
75     svt::FixedHyperlinkImage    m_aInfoFI;
76     FixedLine                   m_aDataFL;
77     FixedText                   m_aNumberOfReportsFT;
78     FixedText                   m_aNumberOfReportsValueFT;
79     FixedText                   m_aNumberOfActionsFT;
80     FixedText                   m_aNumberOfActionsValueFT;
81     PushButton                  m_aShowDataPB;
82 
83     String                      m_sInfo;
84     String                      m_sMoreInfo;
85     ::rtl::OUString             m_sLogPath;
86 
87     SvxImprovementOptionsPage( Window* pParent, const SfxItemSet& rSet );
88 
89     DECL_LINK( HandleHyperlink, svt::FixedHyperlinkImage * );
90     DECL_LINK( HandleShowData, PushButton * );
91 
92 public:
93     virtual             ~SvxImprovementOptionsPage();
94 
95     static SfxTabPage*  Create( Window* pParent, const SfxItemSet& rSet );
96 
97     virtual sal_Bool    FillItemSet( SfxItemSet& rSet );
98     virtual void        Reset( const SfxItemSet& rSet );
99 };
100 
101 class SvxImprovementDialog : public SfxSingleTabDialog
102 {
103 private:
104     SvxImprovementPage*     m_pPage;
105 
106     DECL_LINK( HandleOK, OKButton * );
107     DECL_LINK( HandleHyperlink, svt::FixedHyperlinkImage * );
108 
109 public:
110     SvxImprovementDialog( Window* pParent, const String& rInfoURL );
111 };
112 
113 #endif
114 
115