Mercurial > public > ostc_companion
comparison Utils/LogEvent.cpp @ 1:0b3630a29ad8
Initial version based on previous repository.
Project was ported to QT6 and in now cmake based.
| author | Ideenmodellierer <tiefenrauscher@web.de> |
|---|---|
| date | Thu, 27 Nov 2025 18:40:28 +0100 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 0:76ccd6ce50c0 | 1:0b3630a29ad8 |
|---|---|
| 1 ///////////////////////////////////////////////////////////////////////////// | |
| 2 /// \file LogEvent.cpp | |
| 3 /// \brief User event to pass async messages to the console widget. | |
| 4 /// \author JD Gascuel. | |
| 5 /// \copyright (c) 2015 JD Gascuel. All rights reserved. | |
| 6 /// $Id$ | |
| 7 /////////////////////////////////////////////////////////////////////////////// | |
| 8 | |
| 9 #include "LogEvent.h" | |
| 10 #include <QEvent> | |
| 11 | |
| 12 ////////////////////////////////////////////////////////////////////////////// | |
| 13 | |
| 14 QEvent::Type LogEvent::_logEventType = QEvent::None; | |
| 15 | |
| 16 ////////////////////////////////////////////////////////////////////////////// | |
| 17 | |
| 18 LogEvent::LogEvent(const QString& message) | |
| 19 : QEvent(_logEventType), | |
| 20 _message(message) | |
| 21 { | |
| 22 } | |
| 23 | |
| 24 ////////////////////////////////////////////////////////////////////////////// | |
| 25 | |
| 26 LogEvent* LogEvent::make(const QString& message) | |
| 27 { | |
| 28 if( _logEventType == QEvent::None ) | |
| 29 _logEventType = (QEvent::Type) QEvent::registerEventType(); | |
| 30 return new LogEvent(message); | |
| 31 } |
