-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathpqNativeFileDialogEventTranslator.h
45 lines (32 loc) · 1.16 KB
/
pqNativeFileDialogEventTranslator.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
// SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
// SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
// SPDX-License-Identifier: BSD-3-Clause
#ifndef _pqNativeFileDialogEventTranslator_h
#define _pqNativeFileDialogEventTranslator_h
#include "pqWidgetEventTranslator.h"
#include <QMouseEvent>
class pqTestUtility;
/**
Records usage of native file dialogs in test cases.
\sa pqEventTranslator
*/
class QTTESTING_EXPORT pqNativeFileDialogEventTranslator : public pqWidgetEventTranslator
{
Q_OBJECT
typedef pqWidgetEventTranslator Superclass;
public:
pqNativeFileDialogEventTranslator(pqTestUtility* util, QObject* p = 0);
~pqNativeFileDialogEventTranslator() override;
using Superclass::translateEvent;
bool translateEvent(QObject* Object, QEvent* Event, bool& Error) override;
void record(const QString& command, const QString& args);
protected Q_SLOTS:
void start();
void stop();
protected:
pqTestUtility* mUtil;
private:
pqNativeFileDialogEventTranslator(const pqNativeFileDialogEventTranslator&);
pqNativeFileDialogEventTranslator& operator=(const pqNativeFileDialogEventTranslator&);
};
#endif // !_pqNativeFileDialogEventTranslator_h