1 | /* |
2 | This file is part of KNewStuffCore. |
3 | SPDX-FileCopyrightText: 2016 Dan Leinir Turthra Jensen <admin@leinir.dk> |
4 | |
5 | SPDX-License-Identifier: LGPL-2.1-or-later |
6 | */ |
7 | |
8 | #ifndef KNS3_QUESTIONMANAGER_H |
9 | #define KNS3_QUESTIONMANAGER_H |
10 | |
11 | #include <QObject> |
12 | |
13 | #include "knewstuffcore_export.h" |
14 | namespace KNSCore |
15 | { |
16 | class Question; |
17 | class QuestionManagerPrivate; |
18 | /*! |
19 | * \class KNSCore::QuestionManager |
20 | * \inmodule KNewStuffCore |
21 | * |
22 | * \brief The central class handling Question redirection. |
23 | * |
24 | * This class is used to ensure that KNSCore::Question instances get redirected |
25 | * to the appropriate KNSCore::QuestionListener instances. It is a very dumb class |
26 | * which only ensures the listeners have somewhere to listen to, and the |
27 | * questions have somewhere to ask to be asked. |
28 | */ |
29 | class KNEWSTUFFCORE_EXPORT QuestionManager : public QObject |
30 | { |
31 | Q_OBJECT |
32 | Q_DISABLE_COPY(QuestionManager) |
33 | public: |
34 | static QuestionManager *instance(); |
35 | ~QuestionManager() override; |
36 | |
37 | Q_SIGNALS: |
38 | void askQuestion(KNSCore::Question *question); |
39 | |
40 | private: |
41 | QuestionManager(); |
42 | const void *d; // Future BIC |
43 | }; |
44 | } |
45 | |
46 | #endif // KNS3_QUESTIONMANAGER_H |
47 | |