update dict
[QFreeRecite.git] / src / gui / PushButton.cpp
blob45b2dfcb4f077fe457d56a0412eaea71172b5a43
1 #include "PushButton.h"
2 #include "Speaker.h"
4 PushButton::PushButton(QWidget *parent)
5 : QPushButton(parent)
7 //Do Nothing;
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");