|
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 #include <HbApplication> |
|
19 #include <HbMainWindow> |
|
20 #include <QSignalMapper> |
|
21 |
|
22 #include "iconsview.h" |
|
23 #include "activityhandler.h" |
|
24 |
|
25 |
|
26 int main(int argc, char *argv[]) |
|
27 { |
|
28 HbApplication app(argc, argv); |
|
29 |
|
30 IconsView *view = new IconsView(); |
|
31 |
|
32 ActivityHandler handler(view); |
|
33 QObject::connect(view, SIGNAL(activitySaveRequested(QString)), &handler, SLOT(handleSaveRequest(QString))); |
|
34 |
|
35 QSignalMapper lastUseMapper; |
|
36 lastUseMapper.setMapping(&app, "Autosave"); |
|
37 QObject::connect(&app, SIGNAL(aboutToQuit()), &lastUseMapper, SLOT(map())); |
|
38 QObject::connect(&lastUseMapper, SIGNAL(mapped(QString)), &handler, SLOT(handleSaveRequest(QString))); |
|
39 |
|
40 HbMainWindow window; |
|
41 window.addView(view); |
|
42 window.show(); |
|
43 |
|
44 return app.exec(); |
|
45 } |