#include "view/MainWindow.h" #include #include #include #include #include #include #include "parser/JsonParser.h" #include "viewmodel/table/LogTableModel.h" #include "viewmodel/displayString/SimpleDisplayProviderCreator.h" #include "provider/NetworkProvider.h" int main(int argc, char* argv[]) { QApplication a(argc, argv); MainWindow w; DataProvider_ptr testProvider = std::make_shared(QHostAddress::LocalHost, 12345); auto warehouse = std::make_shared(); QObject::connect(dynamic_cast(testProvider.get()), SIGNAL(provided(const Log_ptr)), warehouse.get(), SLOT(addData(const Log_ptr)), Qt::DirectConnection); auto model = new LogTableModel(warehouse); model->setDisplayProviderCreator(std::make_shared()); w.setTable(model); w.show(); return a.exec(); }