diff --git a/src/platform/qt/LogView.cpp b/src/platform/qt/LogView.cpp index a1f2308ab..7975b79b7 100644 --- a/src/platform/qt/LogView.cpp +++ b/src/platform/qt/LogView.cpp @@ -39,6 +39,18 @@ void LogView::clear() { m_lines = 0; } +void LogView::setLevels(int levels) { + m_logLevel = levels; + + m_ui.levelDebug->setCheckState(levels & GBA_LOG_DEBUG ? Qt::Checked : Qt::Unchecked); + m_ui.levelStub->setCheckState(levels & GBA_LOG_STUB ? Qt::Checked : Qt::Unchecked); + m_ui.levelInfo->setCheckState(levels & GBA_LOG_INFO ? Qt::Checked : Qt::Unchecked); + m_ui.levelWarn->setCheckState(levels & GBA_LOG_WARN ? Qt::Checked : Qt::Unchecked); + m_ui.levelError->setCheckState(levels & GBA_LOG_ERROR ? Qt::Checked : Qt::Unchecked); + m_ui.levelFatal->setCheckState(levels & GBA_LOG_FATAL ? Qt::Checked : Qt::Unchecked); + m_ui.levelGameError->setCheckState(levels & GBA_LOG_GAME_ERROR ? Qt::Checked : Qt::Unchecked); +} + void LogView::setLevelDebug(bool set) { if (set) { setLevel(GBA_LOG_DEBUG); diff --git a/src/platform/qt/LogView.h b/src/platform/qt/LogView.h index c235408a7..ad26b9d03 100644 --- a/src/platform/qt/LogView.h +++ b/src/platform/qt/LogView.h @@ -19,9 +19,9 @@ public: public slots: void postLog(int level, const QString& log); + void setLevels(int levels); void clear(); -private slots: void setLevelDebug(bool); void setLevelStub(bool); void setLevelInfo(bool);