LibreOffice Module dbaccess (master) 1
UserAdmin.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#pragma once
20
21#include <TableGrantCtrl.hxx>
22#include "adminpages.hxx"
23
24namespace com::sun::star {
25 namespace sdbc {
26 class XConnection;
27 }
28}
29
30namespace dbaui
31{
32
34{
35 std::unique_ptr<weld::MenuButton> mxActionBar;
36 std::unique_ptr<weld::ComboBox> m_xUSER;
37 std::unique_ptr<weld::Container> m_xTable;
38 css::uno::Reference<css::awt::XWindow> m_xTableCtrlParent;
39 VclPtr<OTableGrantControl> m_xTableCtrl; // show the grant rights of one user
40
41 css::uno::Reference< css::sdbc::XConnection> m_xConnection;
42 css::uno::Reference< css::container::XNameAccess > m_xUsers;
43 css::uno::Sequence< OUString> m_aUserNames;
44
45 OUString m_UserName;
46
47 // methods
48 DECL_LINK(ListDblClickHdl, weld::ComboBox&, void);
49 DECL_LINK(MenuSelectHdl, const OUString&, void);
50
51 void FillUserNames();
52
53public:
54 OUserAdmin(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs);
55 static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet);
56 virtual ~OUserAdmin() override;
57
58 OUString GetUser() const;
59
60 // subclasses must override this, but it isn't pure virtual
61 virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) override;
62
63 // <method>OGenericAdministrationPage::fillControls</method>
64 virtual void fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList) override;
65
66 // <method>OGenericAdministrationPage::fillWindows</method>
67 virtual void fillWindows(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList) override;
68};
69
70}
71
72/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void fillControls(std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList) override
will be called inside <method>implInitControls</method> to save the value if necessary
Definition: UserAdmin.cxx:273
virtual void implInitControls(const SfxItemSet &_rSet, bool _bSaveValue) override
called from within Reset and ActivatePage, use to initialize the controls with the items from the giv...
Definition: UserAdmin.cxx:281
virtual ~OUserAdmin() override
Definition: UserAdmin.cxx:201
std::unique_ptr< weld::MenuButton > mxActionBar
Definition: UserAdmin.hxx:35
std::unique_ptr< weld::ComboBox > m_xUSER
Definition: UserAdmin.hxx:36
css::uno::Reference< css::awt::XWindow > m_xTableCtrlParent
Definition: UserAdmin.hxx:38
OUString m_UserName
Definition: UserAdmin.hxx:45
DECL_LINK(MenuSelectHdl, const OUString &, void)
OUserAdmin(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &_rCoreAttrs)
Definition: UserAdmin.cxx:116
css::uno::Reference< css::container::XNameAccess > m_xUsers
Definition: UserAdmin.hxx:42
virtual void fillWindows(std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList) override
will be called inside <method>implInitControls</method> to disable if necessary
Definition: UserAdmin.cxx:277
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: UserAdmin.cxx:255
css::uno::Sequence< OUString > m_aUserNames
Definition: UserAdmin.hxx:43
VclPtr< OTableGrantControl > m_xTableCtrl
Definition: UserAdmin.hxx:39
css::uno::Reference< css::sdbc::XConnection > m_xConnection
Definition: UserAdmin.hxx:41
std::unique_ptr< weld::Container > m_xTable
Definition: UserAdmin.hxx:37
OUString GetUser() const
Definition: UserAdmin.cxx:268
DECL_LINK(ListDblClickHdl, weld::ComboBox &, void)