File indexing completed on 2024-04-14 03:54:08
0001 /* 0002 This file is part of KNewStuffCore. 0003 SPDX-FileCopyrightText: 2016 Dan Leinir Turthra Jensen <admin@leinir.dk> 0004 0005 SPDX-License-Identifier: LGPL-2.1-or-later 0006 */ 0007 0008 #ifndef KNS3_QUESTIONMANAGER_H 0009 #define KNS3_QUESTIONMANAGER_H 0010 0011 #include <QObject> 0012 0013 #include "knewstuffcore_export.h" 0014 namespace KNSCore 0015 { 0016 class Question; 0017 class QuestionManagerPrivate; 0018 /** 0019 * @short The central class handling Question redirection 0020 * 0021 * This class is used to ensure that KNSCore::Question instances get redirected 0022 * to the appropriate KNSCore::QuestionListener instances. It is a very dumb class 0023 * which only ensures the listeners have somewhere to listen to, and the 0024 * questions have somewhere to ask to be asked. 0025 */ 0026 class KNEWSTUFFCORE_EXPORT QuestionManager : public QObject 0027 { 0028 Q_OBJECT 0029 Q_DISABLE_COPY(QuestionManager) 0030 public: 0031 static QuestionManager *instance(); 0032 ~QuestionManager() override; 0033 0034 Q_SIGNALS: 0035 void askQuestion(KNSCore::Question *question); 0036 0037 private: 0038 QuestionManager(); 0039 const void *d; // Future BIC 0040 }; 0041 } 0042 0043 #endif // KNS3_QUESTIONMANAGER_H