OpendTect  6.3
keyboardevent.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: Nanne Hemstra
8  Date: August 2007
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "generalmod.h"
14 #include "keyenum.h"
15 #include "geometry.h"
16 #include "notify.h"
17 
23 {
24 public:
25  KeyboardEvent();
26 
28  OD::ButtonState modifier_; //Alt/Ctrl/Shift++
29  bool isrepeat_;
30 
31  bool operator ==(const KeyboardEvent&) const;
32  bool operator !=( const KeyboardEvent& ev ) const;
33  static bool isUnDo(const KeyboardEvent&);
34  static bool isReDo(const KeyboardEvent&);
35  static bool isSave(const KeyboardEvent&);
36  static bool isSaveAs(const KeyboardEvent&);
37 };
38 
39 
45 {
46 public:
48 
49  void triggerKeyPressed(const KeyboardEvent&);
50  void triggerKeyReleased(const KeyboardEvent&);
51 
54 
55  bool hasEvent() const { return event_; }
56  const KeyboardEvent& event() const { return *event_; }
59  bool isHandled() const { return ishandled_; }
60  void setHandled( bool yn ) { ishandled_ = yn; }
61 
62 protected:
64  bool ishandled_;
65 };
bool isrepeat_
Definition: keyboardevent.h:29
#define mExpClass(module)
Definition: commondefs.h:157
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:182
bool ishandled_
Definition: keyboardevent.h:64
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:51
bool isHandled() const
Definition: keyboardevent.h:59
bool hasEvent() const
Definition: keyboardevent.h:55
Keyboard event.
Definition: keyboardevent.h:22
Notifier< KeyboardEventHandler > keyPressed
Definition: keyboardevent.h:52
ButtonState
Definition: keyenum.h:18
void setHandled(bool yn)
Definition: keyboardevent.h:60
OD::ButtonState modifier_
Definition: keyboardevent.h:28
OD::KeyboardKey key_
Definition: keyboardevent.h:27
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:60
const KeyboardEvent * event_
Definition: keyboardevent.h:63
Handles KeyboardEvent.
Definition: keyboardevent.h:44
const KeyboardEvent & event() const
Definition: keyboardevent.h:56
KeyboardKey
Definition: keyenum.h:33
Notifier< KeyboardEventHandler > keyReleased
Definition: keyboardevent.h:53

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