File indexing completed on 2024-05-05 05:48:57
0001 /* 0002 SPDX-FileCopyrightText: 2007 Nicolas Ternisien <nicolas.ternisien@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <QList> 0010 0011 #include "globals.h" 0012 0013 #include "logFile.h" 0014 #include "logMode.h" 0015 0016 #include "logViewColumns.h" 0017 #include "logViewModel.h" 0018 0019 class View; 0020 0021 class LogManagerPrivate; 0022 0023 class LogManager : public QObject 0024 { 0025 Q_OBJECT 0026 0027 public: 0028 explicit LogManager(View *view); 0029 0030 ~LogManager() override; 0031 0032 View *usedView() const; 0033 0034 const QTime &lastUpdate() const; 0035 0036 LogMode *logMode(); 0037 0038 QString title() const; 0039 0040 void initialize(LogMode *mode, const QVariant &analyzerOptions = QVariant()); 0041 0042 void setParsingPaused(bool paused); 0043 bool isParsingPaused() const; 0044 0045 void reload(); 0046 void stopWatching(); 0047 0048 const QVariant &analyzerOptions() const; 0049 0050 protected Q_SLOTS: 0051 0052 void updateLog(int lineCount); 0053 0054 void showErrorMessage(const QString &title, const QString &message); 0055 0056 Q_SIGNALS: 0057 void tabTitleChanged(View *view, const QIcon &icon, const QString &label); 0058 0059 void windowTitleChanged(const QString &caption); 0060 void statusBarChanged(const QString &message); 0061 0062 void reloaded(); 0063 void logUpdated(View *view, int addedLines); 0064 0065 private Q_SLOTS: 0066 void loadDroppedUrls(const QList<QUrl> &urls); 0067 0068 private: 0069 void internalInitialize(LogMode *mode, const QVector<LogFile> &logFiles, const QVariant &analyzerOptions = QVariant()); 0070 0071 void cleanPreviousLogMode(); 0072 0073 LogManagerPrivate *d; 0074 };