-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpqAbstractItemViewEventPlayerBase.h
41 lines (32 loc) · 1.44 KB
/
pqAbstractItemViewEventPlayerBase.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
// SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
// SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
// SPDX-License-Identifier: BSD-3-Clause
#ifndef __pqAbstractItemViewEventPlayerBase_h
#define __pqAbstractItemViewEventPlayerBase_h
#include "pqWidgetEventPlayer.h"
#include <QModelIndex>
class QAbstractItemView;
/// pqAbstractItemViewEventPlayerBase is a player for QAbstractItemViewWidget. Plays back the state
/// recorded using pQAbstractItemViewEventTranslatorBase.
class QTTESTING_EXPORT pqAbstractItemViewEventPlayerBase : public pqWidgetEventPlayer
{
Q_OBJECT
typedef pqWidgetEventPlayer Superclass;
public:
pqAbstractItemViewEventPlayerBase(QObject* parent = 0);
~pqAbstractItemViewEventPlayerBase() override = 0;
/// Play an event on a QAbstractViewItem
using Superclass::playEvent;
bool playEvent(QObject* object, const QString& command, const QString& arguments, int eventType,
bool& error) override;
protected:
/// Get index using a previously recorded string
static QModelIndex GetIndex(
const QString& str_index, QAbstractItemView* abstractItemView, bool& error);
/// Get data string using a previously recorded string
static QString GetDataString(const QString& str_index, bool& error);
private:
pqAbstractItemViewEventPlayerBase(const pqAbstractItemViewEventPlayerBase&); // Not implemented.
void operator=(const pqAbstractItemViewEventPlayerBase&); // Not implemented.
};
#endif