LibreOffice Module cui (master)  1
optpath.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  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_CUI_SOURCE_INC_OPTPATH_HXX
20 #define INCLUDED_CUI_SOURCE_INC_OPTPATH_HXX
21 
22 #include <memory>
23 #include <sfx2/tabdlg.hxx>
24 
25 #include <com/sun/star/ui/dialogs/XFolderPicker2.hpp>
27 
28 // forward ---------------------------------------------------------------
29 struct OptPath_Impl;
30 class SvxPathTabPage;
31 
32 // class SvxPathTabPage --------------------------------------------------
33 class SvxPathTabPage : public SfxTabPage
34 {
35 private:
36  std::unique_ptr<OptPath_Impl> pImpl;
37 
39  css::uno::Reference< css::ui::dialogs::XFolderPicker2 > xFolderPicker;
40 
41  std::unique_ptr<weld::Button> m_xStandardBtn;
42  std::unique_ptr<weld::Button> m_xPathBtn;
43  std::unique_ptr<weld::TreeView> m_xPathBox;
44 
45  void ChangeCurrentEntry( const OUString& _rFolder );
46 
47  DECL_LINK(PathHdl_Impl, weld::Button&, void);
48  DECL_LINK(DoubleClickPathHdl_Impl, weld::TreeView&, bool);
49  DECL_LINK(StandardHdl_Impl, weld::Button&, void);
50 
51  DECL_LINK(PathSelect_Impl, weld::TreeView&, void);
52 
53  DECL_LINK(DialogClosedHdl, css::ui::dialogs::DialogClosedEvent*, void);
54 
55  void GetPathList( sal_uInt16 _nPathHandle, OUString& _rInternalPath,
56  OUString& _rUserPath, OUString& _rWritablePath, bool& _rReadOnly );
57  void SetPathList( sal_uInt16 _nPathHandle,
58  const OUString& _rUserPath, const OUString& _rWritablePath );
59 
60 public:
61  SvxPathTabPage( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet );
62  static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
63  virtual ~SvxPathTabPage() override;
64 
65  virtual bool FillItemSet( SfxItemSet* rSet ) override;
66  virtual void Reset( const SfxItemSet* rSet ) override;
67 };
68 
69 #endif
70 
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optpath.cxx:214
SvxPathTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optpath.cxx:181
std::unique_ptr< weld::TreeView > m_xPathBox
Definition: optpath.hxx:43
std::unique_ptr< weld::Button > m_xStandardBtn
Definition: optpath.hxx:41
DECL_LINK(PathHdl_Impl, weld::Button &, void)
virtual ~SvxPathTabPage() override
Definition: optpath.cxx:202
void GetPathList(sal_uInt16 _nPathHandle, OUString &_rInternalPath, OUString &_rUserPath, OUString &_rWritablePath, bool &_rReadOnly)
Definition: optpath.cxx:591
virtual void Reset(const SfxItemSet *rSet) override
Definition: optpath.cxx:226
rtl::Reference< ::svt::DialogClosedListener > xDialogListener
Definition: optpath.hxx:38
void ChangeCurrentEntry(const OUString &_rFolder)
Definition: optpath.cxx:401
void SetPathList(sal_uInt16 _nPathHandle, const OUString &_rUserPath, const OUString &_rWritablePath)
Definition: optpath.cxx:656
css::uno::Reference< css::ui::dialogs::XFolderPicker2 > xFolderPicker
Definition: optpath.hxx:39
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: optpath.cxx:208
std::unique_ptr< OptPath_Impl > pImpl
Definition: optpath.hxx:36
std::unique_ptr< weld::Button > m_xPathBtn
Definition: optpath.hxx:42