File indexing completed on 2024-04-28 09:36:47
0001 /* 0002 This file is part of KCachegrind. 0003 0004 SPDX-FileCopyrightText: 2002-2016 Josef Weidendorfer <Josef.Weidendorfer@gmx.de> 0005 0006 SPDX-License-Identifier: GPL-2.0-only 0007 */ 0008 0009 /* 0010 * Dispatcher for messages (status/warning/errors) from libcore 0011 * 0012 * For different front ends which want to present the messages to the 0013 * user, a derived class should be implemented 0014 */ 0015 0016 #ifndef LOGGER_H 0017 #define LOGGER_H 0018 0019 #include <qstring.h> 0020 #include <qtimer.h> 0021 0022 class Logger 0023 { 0024 public: 0025 virtual ~Logger(); 0026 0027 // Notifications for file loading 0028 virtual void loadStart(const QString& filename); 0029 virtual void loadProgress(int progress); // 0 - 100 0030 virtual void loadWarning(int line, const QString& msg); 0031 virtual void loadError(int line, const QString& msg); 0032 virtual void loadFinished(const QString& msg); // msg could be error 0033 0034 protected: 0035 QString _filename; 0036 0037 private: 0038 QTimer _timer; 0039 }; 0040 0041 #endif // LOGGER_H 0042 0043