diff options
author | Petr Mrázek <peterix@gmail.com> | 2016-08-10 08:41:58 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-08-10 08:41:58 +0200 |
commit | e2f3652a0f5fc51736cbda7ac4e337a597f3aed1 (patch) | |
tree | d7d25154db90d2db7724dfb6ee001ce0afee5e21 /api/logic/launch/LogModel.h | |
parent | c60db13af73523c08353f819cc2a8441a7ddbada (diff) | |
download | MultiMC-e2f3652a0f5fc51736cbda7ac4e337a597f3aed1.tar MultiMC-e2f3652a0f5fc51736cbda7ac4e337a597f3aed1.tar.gz MultiMC-e2f3652a0f5fc51736cbda7ac4e337a597f3aed1.tar.lz MultiMC-e2f3652a0f5fc51736cbda7ac4e337a597f3aed1.tar.xz MultiMC-e2f3652a0f5fc51736cbda7ac4e337a597f3aed1.zip |
Revert "NOISSUE rework of minecraft log"
This reverts commit fc198dd3085a2cd33fbaa7a3d2c95c2c8d3ee31a.
Diffstat (limited to 'api/logic/launch/LogModel.h')
-rw-r--r-- | api/logic/launch/LogModel.h | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/api/logic/launch/LogModel.h b/api/logic/launch/LogModel.h deleted file mode 100644 index 87e6b583..00000000 --- a/api/logic/launch/LogModel.h +++ /dev/null @@ -1,51 +0,0 @@ -#pragma once - -#include <QAbstractListModel> -#include <QString> -#include "MessageLevel.h" - -#include <multimc_logic_export.h> - -class MULTIMC_LOGIC_EXPORT LogModel : public QAbstractListModel -{ - Q_OBJECT -public: - explicit LogModel(QObject *parent = 0); - - int rowCount(const QModelIndex &parent = QModelIndex()) const; - QVariant data(const QModelIndex &index, int role) const; - - void append(MessageLevel::Enum, QString line); - void clear(); - - QString toPlainText(); - - void setMaxLines(int maxLines); - void setStopOnOverflow(bool stop); - void setOverflowMessage(const QString & overflowMessage); - - enum Roles - { - LevelRole = Qt::UserRole - }; - -private /* types */: - struct entry - { - MessageLevel::Enum level; - QString line; - }; - -private: /* data */ - QVector <entry> m_content; - int m_maxLines = 1000; - // first line in the circular buffer - int m_firstLine = 0; - // number of lines occupied in the circular buffer - int m_numLines = 0; - bool m_stopOnOverflow = false; - QString m_overflowMessage = "OVERFLOW"; - -private: - Q_DISABLE_COPY(LogModel) -}; |