xref: /aoo41x/main/cui/source/inc/optimprove.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _SVX_OPTIMPROVE_HXX
28 #define _SVX_OPTIMPROVE_HXX
29 
30 // include ---------------------------------------------------------------
31 
32 #include <vcl/tabpage.hxx>
33 #include <vcl/fixed.hxx>
34 #include <vcl/button.hxx>
35 #include <svtools/fixedhyper.hxx>
36 #include <sfx2/basedlgs.hxx>
37 #include <sfx2/tabdlg.hxx>
38 
39 // class SvxImprovementPage ----------------------------------------------
40 
41 class SvxImprovementPage : public TabPage
42 {
43 private:
44     FixedLine       m_aImproveFL;
45     FixedText       m_aInvitationFT;
46     RadioButton     m_aYesRB;
47     RadioButton     m_aNoRB;
48     FixedLine       m_aDataFL;
49     FixedText       m_aNumberOfReportsFT;
50     FixedText       m_aNumberOfReportsValueFT;
51     FixedText       m_aNumberOfActionsFT;
52     FixedText       m_aNumberOfActionsValueFT;
53     PushButton      m_aShowDataPB;
54 
55     String          m_sInfo;
56     String          m_sMoreInfo;
57 
58 public:
59     SvxImprovementPage( Window* pParent );
60     ~SvxImprovementPage();
61 
62     inline bool     IsYesChecked() const { return m_aYesRB.IsChecked() != sal_False; }
63 
64     inline String   GetPageText() const { return GetText(); }
65     inline String   GetInvitationText() const { return m_aInvitationFT.GetText(); }
66     inline String   GetYesButtonText() const { return m_aYesRB.GetText(); }
67     inline String   GetNoButtonText() const { return m_aNoRB.GetText(); }
68     inline String   GetInfoText() const { return m_sInfo; }
69     inline String   GetTitleText() const { return m_aImproveFL.GetText(); }
70 };
71 
72 class SvxImprovementOptionsPage : public SfxTabPage
73 {
74 private:
75     FixedLine                   m_aImproveFL;
76     FixedText                   m_aInvitationFT;
77     RadioButton                 m_aYesRB;
78     RadioButton                 m_aNoRB;
79     svt::FixedHyperlinkImage    m_aInfoFI;
80     FixedLine                   m_aDataFL;
81     FixedText                   m_aNumberOfReportsFT;
82     FixedText                   m_aNumberOfReportsValueFT;
83     FixedText                   m_aNumberOfActionsFT;
84     FixedText                   m_aNumberOfActionsValueFT;
85     PushButton                  m_aShowDataPB;
86 
87     String                      m_sInfo;
88     String                      m_sMoreInfo;
89     ::rtl::OUString             m_sLogPath;
90 
91     SvxImprovementOptionsPage( Window* pParent, const SfxItemSet& rSet );
92 
93     DECL_LINK( HandleHyperlink, svt::FixedHyperlinkImage * );
94     DECL_LINK( HandleShowData, PushButton * );
95 
96 public:
97     virtual             ~SvxImprovementOptionsPage();
98 
99     static SfxTabPage*  Create( Window* pParent, const SfxItemSet& rSet );
100 
101     virtual sal_Bool    FillItemSet( SfxItemSet& rSet );
102     virtual void        Reset( const SfxItemSet& rSet );
103 };
104 
105 class SvxImprovementDialog : public SfxSingleTabDialog
106 {
107 private:
108     SvxImprovementPage*     m_pPage;
109 
110     DECL_LINK( HandleOK, OKButton * );
111     DECL_LINK( HandleHyperlink, svt::FixedHyperlinkImage * );
112 
113 public:
114     SvxImprovementDialog( Window* pParent, const String& rInfoURL );
115 };
116 
117 #endif
118 
119