summaryrefslogtreecommitdiffstats
path: root/api/logic/launch/steps/TextPrint.cpp
blob: f307b1fdee4ef870d08588c999e22512be197ae3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;
}