kwave  18.07.70
Kwave::ShortcutWrapper Class Reference

#include <ShortcutWrapper.h>

Inheritance diagram for Kwave::ShortcutWrapper:
Inheritance graph
Collaboration diagram for Kwave::ShortcutWrapper:
Collaboration graph

Signals

void activated (int id)
 

Public Member Functions

 ShortcutWrapper (QWidget *parent, const QKeySequence &key, int id)
 
virtual ~ShortcutWrapper ()
 

Private Slots

void triggered ()
 

Private Attributes

int m_id
 

Detailed Description

Definition at line 34 of file ShortcutWrapper.h.

Constructor & Destructor Documentation

◆ ShortcutWrapper()

Kwave::ShortcutWrapper::ShortcutWrapper ( QWidget *  parent,
const QKeySequence &  key,
int  id 
)

Constructor

Parameters
parenta parent widget
keya keyboard shortcuts sequence
idnumeric id that gets emitted

Definition at line 26 of file ShortcutWrapper.cpp.

References activated(), Kwave::connect(), and triggered().

29  :QShortcut(key, parent), m_id(id)
30 {
31  connect(this, SIGNAL(activated()),
32  this, SLOT(triggered()));
33 }
bool connect(Kwave::StreamObject &source, const char *output, Kwave::StreamObject &sink, const char *input)
Definition: Connect.cpp:48
void activated(int id)
Here is the call graph for this function:

◆ ~ShortcutWrapper()

Kwave::ShortcutWrapper::~ShortcutWrapper ( )
virtual

Destructor

Definition at line 36 of file ShortcutWrapper.cpp.

37 {
38 }

Member Function Documentation

◆ activated

void Kwave::ShortcutWrapper::activated ( int  id)
signal

emitted when the shortcut is activated

Parameters
idthe numeric id passed in the constructor

Referenced by ShortcutWrapper(), and triggered().

Here is the caller graph for this function:

◆ triggered

void Kwave::ShortcutWrapper::triggered ( )
privateslot

internally connected to the signal QShortcut::activated()

Definition at line 41 of file ShortcutWrapper.cpp.

References activated(), and m_id.

Referenced by ShortcutWrapper().

42 {
43  emit activated(m_id);
44 }
void activated(int id)
Here is the caller graph for this function:

Member Data Documentation

◆ m_id

int Kwave::ShortcutWrapper::m_id
private

numeric id for the activated() signal

Definition at line 64 of file ShortcutWrapper.h.

Referenced by triggered().


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