Akonadi

akthread.h
1 /*
2  SPDX-FileCopyrightText: 2015 Daniel Vr├ítil <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <QObject>
10 #include <QThread>
11 
12 namespace Akonadi
13 {
14 namespace Server
15 {
16 class AkThread : public QObject
17 {
18  Q_OBJECT
19 public:
20  enum StartMode {
21  AutoStart,
22  ManualStart,
23  NoThread // for unit-tests
24  };
25 
26  explicit AkThread(const QString &objectName, QThread::Priority priority = QThread::InheritPriority, QObject *parent = nullptr);
27  explicit AkThread(const QString &objectName, StartMode startMode, QThread::Priority priority = QThread::InheritPriority, QObject *parent = nullptr);
28  ~AkThread() override;
29 
30 protected:
31  void quitThread();
32  void startThread();
33 
34 protected Q_SLOTS:
35  virtual void init();
36  virtual void quit();
37 
38 private:
39  StartMode m_startMode = AutoStart;
40 };
41 
42 }
43 }
44 
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QCA_EXPORT void init()
const QList< QKeySequence > & quit()
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jun 25 2022 06:00:31 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.