-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpqObjectNaming.h
37 lines (29 loc) · 1.13 KB
/
pqObjectNaming.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
// SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
// SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
// SPDX-License-Identifier: BSD-3-Clause
#ifndef _pqObjectNaming_h
#define _pqObjectNaming_h
#include <QString>
#include "QtTestingExport.h"
class QObject;
#if QT_VERSION < 0x060000
class QStringList;
#endif
/// Provides functionality to ensuring that Qt objects can be uniquely identified for recording and
/// playback of regression tests
class QTTESTING_EXPORT pqObjectNaming
{
public:
/// Returns a unique identifier for the given object that can be serialized for later regression
/// test playback
static const QString GetName(QObject& Object);
/// Given a unique identifier returned by GetName(), returns the corresponding object, or NULL
static QObject* GetObject(const QString& Name);
/** Dumps the widget hierarchy to a string */
static void DumpHierarchy(QStringList& results);
/** Dumps a subtree of the widget hierarchy to a string */
static void DumpHierarchy(QObject& Object, QStringList& results);
/// Recover the last error message
static QString lastErrorMessage();
};
#endif // !_pqObjectNaming_h