diff options
Diffstat (limited to 'yakuake/src/terminal_focus_watcher.cpp')
-rw-r--r-- | yakuake/src/terminal_focus_watcher.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/yakuake/src/terminal_focus_watcher.cpp b/yakuake/src/terminal_focus_watcher.cpp new file mode 100644 index 0000000..30cba55 --- /dev/null +++ b/yakuake/src/terminal_focus_watcher.cpp @@ -0,0 +1,32 @@ +/* + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. +*/ + +/* + Copyright (C) 2007 Eike Hein <hein@kde.org> +*/ + + +#include "terminal_focus_watcher.h" +#include "terminal_focus_watcher.moc" + + +TerminalFocusWatcher::TerminalFocusWatcher(QObject* parent, const char* name) + : QObject(parent, name) +{ +} + +TerminalFocusWatcher::~TerminalFocusWatcher() +{ +} + +bool TerminalFocusWatcher::eventFilter (QObject* /* watched */, QEvent* e) +{ + if (e->type() == QEvent::FocusIn) + emit focusChanged(); + + return false; +} |