# HG changeset patch # User František Kučera # Date 1553958881 -3600 # Node ID 129b8cca9b980d2856d614917e70cf465c4f1841 # Parent d905557eda623aca2ab4023e069cfbaf9012c530 fix typo: Hadler → Handler diff -r d905557eda62 -r 129b8cca9b98 src/CMakeLists.txt --- a/src/CMakeLists.txt Wed Feb 20 11:30:49 2019 +0100 +++ b/src/CMakeLists.txt Sat Mar 30 16:14:41 2019 +0100 @@ -37,7 +37,7 @@ # Executable output: add_executable( ${EXECUTABLE_FILE} - QtRelationalReaderStringHadler.h # QObjects must be listed here (including them from other files is not enough) + QtRelationalReaderStringHandler.h # QObjects must be listed here (including them from other files is not enough) RelpipeChartWidget.h RelpipeTableModel.h RelpipeChartMainWindow.ui diff -r d905557eda62 -r 129b8cca9b98 src/QtRelationalReaderStringHadler.h --- a/src/QtRelationalReaderStringHadler.h Wed Feb 20 11:30:49 2019 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/** - * Relational pipes - * Copyright © 2018 František Kučera (Frantovo.cz, GlobalCode.info) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#pragma once - -#include - -#include -#include -#include -#include - -using namespace relpipe::reader; -using namespace relpipe::reader::handlers; - -class QtRelationalReaderStringHadler : public QObject, public RelationalReaderStringHadler { - - Q_OBJECT -public: - QtRelationalReaderStringHadler(QObject* parent) : QObject(parent) { - } - - virtual ~QtRelationalReaderStringHadler() { - } - - virtual void startRelation(string_t name, std::vector attributes) override { - emit startRelationReceived(name, attributes); - } - - virtual void attribute(const string_t& value) override { - emit attributeReceived(value); - }; - - virtual void endOfPipe() override { - emit endOfPipeReceived(); - }; - -signals: - void startRelationReceived(const string_t name, std::vector attributes); - void attributeReceived(const string_t value); - void endOfPipeReceived(); -}; diff -r d905557eda62 -r 129b8cca9b98 src/QtRelationalReaderStringHandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/QtRelationalReaderStringHandler.h Sat Mar 30 16:14:41 2019 +0100 @@ -0,0 +1,56 @@ +/** + * Relational pipes + * Copyright © 2018 František Kučera (Frantovo.cz, GlobalCode.info) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include + +#include +#include +#include +#include + +using namespace relpipe::reader; +using namespace relpipe::reader::handlers; + +class QtRelationalReaderStringHandler : public QObject, public RelationalReaderStringHandler { + + Q_OBJECT +public: + QtRelationalReaderStringHandler(QObject* parent) : QObject(parent) { + } + + virtual ~QtRelationalReaderStringHandler() { + } + + virtual void startRelation(string_t name, std::vector attributes) override { + emit startRelationReceived(name, attributes); + } + + virtual void attribute(const string_t& value) override { + emit attributeReceived(value); + }; + + virtual void endOfPipe() override { + emit endOfPipeReceived(); + }; + +signals: + void startRelationReceived(const string_t name, std::vector attributes); + void attributeReceived(const string_t value); + void endOfPipeReceived(); +}; diff -r d905557eda62 -r 129b8cca9b98 src/relpipe-out-gui.cpp --- a/src/relpipe-out-gui.cpp Wed Feb 20 11:30:49 2019 +0100 +++ b/src/relpipe-out-gui.cpp Sat Mar 30 16:14:41 2019 +0100 @@ -30,7 +30,7 @@ #include #include "RelpipeChartMainWindow.h" -#include "QtRelationalReaderStringHadler.h" +#include "QtRelationalReaderStringHandler.h" using namespace relpipe::cli; using namespace relpipe::reader; @@ -78,15 +78,15 @@ RelationalReaderThread t(reader); // Proxy that passes calls from the background thread to the GUI thread using signal-slot mechanism: - QtRelationalReaderStringHadler handler(&t); // &t instead of handler.moveToThread(&t); // QObject::moveToThread: Cannot move objects with a parent + QtRelationalReaderStringHandler handler(&t); // &t instead of handler.moveToThread(&t); // QObject::moveToThread: Cannot move objects with a parent // see Q_DECLARE_METATYPE above qRegisterMetaType(); qRegisterMetaType> (); - QObject::connect(&handler, &QtRelationalReaderStringHadler::startRelationReceived, &window, &RelpipeChartMainWindow::startRelation, Qt::ConnectionType::QueuedConnection); - QObject::connect(&handler, &QtRelationalReaderStringHadler::attributeReceived, &window, &RelpipeChartMainWindow::attribute, Qt::ConnectionType::QueuedConnection); - QObject::connect(&handler, &QtRelationalReaderStringHadler::endOfPipeReceived, &window, &RelpipeChartMainWindow::endOfPipe, Qt::ConnectionType::QueuedConnection); + QObject::connect(&handler, &QtRelationalReaderStringHandler::startRelationReceived, &window, &RelpipeChartMainWindow::startRelation, Qt::ConnectionType::QueuedConnection); + QObject::connect(&handler, &QtRelationalReaderStringHandler::attributeReceived, &window, &RelpipeChartMainWindow::attribute, Qt::ConnectionType::QueuedConnection); + QObject::connect(&handler, &QtRelationalReaderStringHandler::endOfPipeReceived, &window, &RelpipeChartMainWindow::endOfPipe, Qt::ConnectionType::QueuedConnection); reader->addHandler(&handler);