/*
* Copyright (C) 2010 Ixonos Plc.
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
* This file is part of ConfClerk.
*
*/
#include "searchhead.h"
+#include <QShortcut>
SearchHead::SearchHead(QWidget *parent)
: QWidget(parent)
{
setupUi(this);
+ QShortcut* shortcutEnter = new QShortcut(QKeySequence(Qt::Key_Enter), this, 0, 0, Qt::WidgetWithChildrenShortcut);
+ connect(shortcutEnter, SIGNAL(activated()), this, SLOT(searchButtonClicked()));
+ QShortcut* shortcutReturn = new QShortcut(QKeySequence(Qt::Key_Return), this, 0, 0, Qt::WidgetWithChildrenShortcut);
+ connect(shortcutReturn, SIGNAL(activated()), this, SLOT(searchButtonClicked()));
connect( searchButton, SIGNAL(clicked()), SLOT(searchButtonClicked()));
}
void SearchHead::searchButtonClicked()
{
- qDebug() << "SearchHead::searchButtonClicked()";
emit( searchClicked() );
}