X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=src%2Fvogleditor%2Fvogleditor_output.h;fp=src%2Fvogleditor%2Fvogleditor_output.h;h=bbeec1c5425b7be8163ca0fcf5cb50caf2a9a5e7;hb=dfeddddb1c5b2e4973bc9160dd6f8f8657b76b8b;hp=0000000000000000000000000000000000000000;hpb=6b82ad0021cc8f833b47f346b089088d09de4a9a;p=vogl diff --git a/src/vogleditor/vogleditor_output.h b/src/vogleditor/vogleditor_output.h new file mode 100644 index 0000000..bbeec1c --- /dev/null +++ b/src/vogleditor/vogleditor_output.h @@ -0,0 +1,30 @@ +#ifndef VOGLEDITOR_OUTPUT_H +#define VOGLEDITOR_OUTPUT_H + +class QTextEdit; + +class vogleditor_output +{ +public: + vogleditor_output(); + ~vogleditor_output(); + + void init(QTextEdit* pTextEdit) { m_pTextEdit = pTextEdit; } + + void message(const char* pMessage); + void warning(const char* pWarning); + void error(const char* pError); + +private: + QTextEdit* m_pTextEdit; +}; + +static vogleditor_output gs_OUTPUT; + +static void vogleditor_output_init(QTextEdit* pTextEdit) { gs_OUTPUT.init(pTextEdit); } +static void vogleditor_output_message(const char* pMessage) { gs_OUTPUT.message(pMessage); } +static void vogleditor_output_warning(const char* pWarning) { gs_OUTPUT.warning(pWarning); } +static void vogleditor_output_error(const char* pError) { gs_OUTPUT.error(pError); } +static void vogleditor_output_deinit() { gs_OUTPUT.init(0); } + +#endif // VOGLEDITOR_OUTPUT_H