1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
10 #ifndef INCLUDED_SVTOOLS_PLACEEDITDIALOG_HXX
11 #define INCLUDED_SVTOOLS_PLACEEDITDIALOG_HXX
13 #include <svtools/ServerDetailsControls.hxx>
15 #include <vcl/button.hxx>
16 #include <vcl/dialog.hxx>
17 #include <vcl/edit.hxx>
18 #include <vcl/fixed.hxx>
19 #include <vcl/lstbox.hxx>
21 #include <svtools/inettbc.hxx>
22 #include <svtools/place.hxx>
27 class SVT_DLLPUBLIC PlaceEditDialog
: public ModalDialog
30 VclPtr
<Edit
> m_pEDServerName
;
31 VclPtr
<ListBox
> m_pLBServerType
;
32 std::shared_ptr
< DetailsContainer
> m_xCurrentDetails
;
34 VclPtr
<Edit
> m_pEDUsername
;
35 VclPtr
<OKButton
> m_pBTOk
;
36 VclPtr
<CancelButton
> m_pBTCancel
;
38 VclPtr
<PushButton
> m_pBTDelete
;
40 /** Vector holding the details UI control for each server type.
42 The elements in this vector need to match the order in the type listbox, e.g.
43 the m_aDetailsContainer[0] will be shown for the type corresponding to entry 0
46 std::vector
< std::shared_ptr
< DetailsContainer
> > m_aDetailsContainers
;
50 PlaceEditDialog( vcl::Window
* pParent
);
51 PlaceEditDialog(vcl::Window
* pParent
, const std::shared_ptr
<Place
> &rPlace
);
52 virtual ~PlaceEditDialog();
53 virtual void dispose() SAL_OVERRIDE
;
55 // Returns a place instance with given information
56 std::shared_ptr
<Place
> GetPlace();
58 OUString
GetServerName() { return m_pEDServerName
->GetText(); }
59 OUString
GetServerUrl();
65 DECL_LINK ( OKHdl
, Button
* );
66 DECL_LINK ( DelHdl
, Button
* );
67 DECL_LINK ( EditHdl
, void * );
68 DECL_LINK ( SelectTypeHdl
, void * );
69 DECL_LINK ( EditUsernameHdl
, void * );
73 #endif // INCLUDED_SVTOOLS_PLACEEDITDIALOG_HXX
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */