logsui/logsapp/inc/logscomponentrepository.h
changeset 11 64a47b97e1e1
parent 2 7119b73b84d6
equal deleted inserted replaced
10:b04270301d3b 11:64a47b97e1e1
    29 class LogsModel;
    29 class LogsModel;
    30 
    30 
    31 /**
    31 /**
    32  * 
    32  * 
    33  */
    33  */
    34 class LogsComponentRepository : public HbDocumentLoader   
    34 class LogsComponentRepository : public QObject, public HbDocumentLoader
    35 {   
    35 {   
       
    36     Q_OBJECT
       
    37     
    36     friend class UT_LogsComponentRepository;
    38     friend class UT_LogsComponentRepository;
    37     friend class UT_LogsViewManager;
    39     friend class UT_LogsViewManager;
    38     
    40     
    39 public:    
    41 public:    
    40 
    42 
    41     explicit LogsComponentRepository(LogsAbstractViewManager& viewManager);
    43     explicit LogsComponentRepository(LogsAbstractViewManager& viewManager);
    42     ~LogsComponentRepository();
    44     ~LogsComponentRepository();
    43 
    45 
    44 public:
    46 public:
    45     
    47     
    46     LogsRecentCallsView* recentCallsView();
    48     LogsRecentCallsView* recentCallsView(bool onlyInit = false);
    47     LogsDetailsView* detailsView();
    49     LogsDetailsView* detailsView(bool onlyInit = false);
    48     LogsMatchesView* matchesView();
    50     LogsMatchesView* matchesView(bool onlyInit = false);
    49 
    51 
    50     /**
    52     /**
    51      * Returns dialpad. Must be always a valid pointer.
    53      * Returns dialpad. Must be always a valid pointer.
    52      */
    54      */
    53     Dialpad* dialpad();
    55     Dialpad* dialpad();
    61      * Sets object tree to a proper view object list
    63      * Sets object tree to a proper view object list
    62      */
    64      */
    63     void setObjectTreeToView( LogsAppViewId viewId );
    65     void setObjectTreeToView( LogsAppViewId viewId );
    64     
    66     
    65     bool loadSection(  LogsAppViewId viewId, const QString& sectionName );
    67     bool loadSection(  LogsAppViewId viewId, const QString& sectionName );
       
    68 
       
    69 private slots:
       
    70 
       
    71     void lazyInit();
    66     
    72     
    67 private: 
    73 private: 
    68 
    74 
    69     //from HbDocumentLoader
    75     //from HbDocumentLoader
    70     QObject *createObject(const QString& type, const QString &name);
    76     QObject *createObject(const QString& type, const QString &name);
    71 
    77 
    72     void addToolbarToObjectList( QObjectList& list );
    78     void addToolbarToObjectList( QObjectList& list );
       
    79     
       
    80     QGraphicsWidget* doLoadView( 
       
    81         const QString &fileName, const QString &viewName, 
       
    82         QObjectList &viewComponents, LogsAppViewId viewId, bool onlyInit );
    73     
    83     
    74 private:
    84 private:
    75     
    85     
    76     LogsAbstractViewManager& mViewManager;
    86     LogsAbstractViewManager& mViewManager;
    77     LogsRecentCallsView* mRecentCallsView;
    87     LogsRecentCallsView* mRecentCallsView;
    82     QObjectList mMatchesViewComponents;
    92     QObjectList mMatchesViewComponents;
    83     
    93     
    84     Dialpad* mDialpad;
    94     Dialpad* mDialpad;
    85     DialpadKeyHandler* mDialpadKeyHandler;
    95     DialpadKeyHandler* mDialpadKeyHandler;
    86     LogsModel*  mModel;
    96     LogsModel*  mModel;
       
    97     QObjectList* mCurrentObjectTree;
    87 };
    98 };
    88 
    99 
    89 #endif // LOGSCOMPONENTREPOSITORY_H
   100 #endif // LOGSCOMPONENTREPOSITORY_H