Pimcommon

progressmanagerakonadi.cpp
1/*
2 progressmanager.cpp
3
4 SPDX-FileCopyrightText: 2004 Till Adam <adam@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#include "progressmanagerakonadi.h"
10#include "agentprogressmonitor.h"
11
12KPIM::ProgressItem *PimCommon::ProgressManagerAkonadi::createProgressItem(KPIM::ProgressItem *parent,
13 const Akonadi::AgentInstance &agent,
14 const QString &id,
15 const QString &label,
16 const QString &status,
17 bool canBeCanceled,
18 KPIM::ProgressItem::CryptoStatus cryptoStatus)
19{
20 const bool itemAlreadyExists = (KPIM::ProgressManager::instance()->progressItem(id) != nullptr);
21 KPIM::ProgressItem *t = KPIM::ProgressManager::instance()->createProgressItem(parent, id, label, status, canBeCanceled, cryptoStatus);
22 t->setTypeProgressItem(0);
23 if (!itemAlreadyExists) {
24 // qCDebug(LIBKDEPIM_LOG) << "Created ProgressItem for agent" << instance.name();
25 new AgentProgressMonitor(agent, t);
26 }
27 return t;
28}
static ProgressManager * instance()
static ProgressItem * createProgressItem(const QString &id, const QString &label, const QString &status=QString(), bool canBeCanceled=true, KPIM::ProgressItem::CryptoStatus cryptoStatus=KPIM::ProgressItem::Unencrypted)
Q_SCRIPTABLE CaptureState status()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.