libyui  3.3.1
YKeyEvent Class Reference
Inheritance diagram for YKeyEvent:
Collaboration diagram for YKeyEvent:

Public Member Functions

 YKeyEvent (const std::string &keySymbol, YWidget *focusWidget=0)
 Constructor. More...
 
std::string keySymbol () const
 Returns the key symbol - a text describing the key, such as "CursorLeft", "F1", "a", "A", etc.
 
YWidgetfocusWidget () const
 Returns the widget that currently has the keyboard focus. More...
 
- Public Member Functions inherited from YEvent
 YEvent (EventType eventType=UnknownEvent)
 Constructor.
 
EventType eventType () const
 Returns the event type.
 
unsigned long serial () const
 Returns the unique serial no. More...
 
virtual YWidgetwidget () const
 Returns the widget that caused this event or 0 if there is none. More...
 
virtual YItemitem () const
 Return the YItem that corresponds to this event or 0 if there is none. More...
 
YDialogdialog () const
 Return the dialog this event belongs to or 0 if no dialog was set yet.
 
bool isValid () const
 Check if this event is valid. More...
 

Protected Member Functions

virtual ~YKeyEvent ()
 Protected destructor - events can only be deleted via YDialog::deleteEvent(). More...
 
- Protected Member Functions inherited from YEvent
void setDialog (YDialog *dia)
 Set the dialog this event belongs to.
 
virtual ~YEvent ()
 Protected destructor - events can only be deleted via YDialog::deleteEvent(). More...
 
void invalidate ()
 Mark this event as invalid. More...
 

Protected Attributes

std::string _keySymbol
 
YWidget_focusWidget
 

Additional Inherited Members

- Public Types inherited from YEvent
enum  EventType {
  NoEvent = 0, UnknownEvent, WidgetEvent, MenuEvent,
  KeyEvent, CancelEvent, TimeoutEvent, DebugEvent,
  InvalidEvent = 0x4242
}
 
enum  EventReason {
  UnknownReason = 0, Activated, SelectionChanged, ValueChanged,
  ContextMenuActivated
}
 
- Static Public Member Functions inherited from YEvent
static const char * toString (EventType eventType)
 Returns the character representation of an event type.
 
static const char * toString (EventReason reason)
 Returns the character representation of an event reason.
 

Detailed Description

Definition at line 206 of file YEvent.h.

Constructor & Destructor Documentation

◆ YKeyEvent()

YKeyEvent::YKeyEvent ( const std::string &  keySymbol,
YWidget focusWidget = 0 
)

Constructor.

Create a key event with a specified key symbol (a text describing the key, such as "CursorLeft", "F1", etc.) and optionally the widget that currently has the keyboard focus.

Definition at line 123 of file YEvent.cc.

Here is the call graph for this function:

◆ ~YKeyEvent()

virtual YKeyEvent::~YKeyEvent ( )
inlineprotectedvirtual

Protected destructor - events can only be deleted via YDialog::deleteEvent().

The associated dialog will take care of this event and delete it when appropriate.

Definition at line 241 of file YEvent.h.

Member Function Documentation

◆ focusWidget()

YWidget* YKeyEvent::focusWidget ( ) const
inline

Returns the widget that currently has the keyboard focus.

This might be 0 if no widget has the focus or if the creator of this event could not obtain that information.

Definition at line 232 of file YEvent.h.


The documentation for this class was generated from the following files: