Akonadi

agentthread.h
1/*
2 SPDX-FileCopyrightText: 2010 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <QThread>
10
11namespace Akonadi
12{
13/**
14 * @short A class that encapsulates an agent instance inside a thread.
15 */
16class AgentThread : public QThread
17{
19
20public:
21 /**
22 * Creates a new agent thread.
23 *
24 * @param identifier The unique identifier for this agent
25 * @param factory The factory object that creates the agent instance.
26 * @param parent The parent object.
27 */
28 AgentThread(const QString &identifier, QObject *factory, QObject *parent = nullptr);
29
30 /**
31 * Configures the agent.
32 *
33 * @param windowId The parent window id for the config dialog.
34 */
36
37protected:
38 void run() override;
39
40private:
41 const QString m_identifier;
42 QObject *const m_factory;
43 QObject *m_instance = nullptr;
44};
45
46}
A class that encapsulates an agent instance inside a thread.
Definition agentthread.h:17
AgentThread(const QString &identifier, QObject *factory, QObject *parent=nullptr)
Creates a new agent thread.
void configure(qlonglong windowId)
Configures the agent.
Helper integration between Akonadi and Qt.
Q_OBJECTQ_OBJECT
QObject * parent() const const
T qobject_cast(QObject *object)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:38 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.