summaryrefslogtreecommitdiffstats
path: root/api/logic/launch/steps/TextPrint.cpp
blob: 0c1f320c3d5719e742d8e486c0d4adfd07a9e58d (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;
}