Ocular Engine
ConsoleText.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_EDITOR_CONSOLE_TEXT__H__
19 #define __H__OCULAR_EDITOR_CONSOLE_TEXT__H__
20 
21 #include <QtWidgets/qtextedit.h>
22 #include "Logger/ILoggerListener.hpp"
23 
24 //------------------------------------------------------------------------------------------
25 
30 namespace Ocular
31 {
36  namespace Editor
37  {
42  class ConsoleText : public QTextEdit, public Core::ILoggerListener
43  {
44  public:
45 
46  ConsoleText(QWidget* parent = nullptr);
47  ~ConsoleText();
48 
49  virtual QSize sizeHint() const override;
50  virtual void onLogMessage(Core::LoggerMessage const& message) override;
51 
52  void write(std::string const& message);
53  void writeWarning(std::string const& message);
54  void writeError(std::string const& message);
55 
56  protected:
57 
58  private:
59 
60  };
61  }
65 }
70 //------------------------------------------------------------------------------------------
71 
72 #endif
Definition: LoggerChannels.hpp:52
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: ConsoleText.hpp:42
Definition: ILoggerListener.hpp:42