NOISSUE Flatten gui and logic libraries into MultiMC
This commit is contained in:
29
launcher/launch/steps/TextPrint.cpp
Normal file
29
launcher/launch/steps/TextPrint.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
#include "TextPrint.h"
|
||||
|
||||
TextPrint::TextPrint(LaunchTask * parent, const QStringList &lines, MessageLevel::Enum level) : LaunchStep(parent)
|
||||
{
|
||||
m_lines = lines;
|
||||
m_level = level;
|
||||
}
|
||||
TextPrint::TextPrint(LaunchTask *parent, const QString &line, MessageLevel::Enum level) : LaunchStep(parent)
|
||||
{
|
||||
m_lines.append(line);
|
||||
m_level = level;
|
||||
}
|
||||
|
||||
void TextPrint::executeTask()
|
||||
{
|
||||
emit logLines(m_lines, m_level);
|
||||
emitSucceeded();
|
||||
}
|
||||
|
||||
bool TextPrint::canAbort() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TextPrint::abort()
|
||||
{
|
||||
emitFailed("Aborted.");
|
||||
return true;
|
||||
}
|
Reference in New Issue
Block a user