Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * Version: MPL 1.1 / GPLv3+ / LGPLv3+
4 : : *
5 : : * The contents of this file are subject to the Mozilla Public License Version
6 : : * 1.1 (the "License"); you may not use this file except in compliance with
7 : : * the License or as specified alternatively below. You may obtain a copy of
8 : : * the License at http://www.mozilla.org/MPL/
9 : : *
10 : : * Software distributed under the License is distributed on an "AS IS" basis,
11 : : * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 : : * for the specific language governing rights and limitations under the
13 : : * License.
14 : : *
15 : : * Major Contributor(s):
16 : : * [ Copyright (C) 2012 Julien Levesy <jlevesy@gmail.com> (initial developer) ]
17 : : *
18 : : * All Rights Reserved.
19 : : *
20 : : * For minor contributions see the git repository.
21 : : *
22 : : * Alternatively, the contents of this file may be used under the terms of
23 : : * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
24 : : * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
25 : : * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
26 : : * instead of those above.
27 : : */
28 : : #ifndef _PLACEEDITDIALOG_HXX
29 : : #define _PLACEEDITDIALOG_HXX
30 : :
31 : : #include "ServerDetailsControls.hxx"
32 : :
33 : : #include <vcl/button.hxx>
34 : : #include <vcl/dialog.hxx>
35 : : #include <vcl/edit.hxx>
36 : : #include <vcl/fixed.hxx>
37 : : #include <vcl/lstbox.hxx>
38 : :
39 : : #include <svtools/inettbc.hxx>
40 : : #include <svtools/place.hxx>
41 : :
42 : : #include <boost/shared_ptr.hpp>
43 : : #include <vector>
44 : :
45 : : class SVT_DLLPUBLIC PlaceEditDialog : public ModalDialog
46 : : {
47 : : private :
48 : :
49 : : FixedText m_aFTServerName;
50 : : FixedText m_aFTServerType;
51 : :
52 : : Edit m_aEDServerName;
53 : : ListBox m_aLBServerType;
54 : : boost::shared_ptr< DetailsContainer > m_pCurrentDetails;
55 : :
56 : : FixedText m_aFTHost;
57 : : Edit m_aEDHost;
58 : : FixedText m_aFTPort;
59 : : NumericField m_aEDPort;
60 : : FixedText m_aFTPath;
61 : : Edit m_aEDPath;
62 : : CheckBox m_aCBDavs;
63 : :
64 : : Edit m_aEDSmbHost;
65 : : FixedText m_aFTShare;
66 : : Edit m_aEDShare;
67 : : FixedText m_aFTSmbPath;
68 : : Edit m_aEDSmbPath;
69 : :
70 : : FixedText m_aFTCmisBinding;
71 : : Edit m_aEDCmisBinding;
72 : : FixedText m_aFTCmisRepository;
73 : : ListBox m_aLBCmisRepository;
74 : : ImageButton m_aBTCmisRepoRefresh;
75 : :
76 : : FixedText m_aFTUsername;
77 : : Edit m_aEDUsername;
78 : : OKButton m_aBTOk;
79 : : CancelButton m_aBTCancel;
80 : :
81 : : PushButton m_aBTDelete;
82 : :
83 : : /** Vector holding the details UI control for each server type.
84 : :
85 : : The elements in this vector need to match the order in the type listbox, e.g.
86 : : the m_aDetailsContainer[0] will be shown for the type corresponding to entry 0
87 : : in the listbox.
88 : : */
89 : : std::vector< boost::shared_ptr< DetailsContainer > > m_aDetailsContainers;
90 : :
91 : : public :
92 : :
93 : : PlaceEditDialog( Window* pParent);
94 : : PlaceEditDialog(Window* pParent, const boost::shared_ptr<Place> &pPlace );
95 : : ~PlaceEditDialog();
96 : :
97 : : // Returns a place instance with given informations
98 : : boost::shared_ptr<Place> GetPlace();
99 : :
100 : 0 : rtl::OUString GetServerName() { return m_aEDServerName.GetText(); }
101 : : rtl::OUString GetServerUrl();
102 : :
103 : : private:
104 : :
105 : : void InitDetails( );
106 : :
107 : : DECL_LINK ( OKHdl, Button * );
108 : : DECL_LINK ( DelHdl, Button * );
109 : : DECL_LINK ( EditHdl, void * );
110 : : DECL_LINK ( SelectTypeHdl, void * );
111 : : DECL_LINK ( EditUsernameHdl, void * );
112 : :
113 : : };
114 : :
115 : : #endif //_PLACEEDITDIALOG_HXX
116 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|