Add Setting and Status
[QFreeRecite.git] / src / gui / PushButton.cpp
blob27487767885b62bc7b298b7ac6fa2e3e0046326f
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()));
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");