LogView fixes and optimizations

This commit is contained in:
2020-06-19 19:17:30 +03:00
parent a195ec4006
commit f02c38884b
3 changed files with 99 additions and 34 deletions

View File

@@ -28,6 +28,7 @@
#include "qad_export.h"
class QTextEdit;
class QTextBlock;
class QAction;
namespace Ui {
@@ -58,10 +59,13 @@ public:
bool bold = false);
void registerCategory(const QString & label,
QRegularExpression regexp = QRegularExpression(),
QRegularExpression regexp,
const QImage & icon = QImage(),
QColor color = QColor(),
bool bold = false);
void removeCategory(QString keyword);
void removeCategory(QRegularExpression regexp);
void clearCategories();
void addText(const QString & text, bool insert_newline = true);
@@ -81,6 +85,7 @@ private:
void changeEvent(QEvent * e);
void newLine();
QSize iconImageSize();
void filterBlock(QTextBlock block, const QString & fs, const QRegularExpression & regexp);
Ui::LogView * ui;
QList<Category> categories;
@@ -93,6 +98,7 @@ public slots:
void clear();
private slots:
void scrollToBottom();
void filter();
signals: