logsui/logsapp/inc/logscomponentrepository.h
changeset 11 64a47b97e1e1
parent 2 7119b73b84d6
--- a/logsui/logsapp/inc/logscomponentrepository.h	Wed Jun 23 18:13:05 2010 +0300
+++ b/logsui/logsapp/inc/logscomponentrepository.h	Tue Jul 06 14:16:36 2010 +0300
@@ -31,8 +31,10 @@
 /**
  * 
  */
-class LogsComponentRepository : public HbDocumentLoader   
+class LogsComponentRepository : public QObject, public HbDocumentLoader
 {   
+    Q_OBJECT
+    
     friend class UT_LogsComponentRepository;
     friend class UT_LogsViewManager;
     
@@ -43,9 +45,9 @@
 
 public:
     
-    LogsRecentCallsView* recentCallsView();
-    LogsDetailsView* detailsView();
-    LogsMatchesView* matchesView();
+    LogsRecentCallsView* recentCallsView(bool onlyInit = false);
+    LogsDetailsView* detailsView(bool onlyInit = false);
+    LogsMatchesView* matchesView(bool onlyInit = false);
 
     /**
      * Returns dialpad. Must be always a valid pointer.
@@ -63,6 +65,10 @@
     void setObjectTreeToView( LogsAppViewId viewId );
     
     bool loadSection(  LogsAppViewId viewId, const QString& sectionName );
+
+private slots:
+
+    void lazyInit();
     
 private: 
 
@@ -71,6 +77,10 @@
 
     void addToolbarToObjectList( QObjectList& list );
     
+    QGraphicsWidget* doLoadView( 
+        const QString &fileName, const QString &viewName, 
+        QObjectList &viewComponents, LogsAppViewId viewId, bool onlyInit );
+    
 private:
     
     LogsAbstractViewManager& mViewManager;
@@ -84,6 +94,7 @@
     Dialpad* mDialpad;
     DialpadKeyHandler* mDialpadKeyHandler;
     LogsModel*  mModel;
+    QObjectList* mCurrentObjectTree;
 };
 
 #endif // LOGSCOMPONENTREPOSITORY_H