From a7e74749a1c4edb2f8bc34c79e9bd1562de86ee9 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Tue, 19 Dec 2017 01:54:28 +0100 Subject: Change to Qt5 conding conventions Data structure changes: - Structogram is no longer just a scope, because it needs to store metadata - All structures now use QString instead of std::string, to integrate better in the Qt framework New code: - MainWindow ui code, building layout - MetadataDialog to change the metadata stored in the Structogram - Painter is a widget (still unimplemented) to show the structogram on the GUI --- src/diagram/statement.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/diagram/statement.cpp') diff --git a/src/diagram/statement.cpp b/src/diagram/statement.cpp index 9cbcdb4..eae5cd3 100644 --- a/src/diagram/statement.cpp +++ b/src/diagram/statement.cpp @@ -1,13 +1,25 @@ -#include "diagram/Statement.hpp" +#include "diagram/statement.h" using namespace samb; /* Statement */ -Statement::Statement(Type t, const std::string& text): type(t), m_text(text), m_next(nullptr) {} -Statement::Statement(Type t, const std::string& text, Statement::pointer p): type(t), m_text(text), m_next(p) {} +Statement::Statement(Type t, const QString &text) : + type(t), _text(text), _next(nullptr) +{ -Statement::~Statement() {} +} + +Statement::Statement(Type t, const QString &text, Statement::pointer p) : + type(t), _text(text), _next(p) +{ + +} + +Statement::~Statement() +{ + +} bool Statement::operator==(const Statement& other) const { // comparison by pointers -- cgit v1.2.1