3
* 12-4-07, Mark Larkin, Removed destructor. No need to delete QObjects.
5
#include "SearchForString.h"
11
SearchForString::SearchForString()
13
searchString = new QLineEdit("");
14
searchFromStart = new QPushButton(tr("Search From Start"));
15
searchFromStart->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
16
searchAgain = new QPushButton(tr("Search Again"));
17
searchAgain->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
18
closeButton = new QPushButton(tr("Close"));
19
closeButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
21
connect(searchFromStart, SIGNAL(clicked()), this, SIGNAL(searchFromStartSignal()));
22
connect(searchAgain, SIGNAL(clicked()), this, SIGNAL(searchAgainSignal()));
23
connect(closeButton, SIGNAL(clicked()), this, SLOT(cancel()));
25
mainLayout = new QVBoxLayout;
26
mainLayout->addWidget(searchString);
27
mainLayout->addWidget(searchFromStart);
28
mainLayout->addWidget(searchAgain);
29
mainLayout->addWidget(closeButton);
30
setLayout(mainLayout);
33
QString SearchForString::getSearchString()
35
return searchString->text();
38
void SearchForString::cancel()
40
setResult(QDialog::Rejected);