logsui/logsapp/src/main.cpp
changeset 20 6a40edd41841
parent 19 e4c884866116
child 21 2f0af9ba7665
--- a/logsui/logsapp/src/main.cpp	Fri Sep 17 08:29:34 2010 +0300
+++ b/logsui/logsapp/src/main.cpp	Mon Oct 04 00:17:41 2010 +0300
@@ -15,6 +15,7 @@
 *
 */
 //USER
+#include "logsappsettings.h"
 #include "logsapplication.h"
 #include "logsmainwindow.h"
 #include "logsviewmanager.h"
@@ -40,7 +41,8 @@
 {
     LOGS_QDEBUG( "logs [UI] -> main()" )
 
-    LogsApplication app(argc, argv);
+    LogsAppSettings appSettings(argc, argv);
+    LogsApplication app(argc, argv, appSettings);
 
 #ifdef LOGS_USE_QTRANSLATOR
     QString lang = QLocale::system().name();
@@ -65,7 +67,8 @@
     
     LogsMainWindow window;
     //Application ready signal is emitted after startup when UI is fully loaded and functional
-    QObject::connect( &window, SIGNAL(viewReady()), &app, SLOT(testLogsHandleAppViewReady()) );    
+    QObject::connect( &window, SIGNAL(viewReady()), &app, SLOT(testLogsHandleAppViewReady()) );  
+    QObject::connect( &window, SIGNAL(appLostForeground()), &app, SLOT(testLogsResetAppReady()) );
     HbStyleLoader::registerFilePath(":/logslayouts");
     
     // Create service handler asap so that services are published fast.
@@ -74,7 +77,7 @@
     // HbApplication creation takes long time.
     LogsServiceHandler service;
     LogsServiceHandlerOld serviceOld;
-    LogsViewManager viewManager(window, service, serviceOld);
+    LogsViewManager viewManager(window, service, serviceOld, appSettings);
     
     // Don't show window yet as app might be started at background
     int err = app.exec();