Skip to content

Commit

Permalink
[fix] log classify and font style.
Browse files Browse the repository at this point in the history
  • Loading branch information
legobadman committed Oct 13, 2023
1 parent 58ffd45 commit 944474a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/zenoedit/res/stylesheet/qlineedit.qss
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ QPlainTextEdit[cssClass="logpanel"]
color: #A3B1C0;
background-color: rgb(24,29,33);
border: 1px solid rgb(18,20,22);
font-weight: 500;
font-family:'Arial' 9pt;
}

QLineEdit[cssClass = "blackboard_title"]
Expand Down
26 changes: 25 additions & 1 deletion ui/zenoedit/zenoapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,31 @@ ZenoApplication::~ZenoApplication()

void ZenoApplication::onOptixlogReady(const QString& msg)
{
qDebug() << msg;
if (msg.startsWith("["))
{
QMessageLogger logger("zeno", 0, 0);
QChar tip = msg.at(1);

auto& mgr = GraphsManagment::instance();
if (tip == 'T') {
mgr.appendLog(QtDebugMsg, "zeno", 0, msg);
}
else if (tip == 'D') {
mgr.appendLog(QtDebugMsg, "zeno", 0, msg);
}
else if (tip == 'I') {
mgr.appendLog(QtInfoMsg, "zeno", 0, msg);
}
else if (tip == 'C') {
mgr.appendLog(QtCriticalMsg, "zeno", 0, msg);
}
else if (tip == 'W') {
mgr.appendLog(QtWarningMsg, "zeno", 0, msg);
}
else if (tip == 'E') {
mgr.appendLog(QtFatalMsg, "zeno", 0, msg);
}
}
}

QString ZenoApplication::readQss(const QString& qssPath)
Expand Down

0 comments on commit 944474a

Please sign in to comment.