5#ifndef QQMLDEBUGCONSOLE_P_H
6#define QQMLDEBUGCONSOLE_P_H
19#include <QtCore/qobject.h>
20#include <QtCore/qstringlist.h>
21#include <QtCore/qthread.h>
27class QQmlDebugCommandListener;
43 const QString &description, CommandHandler handler);
48 void prompt(
const QString &message = QString(),
bool ready =
true);
52 std::function<
void()> onDeclined = {});
65 CommandHandler handler;
68 void handleLine(
const QString &line);
71 QThread m_listenerThread;
72 QQmlDebugCommandListener *m_listener =
nullptr;
74 QList<Command> m_commands;
76 QString m_pendingQuestion;
77 std::function<
void()> m_onConfirmed;
78 std::function<
void()> m_onDeclined;
void askConfirmation(const QString &question, std::function< void()> onConfirmed, std::function< void()> onDeclined={})
QQmlDebugConsole(QObject *parent=nullptr)
void printLine(const QString &message)
void registerCommand(const QStringList &names, const QString &argsHint, const QString &description, CommandHandler handler)
void prompt(const QString &message=QString(), bool ready=true)