LibreOffice Module cui (master)  1
optgdlg.hxx
Go to the documentation of this file.
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 #ifndef INCLUDED_CUI_SOURCE_OPTIONS_OPTGDLG_HXX
20 #define INCLUDED_CUI_SOURCE_OPTIONS_OPTGDLG_HXX
21 #include <memory>
22 #include <vcl/button.hxx>
23 #include <vcl/lstbox.hxx>
24 #include <vcl/field.hxx>
25 #include <vcl/fixed.hxx>
26 #include <sfx2/tabdlg.hxx>
27 #include <svx/langbox.hxx>
28 
29 class CanvasSettings;
31 
32 namespace vcl {
33  class IconThemeInfo;
34 }
35 
36 namespace svt {
37  class OpenGLCfg;
38 }
39 
40 class OfaMiscTabPage : public SfxTabPage
41 {
43 private:
44  OUString m_aStrDateInfo;
45 
46  std::unique_ptr<weld::CheckButton> m_xExtHelpCB;
47  std::unique_ptr<weld::CheckButton> m_xPopUpNoHelpCB;
48  std::unique_ptr<weld::CheckButton> m_xShowTipOfTheDay;
49  std::unique_ptr<weld::Widget> m_xFileDlgFrame;
50  std::unique_ptr<weld::Widget> m_xPrintDlgFrame;
51  std::unique_ptr<weld::Widget> m_xFileDlgROImage;
52  std::unique_ptr<weld::CheckButton> m_xFileDlgCB;
53  std::unique_ptr<weld::CheckButton> m_xPrintDlgCB;
54  std::unique_ptr<weld::CheckButton> m_xDocStatusCB;
55  std::unique_ptr<weld::Widget> m_xYearFrame;
56  std::unique_ptr<weld::SpinButton> m_xYearValueField;
57  std::unique_ptr<weld::Label> m_xToYearFT;
58  std::unique_ptr<weld::CheckButton> m_xCollectUsageInfo;
59  std::unique_ptr<weld::CheckButton> m_xCrashReport;
60  std::unique_ptr<weld::Widget> m_xQuickStarterFrame;
61  std::unique_ptr<weld::CheckButton> m_xQuickLaunchCB;
62 
63  DECL_LINK(TwoFigureHdl, weld::SpinButton&, void);
64 protected:
65  virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
66 
67 public:
68  OfaMiscTabPage(TabPageParent pParent, const SfxItemSet& rSet);
69  virtual ~OfaMiscTabPage() override;
70 
71  static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rAttrSet );
72 
73  virtual bool FillItemSet( SfxItemSet* rSet ) override;
74  virtual void Reset( const SfxItemSet* rSet ) override;
75 };
76 
78 
79 class OfaViewTabPage : public SfxTabPage
80 {
81 private:
86 
87  std::unique_ptr<SvtTabAppearanceCfg> pAppearanceCfg;
88  std::unique_ptr<CanvasSettings> pCanvasSettings;
89  std::unique_ptr<SvtOptionsDrawinglayer> mpDrawinglayerOpt;
90  std::unique_ptr<svt::OpenGLCfg> mpOpenGLConfig;
91 
92  std::vector<vcl::IconThemeInfo> mInstalledIconThemes;
93 
94  std::unique_ptr<weld::ComboBox> m_xIconSizeLB;
95  std::unique_ptr<weld::ComboBox> m_xSidebarIconSizeLB;
96  std::unique_ptr<weld::ComboBox> m_xNotebookbarIconSizeLB;
97  std::unique_ptr<weld::ComboBox> m_xIconStyleLB;
98 
99  std::unique_ptr<weld::CheckButton> m_xFontAntiAliasing;
100  std::unique_ptr<weld::Label> m_xAAPointLimitLabel;
101  std::unique_ptr<weld::MetricSpinButton> m_xAAPointLimit;
102 
103  std::unique_ptr<weld::ComboBox> m_xMenuIconsLB;
104  std::unique_ptr<weld::ComboBox> m_xContextMenuShortcutsLB;
105 
106  std::unique_ptr<weld::CheckButton> m_xFontShowCB;
107 
108  std::unique_ptr<weld::CheckButton> m_xUseHardwareAccell;
109  std::unique_ptr<weld::CheckButton> m_xUseAntiAliase;
110  std::unique_ptr<weld::CheckButton> m_xUseOpenGL;
111  std::unique_ptr<weld::CheckButton> m_xForceOpenGL;
112 
113  std::unique_ptr<weld::Label> m_xOpenGLStatusEnabled;
114  std::unique_ptr<weld::Label> m_xOpenGLStatusDisabled;
115 
116  std::unique_ptr<weld::ComboBox> m_xMousePosLB;
117  std::unique_ptr<weld::ComboBox> m_xMouseMiddleLB;
118 
119 #if defined( UNX )
120  DECL_LINK(OnAntialiasingToggled, weld::ToggleButton&, void);
121 #endif
122  DECL_LINK(OnForceOpenGLToggled, weld::ToggleButton&, void);
123  void UpdateOGLStatus();
124 
125 public:
126  OfaViewTabPage(TabPageParent pParent, const SfxItemSet& rSet);
127  virtual ~OfaViewTabPage() override;
128 
129  static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rAttrSet );
130 
131  virtual bool FillItemSet( SfxItemSet* rSet ) override;
132  virtual void Reset( const SfxItemSet* rSet ) override;
133 };
134 
135 struct LanguageConfig_Impl;
136 
138 {
140  bool m_bOldCtl;
141  std::unique_ptr<LanguageConfig_Impl> pLangConfig;
142 
146 
148 
149  std::unique_ptr<weld::ComboBox> m_xUserInterfaceLB;
150  std::unique_ptr<weld::Label> m_xLocaleSettingFT;
151  std::unique_ptr<LanguageBox> m_xLocaleSettingLB;
152  std::unique_ptr<weld::CheckButton> m_xDecimalSeparatorCB;
153  std::unique_ptr<weld::Label> m_xCurrencyFT;
154  std::unique_ptr<weld::ComboBox> m_xCurrencyLB;
155  std::unique_ptr<weld::Label> m_xDatePatternsFT;
156  std::unique_ptr<weld::Entry> m_xDatePatternsED;
157 
158  std::unique_ptr<LanguageBox> m_xWesternLanguageLB;
159  std::unique_ptr<weld::Label> m_xWesternLanguageFT;
160  std::unique_ptr<LanguageBox> m_xAsianLanguageLB;
161  std::unique_ptr<LanguageBox> m_xComplexLanguageLB;
162  std::unique_ptr<weld::CheckButton> m_xCurrentDocCB;
163  std::unique_ptr<weld::CheckButton> m_xAsianSupportCB;
164  std::unique_ptr<weld::CheckButton> m_xCTLSupportCB;
165  std::unique_ptr<weld::CheckButton> m_xIgnoreLanguageChangeCB;
166 
167  DECL_LINK(SupportHdl, weld::ToggleButton&, void);
168  DECL_LINK(LocaleSettingHdl, weld::ComboBox&, void);
169  DECL_LINK(DatePatternsHdl, weld::Entry&, void);
170 
171 public:
172  OfaLanguagesTabPage(TabPageParent pParent, const SfxItemSet& rSet);
173  virtual ~OfaLanguagesTabPage() override;
174 
175  static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rAttrSet );
176 
177  virtual bool FillItemSet( SfxItemSet* rSet ) override;
178  virtual void Reset( const SfxItemSet* rSet ) override;
179 };
180 
181 #endif // INCLUDED_CUI_SOURCE_OPTIONS_OPTGDLG_HXX
182 
183 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< LanguageBox > m_xComplexLanguageLB
Definition: optgdlg.hxx:161
std::unique_ptr< weld::ComboBox > m_xIconStyleLB
Definition: optgdlg.hxx:97
std::unique_ptr< weld::Widget > m_xFileDlgROImage
Definition: optgdlg.hxx:51
OfaLanguagesTabPage(TabPageParent pParent, const SfxItemSet &rSet)
Definition: optgdlg.cxx:1117
const SfxItemSet * pSet
std::unique_ptr< weld::SpinButton > m_xYearValueField
Definition: optgdlg.hxx:56
std::unique_ptr< weld::ComboBox > m_xIconSizeLB
Definition: optgdlg.hxx:94
std::unique_ptr< weld::Label > m_xOpenGLStatusEnabled
Definition: optgdlg.hxx:113
std::unique_ptr< weld::Label > m_xOpenGLStatusDisabled
Definition: optgdlg.hxx:114
std::unique_ptr< weld::ComboBox > m_xMenuIconsLB
Definition: optgdlg.hxx:103
std::unique_ptr< SvtOptionsDrawinglayer > mpDrawinglayerOpt
Definition: optgdlg.hxx:89
std::unique_ptr< weld::Widget > m_xQuickStarterFrame
Definition: optgdlg.hxx:60
std::unique_ptr< weld::ComboBox > m_xNotebookbarIconSizeLB
Definition: optgdlg.hxx:96
DECL_LINK(TwoFigureHdl, weld::SpinButton &, void)
std::unique_ptr< weld::CheckButton > m_xForceOpenGL
Definition: optgdlg.hxx:111
std::unique_ptr< weld::ComboBox > m_xSidebarIconSizeLB
Definition: optgdlg.hxx:95
sal_Int32 nStyleLB_InitialSelection
Definition: optgdlg.hxx:85
std::unique_ptr< weld::Label > m_xAAPointLimitLabel
Definition: optgdlg.hxx:100
std::unique_ptr< weld::CheckButton > m_xExtHelpCB
Definition: optgdlg.hxx:46
virtual ~OfaLanguagesTabPage() override
Definition: optgdlg.cxx:1258
std::unique_ptr< LanguageBox > m_xWesternLanguageLB
Definition: optgdlg.hxx:158
std::unique_ptr< weld::CheckButton > m_xUseOpenGL
Definition: optgdlg.hxx:110
std::unique_ptr< weld::CheckButton > m_xFileDlgCB
Definition: optgdlg.hxx:52
std::unique_ptr< weld::MetricSpinButton > m_xAAPointLimit
Definition: optgdlg.hxx:101
std::unique_ptr< weld::CheckButton > m_xFontAntiAliasing
Definition: optgdlg.hxx:99
std::unique_ptr< weld::Label > m_xCurrencyFT
Definition: optgdlg.hxx:153
std::unique_ptr< weld::Label > m_xLocaleSettingFT
Definition: optgdlg.hxx:150
std::unique_ptr< LanguageBox > m_xAsianLanguageLB
Definition: optgdlg.hxx:160
std::unique_ptr< weld::CheckButton > m_xIgnoreLanguageChangeCB
Definition: optgdlg.hxx:165
std::unique_ptr< weld::ComboBox > m_xMousePosLB
Definition: optgdlg.hxx:116
OUString m_aStrDateInfo
Definition: optgdlg.hxx:44
std::unique_ptr< weld::CheckButton > m_xCollectUsageInfo
Definition: optgdlg.hxx:58
OfaViewTabPage(TabPageParent pParent, const SfxItemSet &rSet)
Definition: optgdlg.cxx:624
std::unique_ptr< weld::Widget > m_xYearFrame
Definition: optgdlg.hxx:55
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rAttrSet)
Definition: optgdlg.cxx:308
std::unique_ptr< weld::CheckButton > m_xCurrentDocCB
Definition: optgdlg.hxx:162
std::unique_ptr< weld::ComboBox > m_xCurrencyLB
Definition: optgdlg.hxx:154
std::unique_ptr< weld::Label > m_xWesternLanguageFT
Definition: optgdlg.hxx:159
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rAttrSet)
Definition: optgdlg.cxx:729
std::unique_ptr< weld::Label > m_xToYearFT
Definition: optgdlg.hxx:57
std::unique_ptr< weld::CheckButton > m_xQuickLaunchCB
Definition: optgdlg.hxx:61
std::unique_ptr< weld::ComboBox > m_xMouseMiddleLB
Definition: optgdlg.hxx:117
std::unique_ptr< weld::CheckButton > m_xCrashReport
Definition: optgdlg.hxx:59
std::unique_ptr< LanguageBox > m_xLocaleSettingLB
Definition: optgdlg.hxx:151
DECL_LINK(SupportHdl, weld::ToggleButton &, void)
std::unique_ptr< weld::ComboBox > m_xContextMenuShortcutsLB
Definition: optgdlg.hxx:104
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: optgdlg.cxx:199
DECL_LINK(OnAntialiasingToggled, weld::ToggleButton &, void)
std::unique_ptr< weld::Label > m_xDatePatternsFT
Definition: optgdlg.hxx:155
std::unique_ptr< SvtTabAppearanceCfg > pAppearanceCfg
Definition: optgdlg.hxx:87
OfaMiscTabPage(TabPageParent pParent, const SfxItemSet &rSet)
Definition: optgdlg.cxx:251
std::unique_ptr< weld::CheckButton > m_xUseHardwareAccell
Definition: optgdlg.hxx:108
OUString m_sSystemDefaultString
Definition: optgdlg.hxx:144
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optgdlg.cxx:313
void UpdateOGLStatus()
Definition: optgdlg.cxx:1060
sal_Int32 nNotebookbarSizeLB_InitialSelection
Definition: optgdlg.hxx:84
std::unique_ptr< weld::CheckButton > m_xUseAntiAliase
Definition: optgdlg.hxx:109
OUString m_sDecimalSeparatorLabel
Definition: optgdlg.hxx:145
std::unique_ptr< CanvasSettings > pCanvasSettings
Definition: optgdlg.hxx:88
std::unique_ptr< weld::CheckButton > m_xDocStatusCB
Definition: optgdlg.hxx:54
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optgdlg.cxx:734
std::unique_ptr< weld::CheckButton > m_xPrintDlgCB
Definition: optgdlg.hxx:53
virtual void Reset(const SfxItemSet *rSet) override
Definition: optgdlg.cxx:943
std::unique_ptr< LanguageConfig_Impl > pLangConfig
Definition: optgdlg.hxx:141
std::unique_ptr< weld::Widget > m_xFileDlgFrame
Definition: optgdlg.hxx:49
std::unique_ptr< weld::ComboBox > m_xUserInterfaceLB
Definition: optgdlg.hxx:149
std::unique_ptr< weld::CheckButton > m_xDecimalSeparatorCB
Definition: optgdlg.hxx:152
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optgdlg.cxx:1285
std::unique_ptr< weld::Entry > m_xDatePatternsED
Definition: optgdlg.hxx:156
std::unique_ptr< weld::CheckButton > m_xPopUpNoHelpCB
Definition: optgdlg.hxx:47
DeactivateRC
virtual ~OfaMiscTabPage() override
Definition: optgdlg.cxx:304
std::unique_ptr< weld::Widget > m_xPrintDlgFrame
Definition: optgdlg.hxx:50
virtual void DeactivatePage()
std::unique_ptr< svt::OpenGLCfg > mpOpenGLConfig
Definition: optgdlg.hxx:90
sal_Int32 nSizeLB_InitialSelection
Definition: optgdlg.hxx:82
virtual ~OfaViewTabPage() override
Definition: optgdlg.cxx:706
std::unique_ptr< weld::CheckButton > m_xShowTipOfTheDay
Definition: optgdlg.hxx:48
sal_Int32 nSidebarSizeLB_InitialSelection
Definition: optgdlg.hxx:83
virtual void Reset(const SfxItemSet *rSet) override
Definition: optgdlg.cxx:385
virtual void Reset(const SfxItemSet *rSet) override
Definition: optgdlg.cxx:1523
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rAttrSet)
Definition: optgdlg.cxx:1262
std::vector< vcl::IconThemeInfo > mInstalledIconThemes
Definition: optgdlg.hxx:92
std::unique_ptr< weld::CheckButton > m_xFontShowCB
Definition: optgdlg.hxx:106
std::unique_ptr< weld::CheckButton > m_xAsianSupportCB
Definition: optgdlg.hxx:163
std::unique_ptr< weld::CheckButton > m_xCTLSupportCB
Definition: optgdlg.hxx:164
OUString m_sUserLocaleValue
Definition: optgdlg.hxx:143