You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
738 B
39 lines
738 B
5 months ago
|
#ifndef DATAMANAGER_H
|
||
|
#define DATAMANAGER_H
|
||
|
|
||
|
#include <QObject>
|
||
|
|
||
|
#include "data/filter/FilterParser.h"
|
||
|
#include "data/filter/IFilter.h"
|
||
|
#include "LogWarehouse.h"
|
||
|
|
||
|
class DataManager : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
DataManager(FilterCreator_ptr<Log_ptr> filterCreator);
|
||
|
|
||
|
void clearLogs();
|
||
|
void setFilter(QString filter);
|
||
|
|
||
|
signals:
|
||
|
void badFilterRequested(QString message);
|
||
|
void logAdded(const Log_ptr log);
|
||
|
void logsReseted(QList<Log_ptr> logs);
|
||
|
|
||
|
//uncrustify off
|
||
|
public slots:
|
||
|
//uncrustify on
|
||
|
void onLogProvided(Log_ptr log);
|
||
|
|
||
|
private:
|
||
|
void resetView();
|
||
|
|
||
|
LogWarehouse_ptr _warehouse;
|
||
|
std::shared_ptr<IFilter<Log_ptr> > _filter;
|
||
|
FilterParser<Log_ptr> _parser;
|
||
|
};
|
||
|
|
||
|
#endif //DATAMANAGER_H
|