Line data Source code
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 :
20 : #ifndef INCLUDED_SC_SOURCE_UI_INC_SOLVEROPTIONS_HXX
21 : #define INCLUDED_SC_SOURCE_UI_INC_SOLVEROPTIONS_HXX
22 :
23 : #include <vcl/button.hxx>
24 : #include <vcl/dialog.hxx>
25 : #include <vcl/field.hxx>
26 : #include <vcl/fixed.hxx>
27 : #include <vcl/layout.hxx>
28 : #include <vcl/lstbox.hxx>
29 : #include <svx/checklbx.hxx>
30 : #include <com/sun/star/uno/Sequence.hxx>
31 :
32 : namespace com { namespace sun { namespace star {
33 : namespace beans { struct PropertyValue; }
34 : } } }
35 :
36 : class ScSolverOptionsDialog : public ModalDialog
37 : {
38 : VclPtr<ListBox> m_pLbEngine;
39 : VclPtr<SvxCheckListBox> m_pLbSettings;
40 : VclPtr<PushButton> m_pBtnEdit;
41 :
42 : SvLBoxButtonData* mpCheckButtonData;
43 : com::sun::star::uno::Sequence<OUString> maImplNames;
44 : com::sun::star::uno::Sequence<OUString> maDescriptions;
45 : OUString maEngine;
46 : com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> maProperties;
47 :
48 : DECL_LINK( EngineSelectHdl, void* );
49 : DECL_LINK( SettingsSelHdl, void* );
50 : DECL_LINK( SettingsDoubleClickHdl, void* );
51 : DECL_LINK( ButtonHdl, PushButton* );
52 :
53 : void ReadFromComponent();
54 : void FillListBox();
55 : void EditOption();
56 :
57 : public:
58 : ScSolverOptionsDialog( vcl::Window* pParent,
59 : const com::sun::star::uno::Sequence<OUString>& rImplNames,
60 : const com::sun::star::uno::Sequence<OUString>& rDescriptions,
61 : const OUString& rEngine,
62 : const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rProperties );
63 : virtual ~ScSolverOptionsDialog();
64 : virtual void dispose() SAL_OVERRIDE;
65 :
66 : // already updated in selection handler
67 0 : const OUString& GetEngine() const { return maEngine; }
68 : const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& GetProperties();
69 : };
70 :
71 : class ScSolverIntegerDialog : public ModalDialog
72 : {
73 : VclPtr<VclFrame> m_pFrame;
74 : VclPtr<NumericField> m_pNfValue;
75 :
76 : public:
77 : ScSolverIntegerDialog( vcl::Window * pParent );
78 : virtual ~ScSolverIntegerDialog();
79 : virtual void dispose() SAL_OVERRIDE;
80 :
81 : void SetOptionName( const OUString& rName );
82 : void SetValue( sal_Int32 nValue );
83 : sal_Int32 GetValue() const;
84 : };
85 :
86 : class ScSolverValueDialog : public ModalDialog
87 : {
88 : VclPtr<VclFrame> m_pFrame;
89 : VclPtr<Edit> m_pEdValue;
90 :
91 : public:
92 : ScSolverValueDialog( vcl::Window * pParent );
93 : virtual ~ScSolverValueDialog();
94 : virtual void dispose() SAL_OVERRIDE;
95 :
96 : void SetOptionName( const OUString& rName );
97 : void SetValue( double fValue );
98 : double GetValue() const;
99 : };
100 :
101 : #endif
102 :
103 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|