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.

36 lines
999 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"
#include "provider/NetworkProvider.h"
int main(int argc, char* argv[])
6 months ago
{
QApplication a(argc, argv);
MainWindow w;
DataProvider_ptr testProvider =
std::make_shared<NetworkProvider>(QHostAddress::LocalHost, 12345);
auto warehouse = std::make_shared<LogWarehouse>();
QObject::connect(dynamic_cast<QObject*>(testProvider.get()),
SIGNAL(provided(const Log_ptr)),
warehouse.get(),
SLOT(addData(const Log_ptr)));
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();
}