2#include <QAbstractListModel>
55 [[nodiscard]]
unsigned source()
const;
60 [[nodiscard]] QVariant
headerData(
int section, Qt::Orientation orientation,
int role )
const override;
65 [[nodiscard]]
int rowCount(
const QModelIndex& parent )
const override;
70 [[nodiscard]] QVariant
data(
const QModelIndex& index,
int role)
const override;
85 static std::streambuf* _coutSaved;
86 static std::streambuf* _clogSaved;
87 static std::streambuf* _cerrSaved;
89 QMenu* _contextMenu{
nullptr};
91 void handleNewLine(LineBuffer* sender,
const QString& line);
93 void contextMenuRequested(QPoint);
List model implementation on captured output stream data.
Definition CaptureListModel.h:15
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Overridden from base class.
unsigned setSource(unsigned ss)
bool append(const QString &str)
Append string to the end of the list.
CaptureListModel(QObject *parent=nullptr)
Constructor.
StreamSource
Stream sources to capture.
Definition CaptureListModel.h:38
int rowCount(const QModelIndex &parent) const override
Overridden from base class.
QVariant data(const QModelIndex &index, int role) const override
Overridden from base class.
~CaptureListModel() override
Destructor.
unsigned source() const
Reports the stream being captured.
Special std::streambuf class for capturing lines.
Definition LineBuffer.h:14
#define _MISC_CLASS
Definition misc/global.h:40
Definition Application.h:10