From 3196eb75a7613e73cd0b31808818a053da049475 Mon Sep 17 00:00:00 2001 From: Nathan Hourt Date: Wed, 22 Jul 2015 13:17:49 -0400 Subject: [PATCH] Fixes --- .../graphene/chain/protocol/transfer.hpp | 12 +++---- programs/light_client/GrapheneObject.cpp | 3 ++ programs/light_client/GrapheneObject.hpp | 31 +++++++++++++++++++ 3 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 programs/light_client/GrapheneObject.cpp create mode 100644 programs/light_client/GrapheneObject.hpp diff --git a/libraries/chain/include/graphene/chain/protocol/transfer.hpp b/libraries/chain/include/graphene/chain/protocol/transfer.hpp index 7e5b528c..46fc1b2a 100644 --- a/libraries/chain/include/graphene/chain/protocol/transfer.hpp +++ b/libraries/chain/include/graphene/chain/protocol/transfer.hpp @@ -2,7 +2,7 @@ #include #include -namespace graphene { namespace chain { +namespace graphene { namespace chain { /** * @ingroup operations @@ -20,9 +20,9 @@ namespace graphene { namespace chain { */ struct transfer_operation : public base_operation { - struct fee_parameters_type { - uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; - uint32_t price_per_kbyte = 10; /// only required for large memos. + struct fee_parameters_type { + uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; + uint32_t price_per_kbyte = 10 * GRAPHENE_BLOCKCHAIN_PRECISION; /// only required for large memos. }; asset fee; @@ -54,7 +54,7 @@ namespace graphene { namespace chain { */ struct override_transfer_operation : public base_operation { - struct fee_parameters_type { + struct fee_parameters_type { uint64_t fee = 20 * GRAPHENE_BLOCKCHAIN_PRECISION; uint32_t price_per_kbyte = 10; /// only required for large memos. }; @@ -76,7 +76,7 @@ namespace graphene { namespace chain { void validate()const; share_type calculate_fee(const fee_parameters_type& k)const; void get_impacted_accounts( flat_set& i )const - { + { i.insert(to); i.insert(from); i.insert(issuer); diff --git a/programs/light_client/GrapheneObject.cpp b/programs/light_client/GrapheneObject.cpp new file mode 100644 index 00000000..9ec55ba2 --- /dev/null +++ b/programs/light_client/GrapheneObject.cpp @@ -0,0 +1,3 @@ +#include "GrapheneObject.hpp" + +// This space intentionally left blank diff --git a/programs/light_client/GrapheneObject.hpp b/programs/light_client/GrapheneObject.hpp new file mode 100644 index 00000000..0c53c562 --- /dev/null +++ b/programs/light_client/GrapheneObject.hpp @@ -0,0 +1,31 @@ +#pragma once +#pragma GCC diagnostic ignored "-Wunknown-pragmas" + +#include + +#include + +using ObjectId = qint64; +Q_DECLARE_METATYPE(ObjectId) + +Q_DECLARE_METATYPE(std::function) + +class GrapheneObject : public QObject +{ + Q_OBJECT + Q_PROPERTY(ObjectId id MEMBER m_id READ id NOTIFY idChanged) + + ObjectId m_id; + +public: + GrapheneObject(ObjectId id = -1, QObject* parent = nullptr) + : QObject(parent), m_id(id) + {} + + ObjectId id() const { + return m_id; + } + +Q_SIGNALS: + void idChanged(); +};