|
1 /* |
|
2 * Copyright (c) 2009 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 |
|
19 #include <QCoreApplication> |
|
20 #include<BookMarkServerTestui.h> |
|
21 #include<QtGui> |
|
22 |
|
23 int main( int argc, char **argv ) |
|
24 { |
|
25 QApplication app(argc, argv); |
|
26 BookMarkServerTestui obj; |
|
27 //QWidget* win=new QWidget(); |
|
28 QWidget win; |
|
29 win.setWindowTitle("BOOKMARKS SERVER TESTUI"); |
|
30 QPushButton* butadd=new QPushButton("Add Bookmark Google" ); |
|
31 QPushButton* butadd1=new QPushButton("Add Bookmark yahoo" ); |
|
32 QPushButton* butadd2=new QPushButton("Add Bookmark Nokia" ); |
|
33 |
|
34 QPushButton* butdel=new QPushButton("del Bookmark Google" ); |
|
35 QPushButton* butdel1=new QPushButton("del Bookmark Yahoo" ); |
|
36 QPushButton* butdel2=new QPushButton("del Bookmark Nokia" ); |
|
37 |
|
38 QPushButton* butfetch=new QPushButton("Fetch Bookmark" ); |
|
39 QPushButton* butexit=new QPushButton("Exit Server" ); |
|
40 QPushButton* Exitapp=new QPushButton("Exit UI" ); |
|
41 //Add |
|
42 QObject::connect(butadd,SIGNAL(clicked()),&obj,SLOT(buttonclicked())); |
|
43 QObject::connect(butadd1,SIGNAL(clicked()),&obj,SLOT(yahooclicked())); |
|
44 QObject::connect(butadd2,SIGNAL(clicked()),&obj,SLOT(nokiaclicked())); |
|
45 |
|
46 QObject::connect(butdel,SIGNAL(clicked()),&obj,SLOT(delbutton())); |
|
47 QObject::connect(butdel1,SIGNAL(clicked()),&obj,SLOT(delyahoo())); |
|
48 QObject::connect(butdel2,SIGNAL(clicked()),&obj,SLOT(delnokia())); |
|
49 |
|
50 |
|
51 QObject::connect(butfetch,SIGNAL(clicked()),&obj,SLOT(fetchbutton())); |
|
52 //QObject::connect(butexit,SIGNAL(clicked()),&obj,SLOT(closeAll())); |
|
53 QObject::connect(Exitapp,SIGNAL(clicked()),&app,SLOT(quit())); |
|
54 |
|
55 |
|
56 QVBoxLayout* lay=new QVBoxLayout(); |
|
57 lay->addWidget(butadd); |
|
58 lay->addWidget(butadd1); |
|
59 lay->addWidget(butadd2); |
|
60 lay->addWidget(butdel); |
|
61 lay->addWidget(butdel1); |
|
62 lay->addWidget(butdel2); |
|
63 lay->addWidget(butfetch); |
|
64 //lay->addWidget(butexit); |
|
65 lay->addWidget(Exitapp); |
|
66 |
|
67 win.setLayout(lay); |
|
68 //win->show(); |
|
69 win.showFullScreen(); |
|
70 |
|
71 /* butadd->show(); |
|
72 butdel->show(); |
|
73 butfetch->show();*/ |
|
74 return app.exec(); |
|
75 } |
|
76 |