Several status view fixes
Change-Id: I4118c40eeca6b4660bd1ca8f456c650ffb04a637
diff --git a/src/forwarder-status.hpp b/src/forwarder-status.hpp
index 0d4282e..742b5da 100644
--- a/src/forwarder-status.hpp
+++ b/src/forwarder-status.hpp
@@ -20,8 +20,9 @@
#ifndef NCC_FORWARDER_STATUS_HPP
#define NCC_FORWARDER_STATUS_HPP
-#include <QtCore/QAbstractListModel>
-#include <QtCore/QStringList>
+#include <QAbstractListModel>
+#include <QStringList>
+#include <QDateTime>
#include <ndn-cxx/interest.hpp>
#include <ndn-cxx/mgmt/nfd/forwarder-status.hpp>
@@ -37,6 +38,23 @@
{
}
+ ForwarderStatusItem(const QString& type, const std::string& value)
+ : m_type(type)
+ , m_value(QString::fromStdString(value))
+ {
+ }
+
+ ForwarderStatusItem(const QString& type, uint64_t value)
+ : m_type(type)
+ , m_value(QString::number(value))
+ {
+ }
+
+ ForwarderStatusItem(const QString& type, const time::system_clock::TimePoint& value)
+ : ForwarderStatusItem(type, time::toString(value))
+ {
+ }
+
const QString&
type() const
{