Chris@189: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@189: Chris@189: /* Chris@189: Sonic Visualiser Chris@189: An audio file viewer and annotation editor. Chris@189: Centre for Digital Music, Queen Mary, University of London. Chris@189: This file copyright 2007 QMUL. Chris@189: Chris@189: This program is free software; you can redistribute it and/or Chris@189: modify it under the terms of the GNU General Public License as Chris@189: published by the Free Software Foundation; either version 2 of the Chris@189: License, or (at your option) any later version. See the file Chris@189: COPYING included with this distribution for more information. Chris@189: */ Chris@189: Chris@1196: #ifndef SV_NOTIFYING_COMBO_BOX_H Chris@1196: #define SV_NOTIFYING_COMBO_BOX_H Chris@189: Chris@189: #include Chris@189: Chris@189: /** Chris@189: * Very trivial enhancement to QComboBox to make it emit signals when Chris@189: * the mouse enters and leaves (for context help). Chris@189: */ Chris@189: Chris@189: class NotifyingComboBox : public QComboBox Chris@189: { Chris@189: Q_OBJECT Chris@1196: Chris@189: public: Chris@189: NotifyingComboBox(QWidget *parent = 0) : Chris@189: QComboBox(parent) { } Chris@189: Chris@189: virtual ~NotifyingComboBox(); Chris@189: Chris@189: signals: Chris@189: void mouseEntered(); Chris@189: void mouseLeft(); Chris@189: Chris@189: protected: Chris@189: virtual void enterEvent(QEvent *); Chris@189: virtual void leaveEvent(QEvent *); Chris@189: }; Chris@189: Chris@189: #endif Chris@189: