logsui/logsapp/inc/logscomponentrepository.h
changeset 0 4a5361db8937
child 2 7119b73b84d6
equal deleted inserted replaced
-1:000000000000 0:4a5361db8937
       
     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 #ifndef LOGSCOMPONENTREPOSITORY_H
       
    18 #define LOGSCOMPONENTREPOSITORY_H
       
    19 
       
    20 #include "logsdefs.h"
       
    21 #include <hbdocumentloader.h>
       
    22 
       
    23 class LogsRecentCallsView;
       
    24 class LogsDetailsView;
       
    25 class LogsMatchesView;
       
    26 class Dialpad;
       
    27 class DialpadKeyHandler;
       
    28 class LogsAbstractViewManager;
       
    29 class LogsModel;
       
    30 
       
    31 /**
       
    32  * 
       
    33  */
       
    34 class LogsComponentRepository : public HbDocumentLoader   
       
    35 {   
       
    36     friend class UT_LogsComponentRepository;
       
    37     
       
    38 public:    
       
    39 
       
    40     explicit LogsComponentRepository(LogsAbstractViewManager& viewManager);
       
    41     ~LogsComponentRepository();
       
    42 
       
    43 public:
       
    44     
       
    45     LogsRecentCallsView* recentCallsView();
       
    46     LogsDetailsView* detailsView();
       
    47     LogsMatchesView* matchesView();
       
    48 
       
    49     /**
       
    50      * Returns dialpad. Must be always a valid pointer.
       
    51      */
       
    52     Dialpad* dialpad();
       
    53     
       
    54     /**
       
    55      * Returns model. Must be always a valid pointer.
       
    56      */
       
    57     LogsModel*  model() const;
       
    58     
       
    59     /**
       
    60      * Sets object tree to a proper view object list
       
    61      */
       
    62     void setObjectTreeToView( LogsAppViewId viewId );
       
    63     
       
    64     bool loadSection(  LogsAppViewId viewId, const QString& sectionName );
       
    65     
       
    66 private: 
       
    67 
       
    68     //from HbDocumentLoader
       
    69     QObject *createObject(const QString& type, const QString &name);
       
    70 
       
    71     void addToolbarToObjectList( QObjectList& list );
       
    72     
       
    73 private:
       
    74     
       
    75     LogsAbstractViewManager& mViewManager;
       
    76     LogsRecentCallsView* mRecentCallsView;
       
    77     LogsDetailsView* mDetailsView;
       
    78     LogsMatchesView* mMatchesView;
       
    79     QObjectList mRecentViewComponents;
       
    80     QObjectList mDetailsViewComponents;
       
    81     QObjectList mMatchesViewComponents;
       
    82     
       
    83     Dialpad* mDialpad;
       
    84     DialpadKeyHandler* mDialpadKeyHandler;
       
    85     LogsModel*  mModel;
       
    86 };
       
    87 
       
    88 #endif // LOGSCOMPONENTREPOSITORY_H