tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / source / ui / inc / condformatmgr.hxx
blobca9f16e8a55f4eea551aae907dee2cf7dc3b7aa0
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/.
8 */
10 #pragma once
12 #include <vcl/weld.hxx>
14 class ScDocument;
15 class ScConditionalFormat;
16 class ScConditionalFormatList;
18 class ScCondFormatManagerWindow
20 private:
21 void Init();
22 void setColSizes();
24 weld::TreeView& mrTreeView;
25 ScDocument& mrDoc;
26 ScConditionalFormatList* mpFormatList;
28 public:
29 ScCondFormatManagerWindow(weld::TreeView& rTreeView, ScDocument& rDoc, ScConditionalFormatList* pFormatList);
31 void DeleteSelection();
32 ScConditionalFormat* GetSelection();
35 class ScCondFormatManagerDlg : public weld::GenericDialogController
37 public:
38 ScCondFormatManagerDlg(weld::Window* pParent, ScDocument& rDoc, const ScConditionalFormatList* pFormatList);
39 virtual ~ScCondFormatManagerDlg() override;
41 std::unique_ptr<ScConditionalFormatList> GetConditionalFormatList();
43 bool CondFormatsChanged() const;
44 void SetModified();
46 ScConditionalFormat* GetCondFormatSelected();
48 private:
49 bool m_bModified;
50 std::unique_ptr<ScConditionalFormatList> m_xFormatList;
52 std::unique_ptr<weld::Button> m_xBtnAdd;
53 std::unique_ptr<weld::Button> m_xBtnRemove;
54 std::unique_ptr<weld::Button> m_xBtnEdit;
55 std::unique_ptr<weld::TreeView> m_xTreeView;
56 std::unique_ptr<ScCondFormatManagerWindow> m_xCtrlManager;
58 void UpdateButtonSensitivity();
60 DECL_LINK(RemoveBtnHdl, weld::Button&, void);
61 DECL_LINK(EditBtnClickHdl, weld::Button&, void);
62 DECL_LINK(AddBtnHdl, weld::Button&, void);
63 DECL_LINK(EditBtnHdl, weld::TreeView&, bool);
66 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */