Log Viewer
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.

32 lines
992 B

#include "view/MainWindow.h"
6 months ago
#include <QApplication>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
#include <QFile>
#include <QVector>
6 months ago
#include "parser/JsonParser.h"
#include "viewmodel/table/LogTableModel.h"
#include "viewmodel/displayString/SimpleDisplayProviderCreator.h"
int main(int argc, char* argv[])
6 months ago
{
QApplication a(argc, argv);
MainWindow w;
QString jsonString =
R"(
{"id":"stderr","level":1,"location":{"file":"../../../host-projects/sono/logic/src/viewModel/factory/ApplicationStarter.cpp","func":"init","lineno":69},"msg":["FUCK\n"],"scope":"global","threadId":124330260010752,"timestamp":1716911725703}
)";
auto warehouse = std::make_shared<LogWarehouse>();
warehouse->addData(JsonParser().parse(jsonString));
auto model = new LogTableModel(warehouse);
model->setDisplayProviderCreator(std::make_shared<SimpleDisplayProviderCreator>());
w.setTable(model);
6 months ago
w.show();
6 months ago
return a.exec();
}