Toolbox.cc 477 Bytes
Newer Older
Jan Möbius's avatar
Jan Möbius committed
1
2
3
4
5
6
7
#include "Toolbox.hh"
#include <QtGui>
#include <iostream>

DatacontrolToolboxWidget::DatacontrolToolboxWidget(QWidget* _parent)
    : QWidget(_parent)
{
8
  setupUi(this);
Jan Möbius's avatar
Jan Möbius committed
9
10
11
12
}


void DatacontrolToolboxWidget::keyPressEvent (QKeyEvent * _event ) {
13
14
15
  // Only react on our own key events
  if ( ( (_event->modifiers() & Qt::ControlModifier) && ( _event->key() == Qt::Key_A ) ) ||
     ( _event->key() == Qt::Key_Delete ) )
16
    emit keyEvent( _event );
17
18
  else
    _event->ignore();
Jan Möbius's avatar
Jan Möbius committed
19
}