qtmobileextensions/examples/systemtoneserviceex/ststest.cpp
changeset 11 06b8e2af4411
parent 8 71781823f776
child 19 46686fb6258c
equal deleted inserted replaced
8:71781823f776 11:06b8e2af4411
    49 sts(new XQSystemToneService())
    49 sts(new XQSystemToneService())
    50 {
    50 {
    51     callbackCleanTimer.setSingleShot(true);
    51     callbackCleanTimer.setSingleShot(true);
    52     connect(&callbackCleanTimer, SIGNAL(timeout()), this, SLOT(cleanCallback()));
    52     connect(&callbackCleanTimer, SIGNAL(timeout()), this, SLOT(cleanCallback()));
    53     
    53     
    54     QPushButton *quitButton = new QPushButton(tr("QUIT"));
    54     QPushButton *quitButton = new QPushButton("QUIT");
    55     connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
    55     connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
    56 
    56 
    57     QPushButton *playToneButton = new QPushButton(tr("Play Tone"));
    57     QPushButton *playToneButton = new QPushButton("Play Tone");
    58     connect(playToneButton, SIGNAL(clicked()), this, SLOT(playTone()));
    58     connect(playToneButton, SIGNAL(clicked()), this, SLOT(playTone()));
    59 
    59 
    60     QPushButton *playAlarmButton = new QPushButton(tr("Play Alarm"));
    60     QPushButton *playAlarmButton = new QPushButton("Play Alarm");
    61     connect(playAlarmButton, SIGNAL(clicked()), this, SLOT(playAlarm()));
    61     connect(playAlarmButton, SIGNAL(clicked()), this, SLOT(playAlarm()));
    62 
    62 
    63     QPushButton *stopAlarmButton = new QPushButton(tr("Stop Alarm"));
    63     QPushButton *stopAlarmButton = new QPushButton("Stop Alarm");
    64     connect(stopAlarmButton, SIGNAL(clicked()), this, SLOT(stopAlarm()));
    64     connect(stopAlarmButton, SIGNAL(clicked()), this, SLOT(stopAlarm()));
    65     
    65     
    66 
    66 
    67     connect(sts, SIGNAL(toneStarted()), this, SLOT(startCallback()));
    67     connect(sts, SIGNAL(toneStarted()), this, SLOT(startCallback()));
    68     connect(sts, SIGNAL(alarmStarted(unsigned int)), this, SLOT(startCallback(unsigned int)));
    68     connect(sts, SIGNAL(alarmStarted(unsigned int)), this, SLOT(startCallback(unsigned int)));