5#ifndef DREGIONMONITOR_H_DWIDGET
6#define DREGIONMONITOR_H_DWIDGET
9#include <dtkwidget_global.h>
13#if DTK_VERSION < DTK_VERSION_CHECK(6, 0, 0, 0)
15DWIDGET_BEGIN_NAMESPACE
17class DRegionMonitorPrivate;
18class D_DECL_DEPRECATED_X(
"Use libdtkgui") DRegionMonitor :
public QObject
19 ,
public DTK_CORE_NAMESPACE::DObject
22 D_DECLARE_PRIVATE(DRegionMonitor)
23 Q_DISABLE_COPY(DRegionMonitor)
24 Q_PROPERTY(CoordinateType coordinateType READ coordinateType WRITE setCoordinateType NOTIFY coordinateTypeChanged)
27 explicit DRegionMonitor(QObject *parent =
nullptr);
38 Q_ENUM(CoordinateType)
40 bool registered()
const;
41 QRegion watchedRegion()
const;
42 CoordinateType coordinateType()
const;
45 void buttonPress(
const QPoint &p,
const int flag)
const;
46 void buttonRelease(
const QPoint &p,
const int flag)
const;
47 void cursorMove(
const QPoint &p)
const;
48 void keyPress(
const QString &keyname)
const;
49 void keyRelease(
const QString &keyname)
const;
50 void coordinateTypeChanged(CoordinateType type)
const;
53 void registerRegion();
54 inline void registerRegion(
const QRegion ®ion)
56 setWatchedRegion(region);
59 void unregisterRegion();
60 void setWatchedRegion(
const QRegion ®ion);
61 void setCoordinateType(CoordinateType type);