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()));
10 setFont(QFont("WenQuanYi",16,12,true));
13 void PushButton::enterEvent(QEvent
*event
) {
14 Speaker::play("buttonactive");
15 QPushButton::enterEvent(event
);
18 void PushButton::pressSound() const{
19 if(objectName() != "pronounceButton")
20 Speaker::play("buttondown");
23 void PushButton::releaseSound() const{
24 if(objectName() != "pronounceButton")
25 Speaker::play("buttonup");