Fix search dialog title. Add "Exit" to the Symbian menu. Attempt to fix
[dorian] / searchdialog.cpp
1 #include <QtGui>
2
3 #include "searchdialog.h"
4 #include "search.h"
5 #include "trace.h"
6
7 SearchDialog::SearchDialog(QWidget *parent): Dyalog(parent)
8 {
9     setWindowTitle(tr("Search the Web"));
10
11     QLabel *titleLabel = new QLabel(tr("Title:"), this);
12     title = new QLineEdit(this);
13     QLabel *authorLabel = new QLabel(tr("Author:"), this);
14     author = new QLineEdit(this);
15
16     addWidget(titleLabel);
17     addWidget(title);
18     addWidget(authorLabel);
19     addWidget(author);
20     addStretch();
21     addButton(tr("Search"), this, SLOT(accept()));
22 }
23
24 Search::Query SearchDialog::query()
25 {
26     TRACE;
27     Search::Query ret;
28     ret.title = title->text();
29     ret.author = author->text();
30     qDebug() << ret.title << ret.author;
31     return ret;
32 }