tdf#144694 In direct SQL dialog, activate options 'Run SQL command
[LibreOffice.git] / cui / source / options / optaboutconfig.hxx
blob2b9402369a263468ba8b929bdf1029b189c6d2c5
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 <com/sun/star/container/XNameAccess.hpp>
14 #include <dlgname.hxx>
15 #include <i18nutil/searchopt.hxx>
16 #include <vcl/weld.hxx>
18 #include <vector>
20 class CuiAboutConfigTabPage;
21 class CuiAboutConfigValueDialog;
22 struct Prop_Impl;
23 struct UserData;
25 struct prefBoxEntry
27 OUString sProp;
28 OUString sStatus;
29 OUString sType;
30 OUString sValue;
31 UserData* pUserData;
34 class CuiAboutConfigTabPage : public weld::GenericDialogController
36 private:
37 std::unique_ptr<weld::Button> m_xResetBtn;
38 std::unique_ptr<weld::Button> m_xEditBtn;
39 std::unique_ptr<weld::Button> m_xSearchBtn;
40 std::unique_ptr<weld::CheckButton> m_xModifiedCheckBtn;
41 std::unique_ptr<weld::Entry> m_xSearchEdit;
42 std::unique_ptr<weld::TreeView> m_xPrefBox;
43 std::unique_ptr<weld::TreeIter> m_xScratchIter;
45 std::vector<std::unique_ptr<UserData>> m_vectorUserData;
47 std::vector<prefBoxEntry> m_modifiedPrefBoxEntries;
48 std::vector<std::shared_ptr<Prop_Impl>> m_vectorOfModified;
50 //for search
51 i18nutil::SearchOptions2 m_options;
52 std::vector<prefBoxEntry> m_prefBoxEntries;
54 bool m_bSorted;
56 void AddToModifiedVector(const std::shared_ptr<Prop_Impl>& rProp);
57 static std::vector<OUString> commaStringToSequence(std::u16string_view rCommaSepString);
58 void InsertEntry(const prefBoxEntry& rEntry);
60 DECL_LINK(QueryTooltip, const weld::TreeIter& rIter, OUString);
61 DECL_LINK(StandardHdl_Impl, weld::Button&, void);
62 DECL_LINK(DoubleClickHdl_Impl, weld::TreeView&, bool);
63 DECL_LINK(ResetBtnHdl_Impl, weld::Button&, void);
64 DECL_LINK(SearchHdl_Impl, weld::Button&, void);
65 DECL_LINK(ModifiedHdl_Impl, weld::Toggleable&, void);
66 DECL_LINK(ExpandingHdl_Impl, const weld::TreeIter&, bool);
67 DECL_LINK(HeaderBarClick, int, void);
68 DECL_STATIC_LINK(CuiAboutConfigTabPage, ValidNameHdl, SvxNameDialog&, bool);
70 public:
71 explicit CuiAboutConfigTabPage(weld::Window* pParent);
72 virtual ~CuiAboutConfigTabPage() override;
73 void InsertEntry(const OUString& rPropertyPath, css::uno::Any aPropertyValue,
74 const OUString& rProp, const OUString& rStatus, const OUString& rType,
75 const OUString& rValue, const OUString& rTooltip,
76 const weld::TreeIter* pParentEntry, bool bInsertToPrefBox, bool bIsReadOnly,
77 bool bWasMOdified);
78 void Reset();
79 void InputChanged();
80 void FillItems(const css::uno::Reference<css::container::XNameAccess>& xNameAccess,
81 const weld::TreeIter* pParentEntry = nullptr, int lineage = 0,
82 bool bLoadAll = false);
83 static css::uno::Reference<css::container::XNameAccess>
84 getConfigAccess(const OUString& sNodePath, bool bUpdate);
85 void FillItemSet();
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */