Fix forward navigation control on Linux.
[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     TRACE;
10     setWindowTitle(tr("Search the Web"));
11     setAttribute(Qt::WA_DeleteOnClose, false);
12
13     QLabel *titleLabel = new QLabel(tr("Title:"), this);
14     title = new QLineEdit(this);
15     QLabel *authorLabel = new QLabel(tr("Author:"), this);
16     author = new QLineEdit(this);
17
18     addWidget(titleLabel);
19     addWidget(title);
20     addWidget(authorLabel);
21     addWidget(author);
22     addStretch();
23     addButton(tr("Search"), this, SLOT(accept()));
24 }
25
26 Search::Query SearchDialog::query()
27 {
28     TRACE;
29     Search::Query ret;
30     ret.title = title->text();
31     ret.author = author->text();
32     qDebug() << ret.title << ret.author;
33     return ret;
34 }