tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / source / ui / inc / protectiondlg.hxx
blob4ad633cbd6d5a636e8e234646c5f030f77ef3e60
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #pragma once
22 #include <vcl/weld.hxx>
24 class ScTableProtection;
26 class ScTableProtectionDlg : public weld::GenericDialogController
28 public:
29 ScTableProtectionDlg() = delete;
30 explicit ScTableProtectionDlg(weld::Window* pParent);
31 virtual ~ScTableProtectionDlg() override;
33 void SetDialogData(const ScTableProtection& rData);
35 void WriteData(ScTableProtection& rData) const;
37 private:
38 void Init();
40 void EnableOptionalWidgets(bool bEnable);
42 OUString m_aSelectLockedCells;
43 OUString m_aSelectUnlockedCells;
44 OUString m_aInsertColumns;
45 OUString m_aInsertRows;
46 OUString m_aDeleteColumns;
47 OUString m_aDeleteRows;
48 OUString m_aAutoFilter;
49 OUString m_aPivot;
51 std::unique_ptr<weld::CheckButton> m_xBtnProtect;
52 std::unique_ptr<weld::Container> m_xPasswords;
53 std::unique_ptr<weld::Container> m_xOptions;
54 std::unique_ptr<weld::Entry> m_xPassword1Edit;
55 std::unique_ptr<weld::Entry> m_xPassword2Edit;
56 std::unique_ptr<weld::LevelBar> m_xPasswordStrengthBar;
57 std::unique_ptr<weld::TreeView> m_xOptionsListBox;
58 std::unique_ptr<weld::Button> m_xBtnOk;
59 std::unique_ptr<weld::Label> m_xProtected;
60 std::unique_ptr<weld::Label> m_xUnprotected;
61 std::unique_ptr<weld::Label> m_xInsertColumns;
62 std::unique_ptr<weld::Label> m_xInsertRows;
63 std::unique_ptr<weld::Label> m_xDeleteColumns;
64 std::unique_ptr<weld::Label> m_xDeleteRows;
65 std::unique_ptr<weld::Label> m_xAutoFilter;
66 std::unique_ptr<weld::Label> m_xPivot;
68 void InsertEntry(const OUString& rTxt);
70 DECL_LINK(OKHdl, weld::Button&, void);
71 DECL_LINK(CheckBoxHdl, weld::Toggleable&, void);
72 DECL_LINK(PasswordModifyHdl, weld::Entry&, void);
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */