|
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 <QString> |
|
19 #include <QStringList> |
|
20 #include <QDebug> |
|
21 #include <hbapplication.h> |
|
22 #include <hbmainwindow.h> |
|
23 #include <logsservices.h> |
|
24 |
|
25 int main(int argc, char *argv[]) |
|
26 { |
|
27 qDebug() << "LogsServicesTester entry"; |
|
28 LogsServices::LogsView viewIndex = LogsServices::ViewAll; |
|
29 bool showDialpad = false; |
|
30 for ( int i = 0; i< argc; i++ ){ |
|
31 qDebug() << "Arg" << ( i + 1 ) << argv[i]; |
|
32 QString argStr( argv[i] ); |
|
33 if ( argStr.length() == 1 ){ |
|
34 viewIndex = (LogsServices::LogsView)argStr.toInt(); |
|
35 } |
|
36 if ( argStr == QString("-dialpad") ){ |
|
37 showDialpad = true; |
|
38 } |
|
39 } |
|
40 |
|
41 HbApplication app(argc, argv); |
|
42 HbMainWindow mainWindow; |
|
43 mainWindow.show(); |
|
44 |
|
45 qDebug() << "LogsServicesTester start logs"; |
|
46 LogsServices::start( viewIndex, showDialpad ); |
|
47 |
|
48 int ret = app.exec(); |
|
49 qDebug() << "LogsServicesTester exit"; |
|
50 return ret; |
|
51 } |