#ifndef EVENT_LOG_H
#define EVENT_LOG_H


#include <string>
#include <vector>
#include <QVariant>
#include "GenericTable.h"


class EventLogItem
{
public:
  QVariant value(int a_column) const;
  void setValue(int a_column, const QVariant& a_value) { /* not editable */ }

  std::string   m_dateTime;
  std::string   m_location;
  std::string   m_message;
};


class EventLog : public GenericTable<EventLogItem>
{
public:
  EventLog() : GenericTable<EventLogItem>(true, "Time", QVariant::DateTime, "Location", QVariant::String, "Message", QVariant::String, nullptr) {}

  void LogMessage(const char* a_location, const char* a_message);
  void LogError(const char* a_location, const char* a_error);
};


#endif // EVENT_LOG_H
