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 <sfx2/tabdlg.hxx>
23 #include <svx/langbox.hxx>
24 
25 class CanvasSettings;
27 
28 namespace vcl {
29  class IconThemeInfo;
30 }
31 
32 namespace svt {
33  class OpenGLCfg;
34 }
35 
36 class OfaMiscTabPage : public SfxTabPage
37 {
38 private:
39  OUString m_aStrDateInfo;
40 
41  std::unique_ptr<weld::CheckButton> m_xExtHelpCB;
42  std::unique_ptr<weld::CheckButton> m_xPopUpNoHelpCB;
43  std::unique_ptr<weld::CheckButton> m_xShowTipOfTheDay;
44  std::unique_ptr<weld::Widget> m_xFileDlgFrame;
45  std::unique_ptr<weld::Widget> m_xPrintDlgFrame;
46  std::unique_ptr<weld::Widget> m_xFileDlgROImage;
47  std::unique_ptr<weld::CheckButton> m_xFileDlgCB;
48  std::unique_ptr<weld::CheckButton> m_xPrintDlgCB;
49  std::unique_ptr<weld::CheckButton> m_xDocStatusCB;
50  std::unique_ptr<weld::Widget> m_xYearFrame;
51  std::unique_ptr<weld::SpinButton> m_xYearValueField;
52  std::unique_ptr<weld::Label> m_xToYearFT;
53  std::unique_ptr<weld::CheckButton> m_xCollectUsageInfo;
54  std::unique_ptr<weld::CheckButton> m_xCrashReport;
55  std::unique_ptr<weld::Widget> m_xQuickStarterFrame;
56  std::unique_ptr<weld::CheckButton> m_xQuickLaunchCB;
57 #if defined(_WIN32)
58  std::unique_ptr<weld::Widget> m_xFileAssocFrame;
59  std::unique_ptr<weld::Button> m_xFileAssocBtn;
60 #endif
61 
62  DECL_LINK(TwoFigureHdl, weld::SpinButton&, void);
63 #if defined(_WIN32)
64  DECL_LINK(FileAssocClick, weld::Button&, void);
65 #endif
66 protected:
67  virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
68 
69 public:
70  OfaMiscTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
71  virtual ~OfaMiscTabPage() override;
72 
73  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
74 
75  virtual bool FillItemSet( SfxItemSet* rSet ) override;
76  virtual void Reset( const SfxItemSet* rSet ) override;
77 };
78 
80 
81 class OfaViewTabPage : public SfxTabPage
82 {
83 private:
88 
89  std::unique_ptr<SvtTabAppearanceCfg> pAppearanceCfg;
90  std::unique_ptr<CanvasSettings> pCanvasSettings;
91  std::unique_ptr<SvtOptionsDrawinglayer> mpDrawinglayerOpt;
92  std::unique_ptr<svt::OpenGLCfg> mpOpenGLConfig;
93 
94  std::vector<vcl::IconThemeInfo> mInstalledIconThemes;
95 
96  std::unique_ptr<weld::ComboBox> m_xIconSizeLB;
97  std::unique_ptr<weld::ComboBox> m_xSidebarIconSizeLB;
98  std::unique_ptr<weld::ComboBox> m_xNotebookbarIconSizeLB;
99  std::unique_ptr<weld::ComboBox> m_xIconStyleLB;
100 
101  std::unique_ptr<weld::CheckButton> m_xFontAntiAliasing;
102  std::unique_ptr<weld::Label> m_xAAPointLimitLabel;
103  std::unique_ptr<weld::MetricSpinButton> m_xAAPointLimit;
104 
105  std::unique_ptr<weld::Widget> m_xMenuIconBox;
106  std::unique_ptr<weld::ComboBox> m_xMenuIconsLB;
107 
108  std::unique_ptr<weld::ComboBox> m_xContextMenuShortcutsLB;
109 
110  std::unique_ptr<weld::CheckButton> m_xFontShowCB;
111 
112  std::unique_ptr<weld::CheckButton> m_xUseHardwareAccell;
113  std::unique_ptr<weld::CheckButton> m_xUseAntiAliase;
114  std::unique_ptr<weld::CheckButton> m_xUseOpenGL;
115  std::unique_ptr<weld::CheckButton> m_xForceOpenGL;
116 
117  std::unique_ptr<weld::Label> m_xOpenGLStatusEnabled;
118  std::unique_ptr<weld::Label> m_xOpenGLStatusDisabled;
119 
120  std::unique_ptr<weld::ComboBox> m_xMousePosLB;
121  std::unique_ptr<weld::ComboBox> m_xMouseMiddleLB;
122 
123 #if defined( UNX )
124  DECL_LINK(OnAntialiasingToggled, weld::ToggleButton&, void);
125 #endif
126  DECL_LINK(OnForceOpenGLToggled, weld::ToggleButton&, void);
127  void UpdateOGLStatus();
128 
129 public:
130  OfaViewTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
131  virtual ~OfaViewTabPage() override;
132 
133  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
134 
135  virtual bool FillItemSet( SfxItemSet* rSet ) override;
136  virtual void Reset( const SfxItemSet* rSet ) override;
137 };
138 
139 struct LanguageConfig_Impl;
140 
142 {
144  bool m_bOldCtl;
145  std::unique_ptr<LanguageConfig_Impl> pLangConfig;
146 
150 
152 
153  std::unique_ptr<weld::ComboBox> m_xUserInterfaceLB;
154  std::unique_ptr<weld::Label> m_xLocaleSettingFT;
155  std::unique_ptr<SvxLanguageBox> m_xLocaleSettingLB;
156  std::unique_ptr<weld::CheckButton> m_xDecimalSeparatorCB;
157  std::unique_ptr<weld::Label> m_xCurrencyFT;
158  std::unique_ptr<weld::ComboBox> m_xCurrencyLB;
159  std::unique_ptr<weld::Label> m_xDatePatternsFT;
160  std::unique_ptr<weld::Entry> m_xDatePatternsED;
161 
162  std::unique_ptr<SvxLanguageBox> m_xWesternLanguageLB;
163  std::unique_ptr<weld::Label> m_xWesternLanguageFT;
164  std::unique_ptr<SvxLanguageBox> m_xAsianLanguageLB;
165  std::unique_ptr<SvxLanguageBox> m_xComplexLanguageLB;
166  std::unique_ptr<weld::CheckButton> m_xCurrentDocCB;
167  std::unique_ptr<weld::CheckButton> m_xAsianSupportCB;
168  std::unique_ptr<weld::CheckButton> m_xCTLSupportCB;
169  std::unique_ptr<weld::CheckButton> m_xIgnoreLanguageChangeCB;
170 
171  DECL_LINK(SupportHdl, weld::ToggleButton&, void);
172  DECL_LINK(LocaleSettingHdl, weld::ComboBox&, void);
173  DECL_LINK(DatePatternsHdl, weld::Entry&, void);
174 
175 public:
176  OfaLanguagesTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
177  virtual ~OfaLanguagesTabPage() override;
178 
179  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
180 
181  virtual bool FillItemSet( SfxItemSet* rSet ) override;
182  virtual void Reset( const SfxItemSet* rSet ) override;
183 };
184 
185 #endif // INCLUDED_CUI_SOURCE_OPTIONS_OPTGDLG_HXX
186 
187 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< SvxLanguageBox > m_xComplexLanguageLB
Definition: optgdlg.hxx:165
OfaMiscTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optgdlg.cxx:235
std::unique_ptr< weld::ComboBox > m_xIconStyleLB
Definition: optgdlg.hxx:99
std::unique_ptr< weld::Widget > m_xFileDlgROImage
Definition: optgdlg.hxx:46
const SfxItemSet * pSet
std::unique_ptr< weld::SpinButton > m_xYearValueField
Definition: optgdlg.hxx:51
std::unique_ptr< weld::ComboBox > m_xIconSizeLB
Definition: optgdlg.hxx:96
std::unique_ptr< weld::Label > m_xOpenGLStatusEnabled
Definition: optgdlg.hxx:117
std::unique_ptr< weld::Label > m_xOpenGLStatusDisabled
Definition: optgdlg.hxx:118
std::unique_ptr< weld::ComboBox > m_xMenuIconsLB
Definition: optgdlg.hxx:106
std::unique_ptr< SvtOptionsDrawinglayer > mpDrawinglayerOpt
Definition: optgdlg.hxx:91
std::unique_ptr< weld::Widget > m_xQuickStarterFrame
Definition: optgdlg.hxx:55
std::unique_ptr< SvxLanguageBox > m_xLocaleSettingLB
Definition: optgdlg.hxx:155
std::unique_ptr< weld::ComboBox > m_xNotebookbarIconSizeLB
Definition: optgdlg.hxx:98
DECL_LINK(TwoFigureHdl, weld::SpinButton &, void)
std::unique_ptr< weld::CheckButton > m_xForceOpenGL
Definition: optgdlg.hxx:115
std::unique_ptr< weld::ComboBox > m_xSidebarIconSizeLB
Definition: optgdlg.hxx:97
sal_Int32 nStyleLB_InitialSelection
Definition: optgdlg.hxx:87
std::unique_ptr< weld::Label > m_xAAPointLimitLabel
Definition: optgdlg.hxx:102
std::unique_ptr< weld::CheckButton > m_xExtHelpCB
Definition: optgdlg.hxx:41
virtual ~OfaLanguagesTabPage() override
Definition: optgdlg.cxx:1278
std::unique_ptr< weld::CheckButton > m_xUseOpenGL
Definition: optgdlg.hxx:114
std::unique_ptr< weld::CheckButton > m_xFileDlgCB
Definition: optgdlg.hxx:47
std::unique_ptr< weld::MetricSpinButton > m_xAAPointLimit
Definition: optgdlg.hxx:103
std::unique_ptr< weld::CheckButton > m_xFontAntiAliasing
Definition: optgdlg.hxx:101
std::unique_ptr< weld::Label > m_xCurrencyFT
Definition: optgdlg.hxx:157
std::unique_ptr< weld::Label > m_xLocaleSettingFT
Definition: optgdlg.hxx:154
std::unique_ptr< weld::CheckButton > m_xIgnoreLanguageChangeCB
Definition: optgdlg.hxx:169
std::unique_ptr< weld::ComboBox > m_xMousePosLB
Definition: optgdlg.hxx:120
OUString m_aStrDateInfo
Definition: optgdlg.hxx:39
std::unique_ptr< weld::CheckButton > m_xCollectUsageInfo
Definition: optgdlg.hxx:53
OfaViewTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optgdlg.cxx:641
std::unique_ptr< weld::Widget > m_xYearFrame
Definition: optgdlg.hxx:50
std::unique_ptr< weld::CheckButton > m_xCurrentDocCB
Definition: optgdlg.hxx:166
std::unique_ptr< weld::ComboBox > m_xCurrencyLB
Definition: optgdlg.hxx:158
std::unique_ptr< weld::Label > m_xWesternLanguageFT
Definition: optgdlg.hxx:163
std::unique_ptr< weld::Label > m_xToYearFT
Definition: optgdlg.hxx:52
std::unique_ptr< weld::CheckButton > m_xQuickLaunchCB
Definition: optgdlg.hxx:56
std::unique_ptr< weld::ComboBox > m_xMouseMiddleLB
Definition: optgdlg.hxx:121
std::unique_ptr< weld::CheckButton > m_xCrashReport
Definition: optgdlg.hxx:54
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optgdlg.cxx:1282
std::unique_ptr< SvxLanguageBox > m_xAsianLanguageLB
Definition: optgdlg.hxx:164
DECL_LINK(SupportHdl, weld::ToggleButton &, void)
std::unique_ptr< weld::ComboBox > m_xContextMenuShortcutsLB
Definition: optgdlg.hxx:108
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: optgdlg.cxx:183
DECL_LINK(OnAntialiasingToggled, weld::ToggleButton &, void)
std::unique_ptr< weld::Label > m_xDatePatternsFT
Definition: optgdlg.hxx:159
std::unique_ptr< SvtTabAppearanceCfg > pAppearanceCfg
Definition: optgdlg.hxx:89
std::unique_ptr< weld::CheckButton > m_xUseHardwareAccell
Definition: optgdlg.hxx:112
OUString m_sSystemDefaultString
Definition: optgdlg.hxx:148
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optgdlg.cxx:306
void UpdateOGLStatus()
Definition: optgdlg.cxx:1079
sal_Int32 nNotebookbarSizeLB_InitialSelection
Definition: optgdlg.hxx:86
std::unique_ptr< weld::CheckButton > m_xUseAntiAliase
Definition: optgdlg.hxx:113
OUString m_sDecimalSeparatorLabel
Definition: optgdlg.hxx:149
std::unique_ptr< CanvasSettings > pCanvasSettings
Definition: optgdlg.hxx:90
std::unique_ptr< weld::CheckButton > m_xDocStatusCB
Definition: optgdlg.hxx:49
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optgdlg.cxx:753
std::unique_ptr< weld::CheckButton > m_xPrintDlgCB
Definition: optgdlg.hxx:48
OfaLanguagesTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optgdlg.cxx:1136
virtual void Reset(const SfxItemSet *rSet) override
Definition: optgdlg.cxx:962
std::unique_ptr< LanguageConfig_Impl > pLangConfig
Definition: optgdlg.hxx:145
std::unique_ptr< weld::Widget > m_xFileDlgFrame
Definition: optgdlg.hxx:44
std::unique_ptr< weld::ComboBox > m_xUserInterfaceLB
Definition: optgdlg.hxx:153
std::unique_ptr< weld::CheckButton > m_xDecimalSeparatorCB
Definition: optgdlg.hxx:156
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optgdlg.cxx:1305
std::unique_ptr< weld::Entry > m_xDatePatternsED
Definition: optgdlg.hxx:160
std::unique_ptr< weld::CheckButton > m_xPopUpNoHelpCB
Definition: optgdlg.hxx:42
DeactivateRC
virtual ~OfaMiscTabPage() override
Definition: optgdlg.cxx:297
std::unique_ptr< weld::Widget > m_xPrintDlgFrame
Definition: optgdlg.hxx:45
std::unique_ptr< weld::Widget > m_xMenuIconBox
Definition: optgdlg.hxx:105
std::unique_ptr< svt::OpenGLCfg > mpOpenGLConfig
Definition: optgdlg.hxx:92
sal_Int32 nSizeLB_InitialSelection
Definition: optgdlg.hxx:84
virtual ~OfaViewTabPage() override
Definition: optgdlg.cxx:725
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optgdlg.cxx:748
std::unique_ptr< SvxLanguageBox > m_xWesternLanguageLB
Definition: optgdlg.hxx:162
std::unique_ptr< weld::CheckButton > m_xShowTipOfTheDay
Definition: optgdlg.hxx:43
sal_Int32 nSidebarSizeLB_InitialSelection
Definition: optgdlg.hxx:85
virtual void Reset(const SfxItemSet *rSet) override
Definition: optgdlg.cxx:378
virtual void Reset(const SfxItemSet *rSet) override
Definition: optgdlg.cxx:1543
std::vector< vcl::IconThemeInfo > mInstalledIconThemes
Definition: optgdlg.hxx:94
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optgdlg.cxx:301
std::unique_ptr< weld::CheckButton > m_xFontShowCB
Definition: optgdlg.hxx:110
std::unique_ptr< weld::CheckButton > m_xAsianSupportCB
Definition: optgdlg.hxx:167
std::unique_ptr< weld::CheckButton > m_xCTLSupportCB
Definition: optgdlg.hxx:168
OUString m_sUserLocaleValue
Definition: optgdlg.hxx:147