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 :
10 : #ifndef INCLUDED_SC_SOURCE_UI_OPTDLG_CALCOPTIONSDLG_HXX
11 : #define INCLUDED_SC_SOURCE_UI_OPTDLG_CALCOPTIONSDLG_HXX
12 :
13 : #include <config_features.h>
14 :
15 : #include <vcl/dialog.hxx>
16 : #include <vcl/button.hxx>
17 : #include <vcl/edit.hxx>
18 : #include <vcl/field.hxx>
19 : #include <vcl/fixed.hxx>
20 : #include <vcl/layout.hxx>
21 : #include <vcl/lstbox.hxx>
22 :
23 : #include <svx/checklbx.hxx>
24 :
25 : #include <svtools/treelistbox.hxx>
26 :
27 : #include "calcconfig.hxx"
28 :
29 : #if HAVE_FEATURE_OPENCL
30 : #include <opencl/openclconfig.hxx>
31 : #include <opencl/platforminfo.hxx>
32 : #endif
33 :
34 : class ScCalcOptionsDialog : public ModalDialog
35 : {
36 : public:
37 : ScCalcOptionsDialog(vcl::Window* pParent, const ScCalcConfig& rConfig);
38 : virtual ~ScCalcOptionsDialog();
39 : virtual void dispose() SAL_OVERRIDE;
40 :
41 : DECL_LINK( BtnAutomaticSelectHdl, void* );
42 : DECL_LINK( DeviceSelHdl, void* );
43 : DECL_LINK( NumModifiedHdl, void * );
44 : DECL_LINK( EditModifiedHdl, Edit * );
45 : DECL_STATIC_LINK( ScCalcOptionsDialog, TestClickHdl, PushButton* );
46 : DECL_LINK( AsZeroModifiedHdl, CheckBox*);
47 : DECL_LINK( ConversionModifiedHdl, ListBox*);
48 : DECL_LINK( SyntaxModifiedHdl, ListBox*);
49 : DECL_LINK( CBUseOpenCLHdl, CheckBox*);
50 : DECL_LINK( SpinOpenCLMinSizeHdl, NumericField*);
51 :
52 0 : const ScCalcConfig& GetConfig() const { return maConfig;}
53 :
54 : private:
55 : void OpenCLAutomaticSelectionChanged();
56 : void SelectedDeviceChanged();
57 :
58 : SvTreeListEntry *createItem(const OUString &rCaption, const OUString& sValue) const;
59 : void setValueAt(size_t nPos, const OUString &rString);
60 : #if HAVE_FEATURE_OPENCL
61 : OpenCLConfig::ImplMatcherSet& CurrentWhiteOrBlackList();
62 : const OpenCLConfig::ImplMatcher& CurrentWhiteOrBlackListEntry();
63 : #endif
64 :
65 : private:
66 : VclPtr<CheckBox> mpEmptyAsZero;
67 : VclPtr<ListBox> mpConversion;
68 : VclPtr<ListBox> mpSyntax;
69 :
70 : VclPtr<CheckBox> mpUseOpenCL;
71 : VclPtr<NumericField> mpSpinButton;
72 : VclPtr<VclMultiLineEdit> mpEditField;
73 : VclPtr<PushButton> mpTestButton;
74 :
75 : VclPtr<FixedText> mpFtFrequency;
76 : VclPtr<FixedText> mpFtComputeUnits;
77 : VclPtr<FixedText> mpFtMemory;
78 :
79 : VclPtr<SvTreeListBox> mpOpenclInfoList;
80 : VclPtr<RadioButton> mpBtnAutomaticSelectionTrue;
81 : VclPtr<RadioButton> mpBtnAutomaticSelectionFalse;
82 :
83 : OUString maSoftware;
84 :
85 : ScCalcConfig maConfig;
86 : #if HAVE_FEATURE_OPENCL
87 : std::vector<OpenCLPlatformInfo> maPlatformInfo;
88 : #endif
89 :
90 : bool mbSelectedEmptyStringAsZero;
91 : };
92 :
93 : #endif
94 :
95 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|