}
void SearchBarWidget::checkFocus(){
- qDebug()<<"focus:"<<QApplication::focusWidget();
if(focusWidget()!=QApplication::focusWidget())
emit focusOff();
}
QString tempString;
if(!preferedCompliter.isEmpty()){
int index = completerActualList.indexOf(preferedCompliter);
- qDebug()<<"index"<<index<<"size"<<completerActualList.size()<<"+1";
if(index!=-1 && completerActualList.size()>index+1){
preferedCompliter = completerActualList.at(index+1);
tempString=preferedCompliter;
QIcon SearchBarWidget::generateIcon(QIcon original, qreal rotation) {
- qDebug()<<"test2";
QPixmap p = original.pixmap(64);
if(rotation != 0) {
void SearchBarWidget::setFocus() {
#ifndef Q_WS_MAEMO_5
- view->setFocus();
+ view->setFocus();
+ emit focusOff();
#else
- searchWordLineEdit->setFocus();
+ searchWordLineEdit->setFocus();
#endif
}
void SearchBarWidget::initializeUI() {
- qDebug()<<"test4";
#ifdef Q_WS_MAEMO_5
setMaximumHeight(150);
}
void SearchBarWidget::searchButtonClicked(QString text) {
- qDebug()<<"test5";
if(busy)
Q_EMIT stopSearching();
else
}
void SearchBarWidget::searchPushButtonClicked() {
- qDebug()<<"test6";
#ifdef Q_WS_MAEMO_5
if(busy) {
Q_EMIT stopSearching();
}
void SearchBarWidget::searchDelay(QString word) {
- qDebug()<<"test8";
if(!busy && !word.isEmpty()) {
#ifndef Q_WS_MAEMO_5
emit setLineEditText(word);
}
void SearchBarWidget::delaySearchTimeout() {
- qDebug()<<"test9";
delayTimer.stop();
if(!busy) {
Q_EMIT searchForTranslations(delayString);
}
void SearchBarWidget::setEnabled(bool enabled) {
- qDebug()<<"test10";
#ifndef Q_WS_MAEMO_5
emit setLineEditEnables(enabled);
if(!enabled) {
- qDebug()<<"tu???";
emit setEnableHistoryNext(false);
emit setEnableHistoryShow(false);
emit setEnableHistoryPrev(false);
historyShowToolButton->setEnabled(false);
}
#endif
-qDebug()<<"tu2???";
}
void SearchBarWidget::setBusy() {
- qDebug()<<"test11";
if(busy) return;
#ifndef Q_WS_MAEMO_5
}
void SearchBarWidget::updateBusyTimer(){
- qDebug()<<"test12";
if(progressMax==true){
emit progresSetValue2(0);
progressMax=false;
}
void SearchBarWidget::setIdle() {
- qDebug()<<"test13";
if(!busy) return;
#ifndef Q_WS_MAEMO_5
progressBar->hide();
void SearchBarWidget::clearSearchWordToolButtonClicked() {
- qDebug()<<"test14";
#ifdef Q_WS_MAEMO_5
searchWordLineEdit->clear();
#endif
void SearchBarWidget::updateHistoryButtons(bool prev, bool next, bool list) {
- qDebug()<<"test15";
if(!busy) {
#ifndef Q_WS_MAEMO_5
emit setEnableHistoryNext(next);
}
void SearchBarWidget::showHistoryButtonClicked() {
- qDebug()<<"test16";
#ifndef Q_WS_MAEMO_5
QPoint p=view->pos(); // = historyShowToolButton->pos();
p=mapToGlobal(p);