4 topBar::topBar(QWidget *parent) :
10 ui->sBox->installEventFilter(this);
17 void topBar::on_taskSwitch_clicked()
19 emit this->changeTask();
21 void topBar::on_sButton_clicked()
23 emit this->searchRequest(ui->sBox->text());
25 void topBar::on_closeButton_clicked()
27 emit this->closeApp();
30 void topBar::changeEvent(QEvent *e)
32 QWidget::changeEvent(e);
34 case QEvent::LanguageChange:
35 ui->retranslateUi(this);
41 void topBar::resizeEvent(QResizeEvent *e)
43 if(e->type() == QEvent::Resize)
45 #if defined(Q_WS_MAEMO_5) || defined(Q_WS_HILDON)
46 if(((QWidget *)this->parent())->testAttribute(Qt::WA_Maemo5PortraitOrientation))
48 ui->sBox->setReadOnly(true);
49 //ui->sBox->setText("Portrait");
52 ui->sBox->setReadOnly(false);
57 bool topBar::eventFilter(QObject *obj, QEvent *e)
59 if(obj == ui->sBox && ui->sBox->isReadOnly() && e->type() == QEvent::MouseButtonRelease)
63 this->kb = new vkb(this);
64 connect(kb,SIGNAL(submitText(QString)),ui->sBox,SLOT(setText(QString)));
66 kb->setText(ui->sBox->text());
70 return QWidget::eventFilter(obj,e);