LibreOffice Module cui (master)  1
optaboutconfig.hxx
Go to the documentation of this file.
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_CUI_SOURCE_OPTIONS_OPTABOUTCONFIG_HXX
11 #define INCLUDED_CUI_SOURCE_OPTIONS_OPTABOUTCONFIG_HXX
12 
13 #include <com/sun/star/container/XNameAccess.hpp>
14 
15 #include <i18nutil/searchopt.hxx>
16 #include <vcl/weld.hxx>
17 
18 #include <vector>
19 
22 struct Prop_Impl;
23 struct UserData;
24 
26 {
27  OUString sProp;
28  OUString sStatus;
29  OUString sType;
30  OUString sValue;
32 };
33 
35 {
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::Entry> m_xSearchEdit;
41  std::unique_ptr<weld::TreeView> m_xPrefBox;
42  std::unique_ptr<weld::TreeIter> m_xScratchIter;
43 
44  std::vector < std::unique_ptr<UserData> > m_vectorUserData;
45 
46  std::vector<prefBoxEntry> m_modifiedPrefBoxEntries;
47  std::vector< std::shared_ptr< Prop_Impl > > m_vectorOfModified;
48 
49  //for search
51  std::vector<prefBoxEntry> m_prefBoxEntries;
52 
53  bool m_bSorted;
54 
55  void AddToModifiedVector( const std::shared_ptr< Prop_Impl >& rProp );
56  static std::vector< OUString > commaStringToSequence( const OUString& rCommaSepString );
57  void InsertEntry(const prefBoxEntry& rEntry);
58 
59  DECL_LINK(StandardHdl_Impl, weld::Button&, void);
60  DECL_LINK(DoubleClickHdl_Impl, weld::TreeView&, bool);
61  DECL_LINK(ResetBtnHdl_Impl, weld::Button&, void);
62  DECL_LINK(SearchHdl_Impl, weld::Button&, void);
63  DECL_LINK(ExpandingHdl_Impl, const weld::TreeIter&, bool);
64  DECL_LINK(HeaderBarClick, int, void);
65 
66 public:
67  explicit CuiAboutConfigTabPage(weld::Window* pParent);
68  virtual ~CuiAboutConfigTabPage() override;
69  void InsertEntry(const OUString &rPropertyPath, const OUString& rProp, const OUString& rStatus, const OUString& rType, const OUString& rValue,
70  const weld::TreeIter* pParentEntry, bool bInsertToPrefBox);
71  void Reset();
72  void FillItems(const css::uno::Reference<css::container::XNameAccess>& xNameAccess,
73  const weld::TreeIter* pParentEntry = nullptr, int lineage = 0, bool bLoadAll = false);
74  static css::uno::Reference< css::container::XNameAccess > getConfigAccess( const OUString& sNodePath, bool bUpdate );
75  void FillItemSet();
76 };
77 
79 {
80 private:
82  std::unique_ptr<weld::Entry> m_xEDValue;
83 
84  DECL_LINK(KeyInputHdl, const KeyEvent&, bool);
85 
86 public:
87  CuiAboutConfigValueDialog(weld::Window* pWindow, const OUString& rValue , int limit);
88  virtual ~CuiAboutConfigValueDialog() override;
89 
90  OUString getValue() const
91  {
92  return m_xEDValue->get_text();
93  }
94 };
95 
96 #endif
97 
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::vector< std::unique_ptr< UserData > > m_vectorUserData
std::unique_ptr< weld::Button > m_xSearchBtn
std::unique_ptr< weld::TreeView > m_xPrefBox
DECL_LINK(StandardHdl_Impl, weld::Button &, void)
virtual ~CuiAboutConfigValueDialog() override
CuiAboutConfigValueDialog(weld::Window *pWindow, const OUString &rValue, int limit)
std::vector< prefBoxEntry > m_modifiedPrefBoxEntries
CuiAboutConfigTabPage(weld::Window *pParent)
void AddToModifiedVector(const std::shared_ptr< Prop_Impl > &rProp)
std::unique_ptr< weld::Button > m_xEditBtn
void FillItems(const css::uno::Reference< css::container::XNameAccess > &xNameAccess, const weld::TreeIter *pParentEntry=nullptr, int lineage=0, bool bLoadAll=false)
UserData * pUserData
OUString sStatus
i18nutil::SearchOptions2 m_options
std::unique_ptr< weld::Button > m_xResetBtn
std::unique_ptr< weld::Entry > m_xEDValue
void InsertEntry(const prefBoxEntry &rEntry)
std::unique_ptr< weld::Entry > m_xSearchEdit
virtual ~CuiAboutConfigTabPage() override
std::vector< std::shared_ptr< Prop_Impl > > m_vectorOfModified
static std::vector< OUString > commaStringToSequence(const OUString &rCommaSepString)
std::unique_ptr< weld::TreeIter > m_xScratchIter
std::vector< prefBoxEntry > m_prefBoxEntries
static css::uno::Reference< css::container::XNameAccess > getConfigAccess(const OUString &sNodePath, bool bUpdate)
DECL_LINK(KeyInputHdl, const KeyEvent &, bool)
OUString getValue() const