KNewStuff

quickquestionlistener.h
1/*
2 This file is part of KNewStuffQuick.
3 SPDX-FileCopyrightText: 2019 Dan Leinir Turthra Jensen <admin@leinir.dk>
4
5 SPDX-License-Identifier: LGPL-2.1-or-later
6*/
7
8#ifndef KNSQ_QUICKQUESTIONLISTENER_H
9#define KNSQ_QUICKQUESTIONLISTENER_H
10
11#include "core/questionlistener.h"
12#include <QPointer>
13
14namespace KNewStuffQuick
15{
16class QuickQuestionListener : public KNSCore::QuestionListener
17{
19 Q_DISABLE_COPY(QuickQuestionListener)
20public:
21 static QuickQuestionListener *instance();
22 ~QuickQuestionListener() override;
23
24 Q_SLOT void askQuestion(KNSCore::Question *question) override;
25
26 Q_SIGNAL void askListQuestion(QString title, QString question, QStringList list);
27 Q_SIGNAL void askContinueCancelQuestion(QString title, QString question);
28 Q_SIGNAL void askTextInputQuestion(QString title, QString question);
29 Q_SIGNAL void askPasswordQuestion(QString title, QString question);
30 Q_SIGNAL void askYesNoQuestion(QString title, QString question);
31
32 Q_SLOT void passResponse(bool responseIsContinue, QString input);
33
34 QuickQuestionListener() = default; // Only used by Q_GLOBAL_STATIC
35private:
37};
38}
39
40#endif // KNSQ_QUICKQUESTIONLISTENER_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
Q_OBJECTQ_OBJECT
Q_SIGNALQ_SIGNAL
Q_SLOTQ_SLOT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 24 2024 11:54:38 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.