comparison widgets/SpeechRecognitionUI.cpp @ 270:119d89cb65cb

speech recognition Hungarian support
author benoitrigolleau
date Fri, 27 Jun 2008 09:30:20 +0000
parents 63a485275ed6
children a9af42a93073
comparison
equal deleted inserted replaced
269:0c8385c5a22e 270:119d89cb65cb
19 connect(this, SIGNAL(stopRect()),_audioRecorder, SLOT(stopRect())); 19 connect(this, SIGNAL(stopRect()),_audioRecorder, SLOT(stopRect()));
20 20
21 _bRect = new QPushButton; 21 _bRect = new QPushButton;
22 _bPlay = new QPushButton; 22 _bPlay = new QPushButton;
23 _bSend = new QPushButton; 23 _bSend = new QPushButton;
24
25 _comboLanguage = new QComboBox;
26 _comboLanguage->addItem(QIcon(":icons/english.png"),"English");
27 _comboLanguage->addItem(QIcon(":icons/hungarian.png"),"Hungarian");
24 28
25 29
26 _bRect->setMaximumSize(24,24); 30 _bRect->setMaximumSize(24,24);
27 _bPlay->setMaximumSize(24,24); 31 _bPlay->setMaximumSize(24,24);
28 _bSend->setMaximumSize(24,24); 32 _bSend->setMaximumSize(24,24);
46 50
47 51
48 QGridLayout *layout = new QGridLayout; 52 QGridLayout *layout = new QGridLayout;
49 this->setLayout(layout); 53 this->setLayout(layout);
50 layout->addWidget(new QLabel(tr("Speech Recognition")),1,1,1,2,Qt::AlignTop); 54 layout->addWidget(new QLabel(tr("Speech Recognition")),1,1,1,2,Qt::AlignTop);
51 layout->addWidget(_bRect,2,1,1,1,Qt::AlignTop); 55
56 layout->addWidget(_comboLanguage,2,2,1,1,Qt::AlignRight);
57
58
59 layout->addWidget(_bRect,3,1,1,1,Qt::AlignTop);
52 //layout->addWidget(_bPlay,2,1,1,1,Qt::AlignTop); 60 //layout->addWidget(_bPlay,2,1,1,1,Qt::AlignTop);
53 layout->addWidget(_bSend,3,1,1,1,Qt::AlignTop); 61 layout->addWidget(_bSend,4,1,1,1,Qt::AlignTop);
54 layout->addLayout(truc,4,1,1,1,Qt::AlignTop); 62 layout->addLayout(truc,5,1,1,1,Qt::AlignTop);
55 layout->addWidget(_textEdit,2,2,3,1); 63 layout->addWidget(_textEdit,3,2,3,1);
56 64
57 65
58 //SLOTs end SIGNALs 66 //SLOTs end SIGNALs
59 67
60 connect(_bRect, SIGNAL(pressed ()), this,SLOT(rect())); 68 connect(_bRect, SIGNAL(pressed ()), this,SLOT(rect()));
92 } 100 }
93 101
94 void SpeechRecognitionUI::setResult(const QString &result){ 102 void SpeechRecognitionUI::setResult(const QString &result){
95 _textEdit->setText(result); 103 _textEdit->setText(result);
96 } 104 }
105
106 QString SpeechRecognitionUI::getLanguage(){
107 return _comboLanguage->currentText();
108 }
109