2#include <QAbstractListModel>
75 QVariant
headerData(
int section, Qt::Orientation orientation,
int role )
const override;
80 int rowCount(
const QModelIndex& parent )
const override;
85 QVariant
data(
const QModelIndex& index,
int role)
const override;
97 void contextMenuRequested(QPoint);
104 void handleNewLine(
LineBuffer* sender,
const QString& line);
108 static std::streambuf* _stdCoutSaved;
109 static std::streambuf* _stdClogSaved;
110 static std::streambuf* _stdCerrSaved;
List model implementation which can capture output streams from std::cout, std::clog and std::cerr by...
Definition CaptureListModel.h:24
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:53
int rowCount(const QModelIndex &parent) const override
Overridden from base class.
std::streambuf * getStreamBuffer() const
Gets the internal stream buffer. Used for attaching to a std::ostream instance.
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:15
#define _MISC_CLASS
Definition misc/global.h:40
Definition Application.h:10