LibreOffice Module extensions (master) 1
typeselectionpage.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 * 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#pragma once
21
22#include "abspage.hxx"
23#include "addresssettings.hxx"
24#include <vcl/weld.hxx>
25
26namespace abp
27{
28
30 {
31 std::unique_ptr<weld::RadioButton> m_xEvolution;
32 std::unique_ptr<weld::RadioButton> m_xEvolutionGroupwise;
33 std::unique_ptr<weld::RadioButton> m_xEvolutionLdap;
34 std::unique_ptr<weld::RadioButton> m_xThunderbird;
35 std::unique_ptr<weld::RadioButton> m_xKab;
36 std::unique_ptr<weld::RadioButton> m_xMacab;
37 std::unique_ptr<weld::RadioButton> m_xOther;
38
39 struct ButtonItem {
43
46 bool bVisible ) :
47 m_pItem( pItem ),
48 m_eType( eType ),
50 {}
51 };
52
53 std::vector< ButtonItem > m_aAllTypes;
54
55 public:
56 explicit TypeSelectionPage(weld::Container* pPage, OAddressBookSourcePilot* pController);
57 virtual ~TypeSelectionPage() override;
58
59 // retrieves the currently selected type
61
62 private:
63 // OWizardPage overridables
64 virtual void initializePage() override;
65 virtual bool commitPage( ::vcl::WizardTypes::CommitPageReason _eReason ) override;
66
67 // BuilderPage overridables
68 virtual void Activate() override;
69 virtual void Deactivate() override;
70
71 // OImportPage overridables
72 virtual bool canAdvance() const override;
73
74 DECL_LINK( OnTypeSelected, weld::Toggleable&, void );
75
76 void selectType( AddressSourceType _eType );
77 };
78
79
80} // namespace abp
81/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
the base class for all tab pages in the address book source wizard
Definition: abspage.hxx:36
virtual void Activate() override
virtual ~TypeSelectionPage() override
std::unique_ptr< weld::RadioButton > m_xEvolution
std::unique_ptr< weld::RadioButton > m_xThunderbird
std::vector< ButtonItem > m_aAllTypes
void selectType(AddressSourceType _eType)
AddressSourceType getSelectedType() const
virtual void Deactivate() override
std::unique_ptr< weld::RadioButton > m_xOther
TypeSelectionPage(weld::Container *pPage, OAddressBookSourcePilot *pController)
std::unique_ptr< weld::RadioButton > m_xEvolutionGroupwise
virtual void initializePage() override
virtual bool canAdvance() const override
std::unique_ptr< weld::RadioButton > m_xMacab
DECL_LINK(OnTypeSelected, weld::Toggleable &, void)
std::unique_ptr< weld::RadioButton > m_xKab
virtual bool commitPage(::vcl::WizardTypes::CommitPageReason _eReason) override
std::unique_ptr< weld::RadioButton > m_xEvolutionLdap
DocumentType eType
ButtonItem(weld::RadioButton *pItem, AddressSourceType eType, bool bVisible)
bool bVisible