xref: /trunk/main/sc/source/ui/inc/solveroptions.hxx (revision 38d50f7b)
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 
24 #ifndef SC_SOLVEROPTIONS_HXX
25 #define SC_SOLVEROPTIONS_HXX
26 
27 #include <vcl/dialog.hxx>
28 
29 #ifndef _SV_BUTTON_HXX //autogen
30 #include <vcl/button.hxx>
31 #endif
32 #include <vcl/fixed.hxx>
33 #include <vcl/lstbox.hxx>
34 #include <vcl/field.hxx>
35 #include <svx/checklbx.hxx>
36 #include <com/sun/star/uno/Sequence.hxx>
37 
38 namespace com { namespace sun { namespace star {
39     namespace beans { struct PropertyValue; }
40 } } }
41 
42 
43 
44 class ScSolverOptionsDialog : public ModalDialog
45 {
46     FixedText       maFtEngine;
47     ListBox         maLbEngine;
48     FixedText       maFtSettings;
49     SvxCheckListBox maLbSettings;
50     PushButton      maBtnEdit;
51     FixedLine       maFlButtons;
52     HelpButton      maBtnHelp;
53     OKButton        maBtnOk;
54     CancelButton    maBtnCancel;
55 
56     SvLBoxButtonData* mpCheckButtonData;
57     com::sun::star::uno::Sequence<rtl::OUString> maImplNames;
58     com::sun::star::uno::Sequence<rtl::OUString> maDescriptions;
59     String          maEngine;
60     com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> maProperties;
61 
62     DECL_LINK( EngineSelectHdl, ListBox* );
63     DECL_LINK( SettingsSelHdl, SvxCheckListBox* );
64     DECL_LINK( SettingsDoubleClickHdl, SvTreeListBox* );
65     DECL_LINK( ButtonHdl, PushButton* );
66 
67     void    ReadFromComponent();
68     void    FillListBox();
69     void    EditOption();
70 
71 public:
72     ScSolverOptionsDialog( Window* pParent,
73                            const com::sun::star::uno::Sequence<rtl::OUString>& rImplNames,
74                            const com::sun::star::uno::Sequence<rtl::OUString>& rDescriptions,
75                            const String& rEngine,
76                            const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rProperties );
77     ~ScSolverOptionsDialog();
78 
79     const String& GetEngine() const;
80     const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& GetProperties();
81 };
82 
83 
84 class ScSolverIntegerDialog : public ModalDialog
85 {
86     FixedText       maFtName;
87     NumericField    maNfValue;
88     FixedLine       maFlButtons;
89     OKButton        maBtnOk;
90     CancelButton    maBtnCancel;
91 
92 public:
93     ScSolverIntegerDialog( Window * pParent );
94     ~ScSolverIntegerDialog();
95 
96     void        SetOptionName( const String& rName );
97     void        SetValue( sal_Int32 nValue );
98     sal_Int32   GetValue() const;
99 };
100 
101 class ScSolverValueDialog : public ModalDialog
102 {
103     FixedText       maFtName;
104     Edit            maEdValue;
105     FixedLine       maFlButtons;
106     OKButton        maBtnOk;
107     CancelButton    maBtnCancel;
108 
109 public:
110     ScSolverValueDialog( Window * pParent );
111     ~ScSolverValueDialog();
112 
113     void        SetOptionName( const String& rName );
114     void        SetValue( double fValue );
115     double      GetValue() const;
116 };
117 
118 #endif
119 
120