chore: reformat
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
ce2ca13815
commit
1d468ac35a
594 changed files with 16040 additions and 16536 deletions
|
@ -4,14 +4,13 @@
|
|||
#include <QString>
|
||||
#include "MessageLevel.h"
|
||||
|
||||
class LogModel : public QAbstractListModel
|
||||
{
|
||||
class LogModel : public QAbstractListModel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit LogModel(QObject *parent = 0);
|
||||
public:
|
||||
explicit LogModel(QObject* parent = 0);
|
||||
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
int rowCount(const QModelIndex& parent = QModelIndex()) const;
|
||||
QVariant data(const QModelIndex& index, int role) const;
|
||||
|
||||
void append(MessageLevel::Enum, QString line);
|
||||
void clear();
|
||||
|
@ -24,25 +23,21 @@ public:
|
|||
int getMaxLines();
|
||||
void setMaxLines(int maxLines);
|
||||
void setStopOnOverflow(bool stop);
|
||||
void setOverflowMessage(const QString & overflowMessage);
|
||||
void setOverflowMessage(const QString& overflowMessage);
|
||||
|
||||
void setLineWrap(bool state);
|
||||
bool wrapLines() const;
|
||||
|
||||
enum Roles
|
||||
{
|
||||
LevelRole = Qt::UserRole
|
||||
};
|
||||
enum Roles { LevelRole = Qt::UserRole };
|
||||
|
||||
private /* types */:
|
||||
struct entry
|
||||
{
|
||||
private /* types */:
|
||||
struct entry {
|
||||
MessageLevel::Enum level;
|
||||
QString line;
|
||||
};
|
||||
|
||||
private: /* data */
|
||||
QVector <entry> m_content;
|
||||
private: /* data */
|
||||
QVector<entry> m_content;
|
||||
int m_maxLines = 1000;
|
||||
// first line in the circular buffer
|
||||
int m_firstLine = 0;
|
||||
|
@ -53,6 +48,6 @@ private: /* data */
|
|||
bool m_suspended = false;
|
||||
bool m_lineWrap = true;
|
||||
|
||||
private:
|
||||
private:
|
||||
Q_DISABLE_COPY(LogModel)
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue