-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpqEventComment.h
47 lines (35 loc) · 1.36 KB
/
pqEventComment.h
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
45
46
47
// SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
// SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
// SPDX-License-Identifier: BSD-3-Clause
#ifndef __pqEventComment_h
#define __pqEventComment_h
// Qt includes
#include <QObject>
// QtTesting inlcudes
#include "QtTestingExport.h"
#include "pqTestUtility.h"
/// pqEventComment is responsible for adding any kind of events that are not added
/// by widgets.
/// For exemple, you can add an event to block the playback, to show a custom
/// comment etc ...
class QTTESTING_EXPORT pqEventComment : public QObject
{
Q_OBJECT
typedef QObject Superclass;
public:
pqEventComment(pqTestUtility* util, QObject* parent = 0);
~pqEventComment() override;
/// Call this function to add an event comment, which will display a message,
/// during the playback in the log.
void recordComment(const QString& arguments);
/// Call this function to add an event comment, which will display a message,
/// and then pause the macro during the playback.
void recordCommentBlock(const QString& arguments);
Q_SIGNALS:
/// All functions should emit this signal whenever they wish to record comment event
void recordComment(QObject* widget, const QString& type, const QString& argument);
protected:
void recordComment(const QString& command, const QString& arguments, QObject* = 0);
pqTestUtility* TestUtility;
};
#endif