summaryrefslogtreecommitdiffstats
path: root/api/logic/launch/steps/TextPrint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'api/logic/launch/steps/TextPrint.cpp')
-rw-r--r--api/logic/launch/steps/TextPrint.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/api/logic/launch/steps/TextPrint.cpp b/api/logic/launch/steps/TextPrint.cpp
new file mode 100644
index 00000000..f307b1fd
--- /dev/null
+++ b/api/logic/launch/steps/TextPrint.cpp
@@ -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;
+}