-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpqAbstractButtonEventTranslator.h
43 lines (30 loc) · 1.14 KB
/
pqAbstractButtonEventTranslator.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
// SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
// SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
// SPDX-License-Identifier: BSD-3-Clause
#ifndef _pqAbstractButtonEventTranslator_h
#define _pqAbstractButtonEventTranslator_h
// Qt includes
#include <QMouseEvent>
#include "pqWidgetEventTranslator.h"
class QAbstractButton;
/**
Translates low-level Qt events into high-level ParaView events that can be recorded as test cases.
\sa pqEventTranslator
*/
class QTTESTING_EXPORT pqAbstractButtonEventTranslator : public pqWidgetEventTranslator
{
Q_OBJECT
typedef pqWidgetEventTranslator Superclass;
public:
pqAbstractButtonEventTranslator(QObject* p = 0);
using Superclass::translateEvent;
bool translateEvent(QObject* Object, QEvent* Event, bool& Error) override;
protected:
virtual void onActivate(QAbstractButton*);
virtual bool hasMenu(QAbstractButton* actualObject) const;
QEvent::Type LastMouseEventType;
private:
pqAbstractButtonEventTranslator(const pqAbstractButtonEventTranslator&);
pqAbstractButtonEventTranslator& operator=(const pqAbstractButtonEventTranslator&);
};
#endif // !_pqAbstractButtonEventTranslator_h