1 #include "PushButton.h"
4 PushButton::PushButton(QWidget
*parent
)
8 connect(this,SIGNAL(pressed()),this,SLOT(pressSound()));
9 connect(this,SIGNAL(released()),this,SLOT(pressSound()));
12 void PushButton::enterEvent(QEvent
*event
) {
13 Speaker::play("buttonactive");
14 QPushButton::enterEvent(event
);
17 void PushButton::pressSound() const{
18 if(objectName() != "pronounceButton")
19 Speaker::play("buttondown");
22 void PushButton::releaseSound() const{
23 if(objectName() != "pronounceButton")
24 Speaker::play("buttonup");