| 1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
| 2 | // |
| 3 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 4 | |
| 5 | #ifndef DEBUGGERGLOBALS_H |
| 6 | #define DEBUGGERGLOBALS_H |
| 7 | |
| 8 | #include <common/util/singleton.h> |
| 9 | #include <QColor> |
| 10 | #include <QtConcurrent> |
| 11 | |
| 12 | /* |
| 13 | * Redefine global instance |
| 14 | */ |
| 15 | #define debuggerSignals Singleton<DebuggerSignals>::instance() |
| 16 | #define eventSender Singleton<EventSender>::instance() |
| 17 | #define eventReceiver Singleton<EventReceiver>::instance() |
| 18 | #define debugManager Singleton<DebugManager>::instance() |
| 19 | #define debugService Singleton<DebugService>::instance() |
| 20 | |
| 21 | // Do some test when valued 1 |
| 22 | #define DBG_TEST 1 |
| 23 | #define DEBUG_NAMESPACE DEBUG |
| 24 | |
| 25 | /** |
| 26 | * @brief Output text color. |
| 27 | */ |
| 28 | const QColor kTextColorNormal(150, 150, 150); |
| 29 | const QColor kErrorMessageTextColor(255, 108, 108); |
| 30 | const QColor kMessageOutput(0, 135, 135); |
| 31 | |
| 32 | #define AsynInvoke(Fun) \ |
| 33 | QtConcurrent::run([this]() { \ |
| 34 | Fun; \ |
| 35 | }); |
| 36 | |
| 37 | #endif // DEBUGGERGLOBALS_H |
| 38 | |