Line data Source code
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 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef INCLUDED_EXTENSIONS_SOURCE_ABPILOT_TYPESELECTIONPAGE_HXX
21 : #define INCLUDED_EXTENSIONS_SOURCE_ABPILOT_TYPESELECTIONPAGE_HXX
22 :
23 : #include "abspage.hxx"
24 : #include "addresssettings.hxx"
25 : #include <vcl/edit.hxx>
26 : #include <vcl/vclptr.hxx>
27 :
28 :
29 : namespace abp
30 : {
31 :
32 : class TypeSelectionPage : public AddressBookSourcePage
33 : {
34 : protected:
35 : VclPtr<RadioButton> m_pEvolution;
36 : VclPtr<RadioButton> m_pEvolutionGroupwise;
37 : VclPtr<RadioButton> m_pEvolutionLdap;
38 : VclPtr<RadioButton> m_pMORK;
39 : VclPtr<RadioButton> m_pThunderbird;
40 : VclPtr<RadioButton> m_pKab;
41 : VclPtr<RadioButton> m_pMacab;
42 : VclPtr<RadioButton> m_pLDAP;
43 : VclPtr<RadioButton> m_pOutlook;
44 : VclPtr<RadioButton> m_pOE;
45 : VclPtr<RadioButton> m_pOther;
46 :
47 0 : struct ButtonItem {
48 : VclPtr<RadioButton> m_pItem;
49 : AddressSourceType m_eType;
50 : bool m_bVisible;
51 :
52 0 : ButtonItem( RadioButton *pItem,
53 : AddressSourceType eType,
54 : bool bVisible ) :
55 : m_pItem( pItem ),
56 : m_eType( eType ),
57 0 : m_bVisible( bVisible )
58 0 : {}
59 : };
60 :
61 : ::std::vector< ButtonItem > m_aAllTypes;
62 :
63 : public:
64 : TypeSelectionPage( OAddessBookSourcePilot* _pParent );
65 : virtual ~TypeSelectionPage();
66 : virtual void dispose() SAL_OVERRIDE;
67 :
68 : // retrieves the currently selected type
69 : AddressSourceType getSelectedType() const;
70 :
71 : protected:
72 : // OWizardPage overridables
73 : virtual void initializePage() SAL_OVERRIDE;
74 : virtual bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) SAL_OVERRIDE;
75 :
76 : // TabDialog overridables
77 : virtual void ActivatePage() SAL_OVERRIDE;
78 : virtual void DeactivatePage() SAL_OVERRIDE;
79 :
80 : // OImportPage overridables
81 : virtual bool canAdvance() const SAL_OVERRIDE;
82 :
83 : private:
84 : DECL_LINK( OnTypeSelected, void* );
85 :
86 : void selectType( AddressSourceType _eType );
87 : };
88 :
89 :
90 : } // namespace abp
91 :
92 :
93 : #endif // INCLUDED_EXTENSIONS_SOURCE_ABPILOT_TYPESELECTIONPAGE_HXX
94 :
95 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|