OpendTect-6_4  6.4
keyboardevent.h
Go to the documentation of this file.
1 #ifndef keyboardevent_h
2 #define keyboardevent_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Nanne Hemstra
9  Date: August 2007
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "generalmod.h"
16 #include "keyenum.h"
17 #include "geometry.h"
18 
24 {
25 public:
26  KeyboardEvent();
27 
29  OD::ButtonState modifier_; //Alt/Ctrl/Shift++
30  bool isrepeat_;
31 
32  bool operator ==(const KeyboardEvent&) const;
33  bool operator !=( const KeyboardEvent& ev ) const;
34  static bool isUnDo(const KeyboardEvent&);
35  static bool isReDo(const KeyboardEvent&);
36  static bool isSave(const KeyboardEvent&);
37  static bool isSaveAs(const KeyboardEvent&);
38  static bool isSelectAll(const KeyboardEvent&);
39 
40 };
41 
42 
48 {
49 public:
51 
52  void triggerKeyPressed(const KeyboardEvent&);
53  void triggerKeyReleased(const KeyboardEvent&);
54 
57 
58  bool hasEvent() const { return event_; }
59  const KeyboardEvent& event() const { return *event_; }
62  bool isHandled() const { return ishandled_; }
63  void setHandled( bool yn ) { ishandled_ = yn; }
64 
65 protected:
67  bool ishandled_;
68 };
69 
70 
71 #endif
bool isrepeat_
Definition: keyboardevent.h:30
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
bool ishandled_
Definition: keyboardevent.h:67
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
bool isHandled() const
Definition: keyboardevent.h:62
bool hasEvent() const
Definition: keyboardevent.h:58
Keyboard event.
Definition: keyboardevent.h:23
Notifier< KeyboardEventHandler > keyPressed
Definition: keyboardevent.h:55
ButtonState
Definition: keyenum.h:20
void setHandled(bool yn)
Definition: keyboardevent.h:63
OD::ButtonState modifier_
Definition: keyboardevent.h:29
OD::KeyboardKey key_
Definition: keyboardevent.h:28
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:62
const KeyboardEvent * event_
Definition: keyboardevent.h:66
Handles KeyboardEvent.
Definition: keyboardevent.h:47
const KeyboardEvent & event() const
Definition: keyboardevent.h:59
KeyboardKey
Definition: keyenum.h:35
Notifier< KeyboardEventHandler > keyReleased
Definition: keyboardevent.h:56

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019