-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpqPythonEventSource.h
46 lines (36 loc) · 1.26 KB
/
pqPythonEventSource.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
// SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
// SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
// SPDX-License-Identifier: BSD-3-Clause
#ifndef _pqPythonEventSource_h
#define _pqPythonEventSource_h
#include "pqThreadedEventSource.h"
#include <QString>
/** Concrete implementation of pqEventSource that retrieves events recorded
by pqPythonEventObserver */
class QTTESTING_EXPORT pqPythonEventSource : public pqThreadedEventSource
{
Q_OBJECT
public:
pqPythonEventSource(QObject* p = 0);
~pqPythonEventSource();
void setContent(const QString& path);
static QString getProperty(QString& object, QString& prop);
static void setProperty(QString& object, QString& prop, const QString& value);
static QStringList getChildren(QString& object);
static QString invokeMethod(QString& object, QString& method);
protected:
virtual void run();
virtual void start();
protected Q_SLOTS:
void threadGetProperty();
void threadSetProperty();
void threadGetChildren();
void threadInvokeMethod();
private:
class pqInternal;
pqInternal* Internal;
/// method called to initialize Python. This can be called several times. It
/// will init Python only if it hasn't been already.
void initPythonIfNeeded();
};
#endif // !_pqPythonEventSource_h