File indexing completed on 2024-12-22 04:52:47
0001 /* 0002 SPDX-FileCopyrightText: 2012-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "abstractbase.h" 0008 #include <PimCommonAkonadi/CreateResource> 0009 0010 #include <KSharedConfig> 0011 0012 #include <Akonadi/AgentInstanceCreateJob> 0013 #include <Akonadi/AgentManager> 0014 #include <Akonadi/AgentType> 0015 0016 #include <QMetaMethod> 0017 0018 using namespace Akonadi; 0019 using namespace LibImportWizard; 0020 AbstractBase::AbstractBase() 0021 { 0022 mCreateResource = new PimCommon::CreateResource(); 0023 connect(mCreateResource, &PimCommon::CreateResource::createResourceInfo, this, &AbstractBase::slotCreateResourceInfo); 0024 connect(mCreateResource, &PimCommon::CreateResource::createResourceError, this, &AbstractBase::slotCreateResourceError); 0025 } 0026 0027 AbstractBase::~AbstractBase() 0028 { 0029 delete mCreateResource; 0030 } 0031 0032 QString LibImportWizard::AbstractBase::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings) 0033 { 0034 return mCreateResource->createResource(resources, name, settings); 0035 } 0036 0037 void AbstractBase::setAbstractDisplayInfo(AbstractDisplayInfo *abstractDisplayInfo) 0038 { 0039 mAbstractDisplayInfo = abstractDisplayInfo; 0040 } 0041 0042 void AbstractBase::slotCreateResourceError(const QString &msg) 0043 { 0044 addImportError(msg); 0045 } 0046 0047 void AbstractBase::slotCreateResourceInfo(const QString &msg) 0048 { 0049 addImportInfo(msg); 0050 } 0051 0052 #include "moc_abstractbase.cpp"