18 #include <QtGui> |
18 #include <QtGui> |
19 #include <QGraphicsLayout> |
19 #include <QGraphicsLayout> |
20 #include <hbapplication.h> |
20 #include <hbapplication.h> |
21 #include <hbmainwindow.h> |
21 #include <hbmainwindow.h> |
22 #include <hbwidget.h> |
22 #include <hbwidget.h> |
23 |
23 #include <hbpushbutton.h> |
24 #include "searchhelper.h" |
24 #include <hbtextedit.h> |
|
25 #include "testsearch.h" |
|
26 #include "testci.h" |
25 |
27 |
26 int main(int argc, char *argv[]) |
28 int main(int argc, char *argv[]) |
27 { |
29 { |
28 HbApplication a(argc, argv); |
30 HbApplication a(argc, argv); |
29 |
31 |
30 //Declare controls |
32 //Declare controls |
31 ORBIT_SEARCH_CONTROLS |
33 HbTextEdit* choiceBox; |
32 |
34 HbPushButton* schButton;//button to start search test |
|
35 HbPushButton* ciButton; //button to start content info test |
33 HbMainWindow mainWindow; |
36 HbMainWindow mainWindow; |
34 HbWidget *w = new HbWidget; |
37 HbWidget *w = new HbWidget; |
35 QGraphicsLinearLayout *layout = new QGraphicsLinearLayout; |
38 QGraphicsLinearLayout *layout = new QGraphicsLinearLayout; |
36 layout->setOrientation(Qt::Vertical); |
39 layout->setOrientation(Qt::Vertical); |
37 |
40 |
38 //Initialize controls |
41 //Initialize controls |
39 searchBox = new HbLineEdit; |
42 choiceBox = new HbTextEdit(); |
40 layout->addItem( searchBox ); |
43 layout->addItem( choiceBox ); |
41 |
44 |
42 searchButton = new HbPushButton( "Search" ); |
45 schButton = new HbPushButton( "Test Search" ); |
43 layout->addItem( searchButton ); |
46 layout->addItem( schButton ); |
44 |
47 |
45 resultsBox = new HbTextEdit; |
48 ciButton = new HbPushButton( "Test Content Info" ); |
46 layout->addItem( resultsBox ); |
49 layout->addItem( ciButton ); |
|
50 choiceBox->setPlainText ("Select the Test : "); |
|
51 TestSearch* ts = new TestSearch( ); |
|
52 QObject::connect( schButton, SIGNAL( clicked() ), ts, SLOT( doSearchTest() ) ); |
47 |
53 |
48 SearchHelper* sh = new SearchHelper(searchBox, searchButton, resultsBox); |
54 TestCI* tc = new TestCI( ); |
49 QObject::connect( searchButton, SIGNAL( clicked() ), sh, SLOT(doSearch()) ); |
55 QObject::connect( ciButton, SIGNAL( clicked() ), tc, SLOT( doCITest() ) ); |
50 |
56 |
51 w->setLayout( layout ); |
57 w->setLayout( layout ); |
52 mainWindow.addView( w ); |
58 mainWindow.addView( w ); |
53 |
59 |
54 mainWindow.show(); |
60 mainWindow.show(); |