annotate widgets/NotifyingToolButton.cpp @ 1526:0f1601d870db

Rework PaneStack so that the options that generally aren't (or can't be) changed after construction are supplied to the constructor instead of being set through setter methods. This is a more sensible way of doing things in general, but also a workaround for https://code.soundsoftware.ac.uk/issues/1930, a problem that arises when reinitialising hidden property boxes in a context in which they will never be visible at all.
author Chris Cannam
date Fri, 04 Oct 2019 13:51:24 +0100
parents 9907be1c4f89
children
rev   line source
Chris@1188 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@1188 2
Chris@1188 3 /*
Chris@1188 4 Sonic Visualiser
Chris@1188 5 An audio file viewer and annotation editor.
Chris@1188 6 Centre for Digital Music, Queen Mary, University of London.
Chris@1188 7 This file copyright 2007 QMUL.
Chris@1188 8
Chris@1188 9 This program is free software; you can redistribute it and/or
Chris@1188 10 modify it under the terms of the GNU General Public License as
Chris@1188 11 published by the Free Software Foundation; either version 2 of the
Chris@1188 12 License, or (at your option) any later version. See the file
Chris@1188 13 COPYING included with this distribution for more information.
Chris@1188 14 */
Chris@1188 15
Chris@1188 16 #include "NotifyingToolButton.h"
Chris@1188 17
Chris@1188 18 NotifyingToolButton::~NotifyingToolButton()
Chris@1188 19 {
Chris@1188 20 }
Chris@1188 21
Chris@1188 22 void
Chris@1188 23 NotifyingToolButton::enterEvent(QEvent *e)
Chris@1188 24 {
Chris@1188 25 QToolButton::enterEvent(e);
Chris@1188 26 emit mouseEntered();
Chris@1188 27 }
Chris@1188 28
Chris@1188 29 void
Chris@1188 30 NotifyingToolButton::leaveEvent(QEvent *e)
Chris@1188 31 {
Chris@1188 32 QToolButton::enterEvent(e);
Chris@1188 33 emit mouseLeft();
Chris@1188 34 }
Chris@1188 35