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_QUESTIONLISTENER_H
9#define KNS3_QUESTIONLISTENER_H
10
11#include <QObject>
12
13#include "knewstuffcore_export.h"
14
15namespace KNSCore
16{
17class Question;
18/**
19 * @short Implementation-side handler class for questions sent from KNewStuffCore
20 *
21 * When implementing anything on top of KNewStuffCore, you will need to be able
22 * to react to questions asked from inside the framework. This is done by creating
23 * an instance of a QuestionListener, and reacting to any calls to the askQuestion
24 * slot, which you must extend and implement. Two examples of this exist, in the
25 * form of the KNS3::WidgetQuestionListener and KNewStuffQuick::QuickQuestionListener
26 * and should you need to create your own, take inspiration from them.
27 */
28class KNEWSTUFFCORE_EXPORT QuestionListener : public QObject
29{
30 Q_OBJECT
31public:
32 explicit QuestionListener(QObject *parent = nullptr);
33 ~QuestionListener() override;
34
35 virtual void askQuestion(Question *question) = 0;
36};
37}
38
39#endif // KNS3_QUESTIONLISTENER_H
40

source code of knewstuff/src/core/questionlistener.h