1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 #ifndef EXTENSIONS_ABP_TYPESELECTIONPAGE_HXX 23 #define EXTENSIONS_ABP_TYPESELECTIONPAGE_HXX 24 25 #include "abspage.hxx" 26 #include "addresssettings.hxx" 27 #include <vcl/edit.hxx> 28 29 //......................................................................... 30 namespace abp 31 { 32 //......................................................................... 33 34 //===================================================================== 35 //= TypeSelectionPage 36 //===================================================================== 37 class TypeSelectionPage : public AddressBookSourcePage 38 { 39 protected: 40 FixedText m_aHint; 41 FixedLine m_aTypeSep; 42 RadioButton m_aEvolution; 43 RadioButton m_aEvolutionGroupwise; 44 RadioButton m_aEvolutionLdap; 45 RadioButton m_aThunderbird; 46 RadioButton m_aKab; 47 RadioButton m_aMacab; 48 RadioButton m_aLDAP; 49 RadioButton m_aOutlook; 50 RadioButton m_aOE; 51 RadioButton m_aOther; 52 53 struct ButtonItem { 54 RadioButton *m_pItem; 55 AddressSourceType m_eType; 56 bool m_bVisible; 57 ButtonItemabp::TypeSelectionPage::ButtonItem58 ButtonItem( RadioButton *pItem, 59 AddressSourceType eType, 60 bool bVisible ) : 61 m_pItem( pItem ), 62 m_eType( eType ), 63 m_bVisible( bVisible ) 64 {} 65 }; 66 67 ::std::vector< ButtonItem > m_aAllTypes; 68 69 public: 70 TypeSelectionPage( OAddessBookSourcePilot* _pParent ); 71 ~TypeSelectionPage(); 72 73 // retrieves the currently selected type 74 AddressSourceType getSelectedType() const; 75 76 protected: 77 // OWizardPage overridables 78 virtual void initializePage(); 79 virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); 80 81 // TabDialog overridables 82 virtual void ActivatePage(); 83 virtual void DeactivatePage(); 84 85 // OImportPage overridables 86 virtual bool canAdvance() const; 87 88 private: 89 DECL_LINK( OnTypeSelected, void* ); 90 91 void selectType( AddressSourceType _eType ); 92 }; 93 94 //......................................................................... 95 } // namespace abp 96 //......................................................................... 97 98 #endif // EXTENSIONS_ABP_TYPESELECTIONPAGE_HXX 99