*
*/
+#include <QtCore/QDebug>
#include <QtGui/QHBoxLayout>
#include <QtGui/QVBoxLayout>
#include <QtGui/QLabel>
#include <QtGui/QDialogButtonBox>
#include <QMaemo5ValueButton>
-#include <QDebug>
#include "searchdialog.h"
SearchDialog::SearchDialog(QWidget* parent): QDialog(parent),
selector_ = new ButtonSelector(tr("Type"), this);
selector_->addItem(tr("Persons"));
- selector_->addItem(tr("Yellow pages"));
+ selector_->addItem(tr("Companies"));
QVBoxLayout* leftLayout = new QVBoxLayout;
leftLayout->addLayout(numberLayout);
leftLayout->addWidget(selector_);
QDialogButtonBox* buttons = new QDialogButtonBox;
+ buttons->setCenterButtons(false);
QPushButton* submitButton = new QPushButton(tr("Search"));
buttons->addButton(submitButton, QDialogButtonBox::AcceptRole);
connect(submitButton, SIGNAL(pressed()), this, SLOT(searchPressed()));
emit search(details);
hide();
}
+
+void SearchDialog::setVisible(bool visible)
+{
+ QDialog::setVisible(visible);
+
+ if(visible)
+ {
+ numberInput_->setFocus();
+ }
+}