Version 3.6.0.2, tag libreoffice-3.6.0.2
[LibreOffice.git] / dbaccess / source / ui / dlg / UserAdmin.hxx
blob62f34e453a860ff4b8a18d8fdc258845fdaa5da6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef DBAUI_USERADMIN_HXX
29 #define DBAUI_USERADMIN_HXX
31 #include <vcl/fixed.hxx>
32 #include <vcl/field.hxx>
33 #include <vcl/lstbox.hxx>
34 #include <vcl/button.hxx>
35 #include <vcl/dialog.hxx>
36 #include <vcl/group.hxx>
37 #include "TableGrantCtrl.hxx"
38 #include "adminpages.hxx"
39 #include <comphelper/uno3.hxx>
41 namespace com { namespace sun { namespace star {
42 namespace beans {
43 class XPropertySet;
45 namespace sdbc {
46 class XConnection;
48 namespace lang {
49 class XMultiServiceFactory;
51 }}}
53 namespace dbaui
56 class OUserAdmin : public OGenericAdministrationPage
58 protected:
59 FixedLine m_FL_USER;
60 FixedText m_FT_USER;
61 ListBox m_LB_USER;
62 PushButton m_PB_NEWUSER;
63 PushButton m_PB_CHANGEPWD;
64 PushButton m_PB_DELETEUSER;
65 FixedLine m_FL_TABLE_GRANTS;
66 OTableGrantControl m_TableCtrl; // show the grant rights of one user
68 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection;
69 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xUsers;
70 ::com::sun::star::uno::Sequence< ::rtl::OUString> m_aUserNames;
72 String m_UserName;
74 // methods
75 DECL_LINK( ListDblClickHdl, ListBox * );
76 DECL_LINK( CloseHdl, PushButton * );
77 DECL_LINK( UserHdl, PushButton * );
79 void FillUserNames();
81 OUserAdmin( Window* pParent, const SfxItemSet& _rCoreAttrs);
82 public:
83 static SfxTabPage* Create( Window* pParent, const SfxItemSet& _rAttrSet );
85 ~OUserAdmin();
86 String GetUser();
88 // must be overloaded by subclasses, but it isn't pure virtual
89 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
91 // <method>OGenericAdministrationPage::fillControls</method>
92 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
94 // <method>OGenericAdministrationPage::fillWindows</method>
95 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
98 #endif // DBAUI_USERADMIN_HXX
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */