From 0711b31096c771ff98b8562c576dbbc615897318 Mon Sep 17 00:00:00 2001
From: jonymt <johanmt@yandex.ru>
Date: Wed, 4 Sep 2019 13:52:12 +0200
Subject: [PATCH] [*] fixed log for win. added comments

---
 KelvinDashboardGUI/DapScreenHistoryModel.h    | 27 ++++++-------------
 .../DapChainHistoryHandler.cpp                |  2 --
 .../DapChainHistoryHandler.h                  |  5 ++++
 .../KelvinDashboardService.pro                |  3 ++-
 4 files changed, 15 insertions(+), 22 deletions(-)

diff --git a/KelvinDashboardGUI/DapScreenHistoryModel.h b/KelvinDashboardGUI/DapScreenHistoryModel.h
index c94d04684..4f90d5ab2 100644
--- a/KelvinDashboardGUI/DapScreenHistoryModel.h
+++ b/KelvinDashboardGUI/DapScreenHistoryModel.h
@@ -15,24 +15,7 @@ class DapScreenHistoryModel : public QAbstractListModel
     Q_OBJECT
 
 public:
-//    enum DapTransactionStatus {
-//        Pending,
-//        Sent,
-//        Received,
-//        Error
-//    };
-//    Q_ENUM(DapTransactionStatus)
-
-//    struct DapTransactionItem {
-//        QDateTime Date;
-//        QImage  TokenPic;
-//        DapTransactionStatus Status;
-//        QString TokenName;
-//        QString WalletNumber;
-//        QString Cryptocurrency;
-//        QString Currency;
-//    };
-
+    //!<    Role enumeration
     enum {
         DisplayDateRole = Qt::UserRole,
         DateRole,
@@ -46,21 +29,27 @@ public:
     };
 
 private:
-    QList<DapTransactionItem> m_elementList;
+    QList<DapTransactionItem> m_elementList;    //  Tx history list
     QTimer* m_timeout;
 
 public:
     explicit DapScreenHistoryModel(QObject *parent = nullptr);
     static DapScreenHistoryModel &getInstance();
 
+    //!<    override model's methods
     int rowCount(const QModelIndex &parent = QModelIndex()) const override;
     QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
     QHash<int, QByteArray> roleNames() const override;
 
 public slots:
+    //!<    Receive new tx history
     void receiveNewData(const QVariant& aData);
 
 signals:
+    //!<    Signal for requset current state of tx history
+    //! By defalt this signal emits when the client has just started while
+    //! the tx model will not get at least one tx history.
+    //! The signal stop emitting after getting the request result
     void sendRequestHistory();
 };
 
diff --git a/KelvinDashboardService/DapChainHistoryHandler.cpp b/KelvinDashboardService/DapChainHistoryHandler.cpp
index 6864587a3..e0459064d 100644
--- a/KelvinDashboardService/DapChainHistoryHandler.cpp
+++ b/KelvinDashboardService/DapChainHistoryHandler.cpp
@@ -10,8 +10,6 @@ DapChainHistoryHandler::DapChainHistoryHandler(QObject *parent) :
 
 QVariant DapChainHistoryHandler::getHistory() const
 {
-//    qDebug() << "get story" << m_history;
-
     return m_history;
 }
 
diff --git a/KelvinDashboardService/DapChainHistoryHandler.h b/KelvinDashboardService/DapChainHistoryHandler.h
index 748546110..7eb29ec8e 100644
--- a/KelvinDashboardService/DapChainHistoryHandler.h
+++ b/KelvinDashboardService/DapChainHistoryHandler.h
@@ -22,13 +22,18 @@ private:
 public:
     explicit DapChainHistoryHandler(QObject *parent = nullptr);
 
+    //!<    Get current state of history
     QVariant getHistory() const;
 
 public slots:
+    //!<    Request new tx history
+    //! \param wallet list
     void onRequestNewHistory(const QMap<QString, QVariant>& aWallets);
 
 signals:
+    //!<    Signal for request wallets list
     void requsetWallets();
+    //!<    Signal about getting new transatcion history
     void changeHistory(QVariant);
 };
 
diff --git a/KelvinDashboardService/KelvinDashboardService.pro b/KelvinDashboardService/KelvinDashboardService.pro
index bce4996d1..22ae350c2 100755
--- a/KelvinDashboardService/KelvinDashboardService.pro
+++ b/KelvinDashboardService/KelvinDashboardService.pro
@@ -21,7 +21,8 @@ ICON = icon.ico
 win32 {
     VERSION = $${VER_MAJ}.$${VER_MIN}.$$VER_PAT
     DEFINES += CLI_PATH=\\\"./kelvin-node-cli.exe\\\"
-    DEFINES += LOG_FILE=\\\"./opt/kelvin-node/bin/kelvin-node_logs.txt\\\"
+#    DEFINES += LOG_FILE=\\\"./opt/kelvin-node/bin/kelvin-node_logs.txt\\\"
+    DEFINES += LOG_FILE=\\\"./kelvin-node_logs.txt\\\"
 }
 else {
     VERSION = $$VER_MAJ\.$$VER_MIN\-$$VER_PAT
-- 
GitLab