1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
/*
This file is part of KCachegrind.
SPDX-FileCopyrightText: 2002-2016 Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
SPDX-License-Identifier: GPL-2.0-only
*/
/*
* Dispatcher for messages (status/warning/errors) from libcore
*
* For different front ends which want to present the messages to the
* user, a derived class should be implemented
*/
#ifndef LOGGER_H
#define LOGGER_H
#include <qstring.h>
#include <qtimer.h>
class Logger
{
public:
virtual ~Logger();
// Notifications for file loading
virtual void loadStart(const QString& filename);
virtual void loadProgress(int progress); // 0 - 100
virtual void loadWarning(int line, const QString& msg);
virtual void loadError(int line, const QString& msg);
virtual void loadFinished(const QString& msg); // msg could be error
protected:
QString _filename;
private:
QTimer _timer;
};
#endif // LOGGER_H
|