bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / svtools / PlaceEditDialog.hxx
blob6047e8680e46bd7dbc94692f0bf848606e5c265c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #ifndef INCLUDED_SVTOOLS_PLACEEDITDIALOG_HXX
11 #define INCLUDED_SVTOOLS_PLACEEDITDIALOG_HXX
13 #include <svtools/svtdllapi.h>
14 #include <vcl/weld.hxx>
16 #include <memory>
17 #include <vector>
19 class Place;
20 class DetailsContainer;
22 class SVT_DLLPUBLIC PlaceEditDialog : public weld::GenericDialogController
24 private:
25 std::shared_ptr< DetailsContainer > m_xCurrentDetails;
26 /** Vector holding the details UI control for each server type.
28 The elements in this vector need to match the order in the type listbox, e.g.
29 the m_aDetailsContainer[0] will be shown for the type corresponding to entry 0
30 in the listbox.
32 std::vector< std::shared_ptr< DetailsContainer > > m_aDetailsContainers;
34 sal_Int32 m_nCurrentType;
36 bool m_bLabelChanged;
37 bool m_bShowPassword;
39 public:
40 std::unique_ptr<weld::Entry> m_xEDServerName;
41 std::unique_ptr<weld::ComboBox> m_xLBServerType;
42 std::unique_ptr<weld::Entry> m_xEDUsername;
43 std::unique_ptr<weld::Label> m_xFTUsernameLabel;
44 std::unique_ptr<weld::Button> m_xBTOk;
45 std::unique_ptr<weld::Button> m_xBTCancel;
46 std::unique_ptr<weld::Button> m_xBTDelete;
47 std::unique_ptr<weld::Button> m_xBTRepoRefresh;
48 std::unique_ptr<weld::CheckButton> m_xCBPassword;
49 std::unique_ptr<weld::Entry> m_xEDPassword;
50 std::unique_ptr<weld::Label> m_xFTPasswordLabel;
51 std::unique_ptr<weld::Widget> m_xTypeGrid;
53 std::unique_ptr<weld::Widget> m_xRepositoryBox;
54 std::unique_ptr<weld::Label> m_xFTRepository;
55 std::unique_ptr<weld::ComboBox> m_xLBRepository;
57 std::unique_ptr<weld::Entry> m_xEDShare;
58 std::unique_ptr<weld::Label> m_xFTShare;
60 std::unique_ptr<weld::Widget> m_xDetailsGrid;
61 std::unique_ptr<weld::Widget> m_xHostBox;
62 std::unique_ptr<weld::Entry> m_xEDHost;
63 std::unique_ptr<weld::Label> m_xFTHost;
64 std::unique_ptr<weld::SpinButton> m_xEDPort;
65 std::unique_ptr<weld::Label> m_xFTPort;
66 std::unique_ptr<weld::Entry> m_xEDRoot;
67 std::unique_ptr<weld::Label> m_xFTRoot;
69 std::unique_ptr<weld::CheckButton> m_xCBDavs;
71 public:
72 PlaceEditDialog(weld::Window* pParent);
73 PlaceEditDialog(weld::Window* pParent, const std::shared_ptr<Place> &rPlace );
74 virtual ~PlaceEditDialog() override;
76 // Returns a place instance with given information
77 std::shared_ptr<Place> GetPlace();
79 OUString GetServerName() { return m_xEDServerName->get_text(); }
80 OUString GetServerUrl();
81 OUString GetPassword() { return m_xEDPassword->get_text(); };
82 OUString GetUser() { return m_xEDUsername->get_text(); };
83 bool IsRememberChecked() { return m_xCBPassword->get_active(); }
85 void ShowPasswordControl() { m_bShowPassword = true; }
87 private:
89 void InitDetails( );
91 DECL_LINK ( OKHdl, weld::Button&, void );
92 DECL_LINK ( DelHdl, weld::Button&, void );
93 DECL_LINK ( EditHdl, DetailsContainer*, void );
94 DECL_LINK ( ModifyHdl, weld::Entry&, void );
95 void SelectType(bool bSkipSeparator);
96 DECL_LINK ( SelectTypeHdl, weld::ComboBox&, void );
97 DECL_LINK ( EditLabelHdl, weld::Entry&, void );
98 DECL_LINK ( EditUsernameHdl, weld::Entry&, void );
102 #endif // INCLUDED_SVTOOLS_PLACEEDITDIALOG_HXX
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */