summaryrefslogtreecommitdiff
path: root/svx/source/dialog/SafeModeDialog.hxx
blob: 07c82d9c27e8bd35ede2ec45e673e2e2c8b527a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

#ifndef INCLUDED_SVX_SOURCE_DIALOG_SAFEMODEDIALOG_HXX
#define INCLUDED_SVX_SOURCE_DIALOG_SAFEMODEDIALOG_HXX

#include <vcl/dialog.hxx>
#include <vcl/button.hxx>
#include <vcl/layout.hxx>
#include <vcl/fixed.hxx>
#include <vcl/edit.hxx>
#include <vcl/vclmedit.hxx>
#include <vcl/fixedhyper.hxx>
#include <comphelper/backupfilehelper.hxx>

class SafeModeDialog : public Dialog
{
public:

    explicit SafeModeDialog(vcl::Window* pParent);

    virtual ~SafeModeDialog() override;

    virtual void dispose() override;

    virtual bool Close() override;

private:

    VclPtr<Button> mpBtnContinue;
    VclPtr<Button> mpBtnQuit;
    VclPtr<Button> mpBtnRestart;

    VclPtr<VclBox> mpBoxRestore;
    VclPtr<VclBox> mpBoxConfigure;
    VclPtr<VclBox> mpBoxDeinstall;
    VclPtr<VclBox> mpBoxReset;

    VclPtr<RadioButton> mpRadioRestore;
    VclPtr<RadioButton> mpRadioConfigure;
    VclPtr<RadioButton> mpRadioDeinstall;
    VclPtr<RadioButton> mpRadioReset;

    VclPtr<CheckBox> mpCBCheckProfilesafeConfig;
    VclPtr<CheckBox> mpCBCheckProfilesafeExtensions;
    VclPtr<CheckBox> mpCBDisableAllExtensions;
    VclPtr<CheckBox> mpCBDeinstallUserExtensions;
    VclPtr<CheckBox> mpCBResetSharedExtensions;
    VclPtr<CheckBox> mpCBResetBundledExtensions;
    VclPtr<CheckBox> mpCBDisableHWAcceleration;
    VclPtr<CheckBox> mpCBResetCustomizations;
    VclPtr<CheckBox> mpCBResetWholeUserProfile;

    VclPtr<FixedHyperlink> mpBugLink;
    VclPtr<FixedHyperlink> mpUserProfileLink;
    VclPtr<Button> mpBtnCreateZip;

    // local BackupFileHelper for handling possible restores
    comphelper::BackupFileHelper maBackupFileHelper;

    void enableDisableWidgets();
    void applyChanges();
    static void openWebBrowser(const OUString & sURL, const OUString &sTitle);

    DECL_LINK(RadioBtnHdl, Button*, void);
    DECL_LINK(CheckBoxHdl, CheckBox&, void);
    DECL_LINK(CreateZipBtnHdl, Button*, void);
    DECL_LINK(DialogBtnHdl, Button*, void);
};

#endif

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */