equal
deleted
inserted
replaced
|
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 |
|
24 int main(int argc, char *argv[]) |
|
25 { |
|
26 HbApplication app(argc, argv); |
|
27 |
|
28 IconsView *view = new IconsView(); |
|
29 |
|
30 QSignalMapper lastUseMapper; |
|
31 lastUseMapper.setMapping(&app, "Autosave"); |
|
32 QObject::connect(&app, SIGNAL(aboutToQuit()), &lastUseMapper, SLOT(map())); |
|
33 QObject::connect(&lastUseMapper, SIGNAL(mapped(QString)), view, SLOT(saveActivity(QString))); |
|
34 |
|
35 HbMainWindow window; |
|
36 window.addView(view); |
|
37 window.show(); |
|
38 |
|
39 if (app.activateReason() == Hb::ActivationReasonActivity) { |
|
40 // start-up case |
|
41 QVariant data = app.activateData(); |
|
42 view->loadActivity(data); |
|
43 |
|
44 } |
|
45 |
|
46 return app.exec(); |
|
47 } |