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_SVX_SOURCE_DIALOG_SAFEMODEDIALOG_HXX
11 #define INCLUDED_SVX_SOURCE_DIALOG_SAFEMODEDIALOG_HXX
12 
13 #include <comphelper/backupfilehelper.hxx>
14 #include <vcl/weld.hxx>
15 
16 class SafeModeDialog : public weld::GenericDialogController
17 {
18 public:
19     explicit SafeModeDialog(weld::Window* pParent);
20     virtual short run() override;
21     virtual ~SafeModeDialog() override;
22 
23 private:
24     std::unique_ptr<weld::Button> mxBtnContinue;
25     std::unique_ptr<weld::Button> mxBtnRestart;
26     std::unique_ptr<weld::Button> mxBtnApply;
27 
28     std::unique_ptr<weld::Container> mxBoxRestore;
29     std::unique_ptr<weld::Container> mxBoxConfigure;
30     std::unique_ptr<weld::Container> mxBoxDeinstall;
31     std::unique_ptr<weld::Container> mxBoxReset;
32 
33     std::unique_ptr<weld::RadioButton> mxRadioRestore;
34     std::unique_ptr<weld::RadioButton> mxRadioConfigure;
35     std::unique_ptr<weld::RadioButton> mxRadioExtensions;
36     std::unique_ptr<weld::RadioButton> mxRadioReset;
37 
38     std::unique_ptr<weld::CheckButton> mxCBCheckProfilesafeConfig;
39     std::unique_ptr<weld::CheckButton> mxCBCheckProfilesafeExtensions;
40     std::unique_ptr<weld::CheckButton> mxCBDisableAllExtensions;
41     std::unique_ptr<weld::CheckButton> mxCBDeinstallUserExtensions;
42     std::unique_ptr<weld::CheckButton> mxCBResetSharedExtensions;
43     std::unique_ptr<weld::CheckButton> mxCBResetBundledExtensions;
44     std::unique_ptr<weld::CheckButton> mxCBDisableHWAcceleration;
45     std::unique_ptr<weld::CheckButton> mxCBResetCustomizations;
46     std::unique_ptr<weld::CheckButton> mxCBResetWholeUserProfile;
47 
48     std::unique_ptr<weld::LinkButton> mxBugLink;
49     std::unique_ptr<weld::LinkButton> mxUserProfileLink;
50     std::unique_ptr<weld::Button> mxBtnCreateZip;
51     std::unique_ptr<weld::Expander> mxExpander;
52 
53     // local BackupFileHelper for handling possible restores
54     comphelper::BackupFileHelper maBackupFileHelper;
55 
56     void enableDisableWidgets();
57     void applyChanges();
58 
59     DECL_LINK(RadioBtnHdl, weld::Toggleable&, void);
60     DECL_LINK(CheckBoxHdl, weld::Toggleable&, void);
61     DECL_LINK(CreateZipBtnHdl, weld::Button&, void);
62     DECL_LINK(DialogBtnHdl, weld::Button&, void);
63 };
64 
65 #endif
66 
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
68