#ifndef LogViewer_h
#define LogViewer_h

#include "LogAard.h"
class QPlainTextEdit;

// This class hooks the LibAard log mechanism into a QTextEdit where
// it dumps the formatted log of all I/O transactions with the AardRemote.
//
class LogViewer : public LogAard {
public:

   LogViewer(QPlainTextEdit * init_edit);

   virtual void
   LogRead(ssize_t rval, const void * buf, size_t count);

   virtual void
   LogWrite(ssize_t rval, const void * buf, size_t count);

private:

   void
   LogIO(char prfx, ssize_t rval, const void * buf, size_t count);

   QPlainTextEdit * edit;
};

#endif // LogViewer_h
