mirror of https://github.com/AxioDL/metaforce.git
Add support for parallel progress printing
This commit is contained in:
parent
77765679b0
commit
007ad244ee
|
@ -2,7 +2,7 @@
|
|||
#define GUI_LAUNCHMENU_HPP
|
||||
|
||||
#include <QMenu>
|
||||
namespace hecl { class CVarCommons; }
|
||||
namespace hecl { struct CVarCommons; }
|
||||
|
||||
class LaunchMenu : public QMenu
|
||||
{
|
||||
|
|
|
@ -171,6 +171,11 @@ void MainWindow::onPackage()
|
|||
m_ui->packageBtn->setEnabled(true);
|
||||
disconnect(m_ui->packageBtn, SIGNAL(clicked()), nullptr, nullptr);
|
||||
connect(m_ui->packageBtn, SIGNAL(clicked()), this, SLOT(doHECLTerminate()));
|
||||
|
||||
QSize size = QWidget::size();
|
||||
if (size.width() < 1100)
|
||||
size.setWidth(1100);
|
||||
resize(size);
|
||||
}
|
||||
|
||||
void MainWindow::onPackageFinished(int returnCode)
|
||||
|
@ -516,16 +521,17 @@ void MainWindow::setTextTermFormatting(const QString& text)
|
|||
{
|
||||
m_inContinueNote = false;
|
||||
|
||||
QRegExp const escapeSequenceExpression(R"(\x1B\[([\d;\?]+)([mlh]))");
|
||||
QRegExp const escapeSequenceExpression(R"(\x1B\[([\d;\?F]+)([mlh]?))");
|
||||
QTextCharFormat defaultTextCharFormat = m_cursor.charFormat();
|
||||
int offset = escapeSequenceExpression.indexIn(text);
|
||||
ReturnInsert(m_cursor, text.mid(0, offset));
|
||||
QTextCharFormat textCharFormat = defaultTextCharFormat;
|
||||
while (offset >= 0) {
|
||||
int previousOffset = offset + escapeSequenceExpression.matchedLength();
|
||||
if (escapeSequenceExpression.capturedTexts()[2] == "m")
|
||||
QStringList captures = escapeSequenceExpression.capturedTexts();
|
||||
if (captures.size() >= 3 && captures[2] == "m")
|
||||
{
|
||||
QStringList capturedTexts = escapeSequenceExpression.capturedTexts()[1].split(';');
|
||||
QStringList capturedTexts = captures[1].split(';');
|
||||
QListIterator<QString> i(capturedTexts);
|
||||
while (i.hasNext()) {
|
||||
bool ok = false;
|
||||
|
@ -534,6 +540,19 @@ void MainWindow::setTextTermFormatting(const QString& text)
|
|||
ParseEscapeSequence(attribute, i, textCharFormat, defaultTextCharFormat);
|
||||
}
|
||||
}
|
||||
else if (captures.size() >= 2 && captures[1].endsWith('F'))
|
||||
{
|
||||
int lineCount = captures[1].chopped(1).toInt();
|
||||
if (!lineCount)
|
||||
lineCount = 1;
|
||||
for (int i=0 ; i<lineCount ; ++i)
|
||||
{
|
||||
m_cursor.movePosition(QTextCursor::PreviousBlock);
|
||||
m_cursor.select(QTextCursor::BlockUnderCursor);
|
||||
m_cursor.removeSelectedText();
|
||||
m_cursor.insertBlock();
|
||||
}
|
||||
}
|
||||
offset = escapeSequenceExpression.indexIn(text, previousOffset);
|
||||
if (offset < 0) {
|
||||
ReturnInsert(m_cursor, text.mid(previousOffset), textCharFormat);
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
<item row="1" column="0" colspan="6">
|
||||
<widget class="QTabWidget" name="heclTabs">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="dataTab">
|
||||
<attribute name="title">
|
||||
|
@ -705,7 +705,7 @@
|
|||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;">
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Sans'; font-size:10pt; font-weight:600;">About HECL Frontend</span></p>
|
||||
<p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Sans'; font-size:10pt;"><br />The hecl frontend UI is designed and built by </span><a href="https://axiodl.com"><span style=" font-family:'Noto Sans'; font-size:10pt; text-decoration: underline; color:#007af4;">Axiomatic Data Laboratories</span></a><span style=" font-family:'Noto Sans'; font-size:10pt;"> Copyright 2018<br /><br /></span><span style=" font-family:'Noto Sans'; font-size:10pt; font-weight:600;">Authors:</span><span style=" font-family:'Noto Sans'; font-size:10pt;"><br />Phillip &quot;Antidote&quot; Stephens<br />Jack &quot;jackoalan&quot; Andersen</span></p>
|
||||
<p style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Courier New'; font-size:10pt;">The MIT License</span></p>
|
||||
|
|
Loading…
Reference in New Issue