|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <QtGui> |
|
19 #include <QGraphicsLayout> |
|
20 #include <hbmainwindow.h> |
|
21 #include <hbwidget.h> |
|
22 #include "uicontrols.h" |
|
23 #include "testsearch.h" |
|
24 #include "searchhelper.h" |
|
25 |
|
26 TestSearch::TestSearch( ) |
|
27 { |
|
28 } |
|
29 |
|
30 TestSearch::~TestSearch() |
|
31 { |
|
32 |
|
33 } |
|
34 |
|
35 void TestSearch::doSearchTest() |
|
36 { |
|
37 //Declare controls |
|
38 ORBIT_SEARCH_CONTROLS |
|
39 HbMainWindow *BigScreen = new HbMainWindow(); |
|
40 HbWidget *w = new HbWidget; |
|
41 QGraphicsLinearLayout *layout = new QGraphicsLinearLayout; |
|
42 layout->setOrientation(Qt::Vertical); |
|
43 |
|
44 //Initialize controls |
|
45 searchBox = new HbLineEdit; |
|
46 layout->addItem( searchBox ); |
|
47 |
|
48 searchButton = new HbPushButton( "Search" ); |
|
49 layout->addItem( searchButton ); |
|
50 |
|
51 resultsBox = new HbTextEdit; |
|
52 layout->addItem( resultsBox ); |
|
53 |
|
54 SearchHelper* sh = new SearchHelper(searchBox, searchButton, resultsBox); |
|
55 QObject::connect( searchButton, SIGNAL( clicked() ), sh, SLOT(doSearch()) ); |
|
56 |
|
57 w->setLayout( layout ); |
|
58 BigScreen->addView ( w ); |
|
59 BigScreen->show(); |
|
60 } |