Add global shortcut widget to SettingsWidget and register shortcut on startup.

This commit is contained in:
Felix Geyer 2012-07-14 19:09:28 +02:00
parent d3af39a7ae
commit 288fa732ca
6 changed files with 53 additions and 2 deletions

View file

@ -21,6 +21,7 @@
#include <QtGui/QTabWidget>
#include <QtGui/QMessageBox>
#include "autotype/AutoType.h"
#include "core/Config.h"
#include "core/Database.h"
#include "core/Group.h"
@ -52,6 +53,7 @@ DatabaseTabWidget::DatabaseTabWidget(QWidget* parent)
connect(this, SIGNAL(tabCloseRequested(int)), SLOT(closeDatabase(int)));
connect(this, SIGNAL(currentChanged(int)), SLOT(emitEntrySelectionChanged()));
connect(autoType(), SIGNAL(globalShortcutTriggered()), SLOT(performGlobalAutoType()));
}
DatabaseTabWidget::~DatabaseTabWidget()
@ -604,3 +606,8 @@ void DatabaseTabWidget::connectDatabase(Database* newDb, Database* oldDb)
connect(newDb, SIGNAL(modified()), SLOT(modified()));
newDb->setEmitModified(true);
}
void DatabaseTabWidget::performGlobalAutoType()
{
autoType()->performGlobalAutoType(m_dbList.keys());
}