KNewStuff

questionlistener.h
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 */
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
Implementation-side handler class for questions sent from KNewStuffCore.
A way to ask a user a question from inside a GUI-less library (like KNewStuffCore)
Definition question.h:47
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:52:40 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.