QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
qgsabstractinputcontroller.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsabstractinputcontroller.h
3 ---------------------
4 begin : March 2023
5 copyright : (C) 2023 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSABSTRACTINPUTCONTROLLER_H
17#define QGSABSTRACTINPUTCONTROLLER_H
18
19#include "qgis_gui.h"
20#include "qgis_sip.h"
21#include "qgis.h"
22
23#include <QObject>
24
32class GUI_EXPORT QgsAbstractInputController : public QObject
33{
34#ifdef SIP_RUN
35#include "qgs2dmapcontroller.h"
36#include "qgs3dmapcontroller.h"
37#endif
38
39#ifdef SIP_RUN
41 if ( qobject_cast< QgsAbstract2DMapController * >( sipCpp ) )
42 sipType = sipType_QgsAbstract2DMapController;
43 else if ( qobject_cast< QgsAbstract3DMapController * >( sipCpp ) )
44 sipType = sipType_QgsAbstract3DMapController;
45 else
46 sipType = nullptr;
48#endif
49
50 Q_OBJECT
51
52 public:
53
57 QgsAbstractInputController( QObject *parent SIP_TRANSFERTHIS = nullptr );
58
63
67 virtual QString deviceId() const = 0;
68
72 virtual Qgis::InputControllerType type() const = 0;
73
74};
75
76
77#endif // QGSABSTRACTINPUTCONTROLLER_H
InputControllerType
Input controller types.
Definition: qgis.h:4307
Abstract base class for all input controllers.
virtual QgsAbstractInputController * clone() const =0
Returns a new copy of the controller.
virtual QString deviceId() const =0
Returns a string uniquely identifying the device.
virtual Qgis::InputControllerType type() const =0
Returns the input controller type.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition: qgis_sip.h:191
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53
#define SIP_FACTORY
Definition: qgis_sip.h:76
#define SIP_END
Definition: qgis_sip.h:208