LibreOffice Module cui (master)  1
connpooloptions.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 
20 #ifndef INCLUDED_CUI_SOURCE_OPTIONS_CONNPOOLOPTIONS_HXX
21 #define INCLUDED_CUI_SOURCE_OPTIONS_CONNPOOLOPTIONS_HXX
22 
23 #include <sfx2/tabdlg.hxx>
24 
25 #include "connpoolsettings.hxx"
26 
27 namespace offapp
28 {
30  {
32 
33  OUString m_sYes;
34  OUString m_sNo;
37 
38  std::unique_ptr<weld::CheckButton> m_xEnablePooling;
39  std::unique_ptr<weld::Label> m_xDriversLabel;
40  std::unique_ptr<weld::TreeView> m_xDriverList;
41  std::unique_ptr<weld::Label> m_xDriverLabel;
42  std::unique_ptr<weld::Label> m_xDriver;
43  std::unique_ptr<weld::CheckButton> m_xDriverPoolingEnabled;
44  std::unique_ptr<weld::Label> m_xTimeoutLabel;
45  std::unique_ptr<weld::SpinButton> m_xTimeout;
46 
47  public:
48  ConnectionPoolOptionsPage(TabPageParent _pParent, const SfxItemSet& _rAttrSet);
49  virtual ~ConnectionPoolOptionsPage() override;
50  static VclPtr<SfxTabPage> Create(TabPageParent _pParent, const SfxItemSet* _rAttrSet);
51 
52  private:
53  virtual bool FillItemSet(SfxItemSet* _rSet) override;
54  virtual void Reset(const SfxItemSet* _rSet) override;
55  virtual void ActivatePage( const SfxItemSet& _rSet) override;
56 
57  void updateRow(size_t nRow);
58  void updateCurrentRow();
59  void UpdateDriverList(const DriverPoolingSettings& _rSettings);
60  bool isModifiedDriverList() const;
61  void saveDriverList() { m_aSavedSettings = m_aSettings; }
62 
63  DECL_LINK(OnEnabledDisabled, weld::Button&, void);
64  DECL_LINK(OnSpinValueChanged, weld::SpinButton&, void);
65  DECL_LINK(OnDriverRowChanged, weld::TreeView&, void);
66 
67  void implInitControls(const SfxItemSet& _rSet);
68 
69  void commitTimeoutField();
70  };
71 
72 } // namespace offapp
73 
74 #endif // INCLUDED_CUI_SOURCE_OPTIONS_CONNPOOLOPTIONS_HXX
75 
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ConnectionPoolOptionsPage(TabPageParent _pParent, const SfxItemSet &_rAttrSet)
virtual ~ConnectionPoolOptionsPage() override
std::unique_ptr< weld::CheckButton > m_xDriverPoolingEnabled
virtual void Reset(const SfxItemSet *_rSet) override
DECL_LINK(OnEnabledDisabled, weld::Button &, void)
std::unique_ptr< weld::TreeView > m_xDriverList
std::unique_ptr< weld::Label > m_xTimeoutLabel
DriverPoolingSettings m_aSavedSettings
virtual void ActivatePage()
std::unique_ptr< weld::CheckButton > m_xEnablePooling
void UpdateDriverList(const DriverPoolingSettings &_rSettings)
std::unique_ptr< weld::Label > m_xDriver
std::unique_ptr< weld::SpinButton > m_xTimeout
virtual bool FillItemSet(SfxItemSet *_rSet) override
virtual void ActivatePage(const SfxItemSet &_rSet) override
void implInitControls(const SfxItemSet &_rSet)
std::unique_ptr< weld::Label > m_xDriverLabel
static VclPtr< SfxTabPage > Create(TabPageParent _pParent, const SfxItemSet *_rAttrSet)
std::unique_ptr< weld::Label > m_xDriversLabel