LibreOffice Module svtools (master) 1
ServerDetailsControls.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#ifndef INCLUDED_SVTOOLS_SERVERDETAILSCONTROLS_HXX
10#define INCLUDED_SVTOOLS_SERVERDETAILSCONTROLS_HXX
11
12#include <vector>
13
14#include <com/sun/star/uno/Reference.hxx>
15
16#include <tools/link.hxx>
17#include <tools/urlobj.hxx>
18#include <vcl/weld.hxx>
19
20namespace com :: sun :: star :: ucb { class XCommandEnvironment; }
21namespace com :: sun :: star :: awt { class XWindow; }
22
23namespace weld {
24 class Button;
25 class ComboBox;
26 class Entry;
27 class SpinButton;
28 class ToggleButton;
29}
30
31class PlaceEditDialog;
32
34{
35 protected:
36 PlaceEditDialog* m_pDialog;
38
39 public:
40 DetailsContainer(PlaceEditDialog* pDialog);
41 virtual ~DetailsContainer( );
42
43 void setChangeHdl( const Link<DetailsContainer*,void>& rLink ) { m_aChangeHdl = rLink; }
44
45 virtual void set_visible( bool bShow );
46 virtual INetURLObject getUrl( );
47
53 virtual bool setUrl( const INetURLObject& rUrl );
54
55 virtual void setUsername( const OUString& /*rUsername*/ ) { };
56 virtual void setPassword( const OUString& ) { };
57
58 virtual bool enableUserCredentials( ) { return true; };
59
60 protected:
61 void notifyChange( );
62 DECL_LINK(ValueChangeHdl, weld::Entry&, void);
64};
65
67{
68 private:
69 sal_uInt16 m_nDefaultPort;
70 OUString m_sScheme;
71 OUString m_sHost;
72
73 public:
74 HostDetailsContainer(PlaceEditDialog* pDialog, sal_uInt16 nPort, OUString sScheme);
75
76 virtual void set_visible( bool bShow ) override;
77 virtual INetURLObject getUrl( ) override;
78 virtual bool setUrl( const INetURLObject& rUrl ) override;
79
80 protected:
81 void setScheme( const OUString& sScheme ) { m_sScheme = sScheme; }
82
86 virtual bool verifyScheme( const OUString& rScheme );
87};
88
90{
91 public:
92 DavDetailsContainer(PlaceEditDialog* pDialog);
93
94 virtual void set_visible( bool bShow ) override;
95 virtual bool enableUserCredentials( ) override { return false; };
96
97 private:
98 virtual bool verifyScheme( const OUString& rScheme ) override;
99
100 DECL_LINK(ToggledDavsHdl, weld::Toggleable&, void);
101};
102
104{
105 private:
106 OUString m_sHost;
107
108 public:
109 SmbDetailsContainer(PlaceEditDialog* pDialog);
110
111 virtual INetURLObject getUrl( ) override;
112 virtual bool setUrl( const INetURLObject& rUrl ) override;
113 virtual void set_visible( bool bShow ) override;
114};
115
117{
118 private:
119 OUString m_sUsername;
120 OUString m_sPassword;
121 css::uno::Reference< css::ucb::XCommandEnvironment > m_xCmdEnv;
122 std::vector< OUString > m_aRepoIds;
123 OUString m_sRepoId;
124 OUString m_sBinding;
125 css::uno::Reference< css::awt::XWindow > m_xParentDialog;
126
127 public:
128 CmisDetailsContainer(PlaceEditDialog* pDialog, OUString sBinding);
129
130 virtual void set_visible( bool bShow ) override;
131 virtual INetURLObject getUrl( ) override;
132 virtual bool setUrl( const INetURLObject& rUrl ) override;
133 virtual void setUsername( const OUString& rUsername ) override;
134 virtual void setPassword( const OUString& rPass ) override;
135
136 private:
137 void selectRepository( );
138 DECL_LINK ( RefreshReposHdl, weld::Button&, void );
139 DECL_LINK ( SelectRepoHdl, weld::ComboBox&, void );
140};
141
142#endif
143/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
DECL_LINK(SelectRepoHdl, weld::ComboBox &, void)
virtual bool setUrl(const INetURLObject &rUrl) override
Try to split the URL in the controls of that container.
virtual void setUsername(const OUString &rUsername) override
CmisDetailsContainer(PlaceEditDialog *pDialog, OUString sBinding)
std::vector< OUString > m_aRepoIds
DECL_LINK(RefreshReposHdl, weld::Button &, void)
css::uno::Reference< css::ucb::XCommandEnvironment > m_xCmdEnv
virtual INetURLObject getUrl() override
virtual void setPassword(const OUString &rPass) override
css::uno::Reference< css::awt::XWindow > m_xParentDialog
virtual void set_visible(bool bShow) override
virtual bool enableUserCredentials() override
DECL_LINK(ToggledDavsHdl, weld::Toggleable &, void)
DavDetailsContainer(PlaceEditDialog *pDialog)
virtual bool verifyScheme(const OUString &rScheme) override
Verifies that the scheme split from the URL can be handled by the container and set the proper contro...
virtual void set_visible(bool bShow) override
DetailsContainer(PlaceEditDialog *pDialog)
Link< DetailsContainer *, void > m_aChangeHdl
PlaceEditDialog * m_pDialog
virtual void setPassword(const OUString &)
virtual bool enableUserCredentials()
virtual INetURLObject getUrl()
DECL_STATIC_LINK(DetailsContainer, FormatPortHdl, weld::SpinButton &, void)
virtual bool setUrl(const INetURLObject &rUrl)
Try to split the URL in the controls of that container.
DECL_LINK(ValueChangeHdl, weld::Entry &, void)
virtual void setUsername(const OUString &)
void setChangeHdl(const Link< DetailsContainer *, void > &rLink)
virtual void set_visible(bool bShow)
void setScheme(const OUString &sScheme)
virtual INetURLObject getUrl() override
HostDetailsContainer(PlaceEditDialog *pDialog, sal_uInt16 nPort, OUString sScheme)
virtual bool setUrl(const INetURLObject &rUrl) override
Try to split the URL in the controls of that container.
virtual bool verifyScheme(const OUString &rScheme)
Verifies that the scheme split from the URL can be handled by the container and set the proper contro...
virtual void set_visible(bool bShow) override
virtual INetURLObject getUrl() override
virtual void set_visible(bool bShow) override
virtual bool setUrl(const INetURLObject &rUrl) override
Try to split the URL in the controls of that container.
SmbDetailsContainer(PlaceEditDialog *pDialog)