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(((QWidget *)this->parent())->testAttribute(Qt::WA_Maemo5PortraitOrientation))
47 ui->sBox->setReadOnly(true);
48 //ui->sBox->setText("Portrait");
51 ui->sBox->setReadOnly(false);
55 bool topBar::eventFilter(QObject *obj, QEvent *e)
57 if(obj == ui->sBox && ui->sBox->isReadOnly() && e->type() == QEvent::MouseButtonRelease)
61 this->kb = new vkb(this);
62 connect(kb,SIGNAL(submitText(QString)),ui->sBox,SLOT(setText(QString)));
64 kb->setText(ui->sBox->text());
68 return QWidget::eventFilter(obj,e);