QGIS API Documentation  3.4.15-Madeira (e83d02e274)
qgsfocuswatcher.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsfocuswatcher.h
3  -----------------
4  Date : April 2016
5  Copyright : (C) 2016 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 QGSFOCUSWATCHER_H
17 #define QGSFOCUSWATCHER_H
18 
19 #include <QObject>
20 #include "qgis.h"
21 #include "qgis_gui.h"
22 
33 class GUI_EXPORT QgsFocusWatcher : public QObject
34 {
35  Q_OBJECT
36 
37  public:
38 
44  explicit QgsFocusWatcher( QObject *parent SIP_TRANSFERTHIS );
45 
46  bool eventFilter( QObject *obj, QEvent *event ) override;
47 
48  signals:
49 
54  void focusChanged( bool focused );
55 
57  void focusIn();
58 
60  void focusOut();
61 
62 };
63 
64 #endif //QGSFOCUSWATCHER_H
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:46
A event filter for watching for focus events on a parent object.