-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpqCommentEventPlayer.cxx
44 lines (36 loc) · 1.08 KB
/
pqCommentEventPlayer.cxx
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
// SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
// SPDX-License-Identifier: BSD-3-Clause
#include "pqCommentEventPlayer.h"
#include <QtGlobal>
// ----------------------------------------------------------------------------
pqCommentEventPlayer::pqCommentEventPlayer(pqTestUtility* testUtility, QObject* parent)
: pqWidgetEventPlayer(parent)
{
this->TestUtility = testUtility;
}
// ----------------------------------------------------------------------------
pqCommentEventPlayer::~pqCommentEventPlayer()
{
this->TestUtility = 0;
}
// ----------------------------------------------------------------------------
bool pqCommentEventPlayer::playEvent(
QObject* Object, const QString& Command, const QString& Arguments, bool& Error)
{
Q_UNUSED(Object);
Q_UNUSED(Error);
if (!Command.startsWith("comment"))
{
return false;
}
if (!Arguments.isEmpty())
{
Q_EMIT this->comment(Arguments);
}
if (Command.split("-").contains("block"))
{
this->TestUtility->dispatcher()->run(false);
}
return true;
}