mmsharing/livecommsui/lcui/inc/lcuicomponentrepository.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     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 LCUICOMPONENTREPOSITORY_H
       
    18 #define LCUICOMPONENTREPOSITORY_H
       
    19 
       
    20 #include <hbdocumentloader.h>
       
    21 #include <QString>
       
    22 #include <QHash>
       
    23 #include <hbtransparentwindow.h>
       
    24 
       
    25 class LcView;
       
    26 class QAction;
       
    27 class HbProgressDialog;
       
    28 class HbDialog;
       
    29 class LcUiEngine;
       
    30 class HbMenu;
       
    31 class HbMessageBox;
       
    32 
       
    33 class LcUiComponentRepository : public HbDocumentLoader   
       
    34 {   
       
    35     friend class UT_LcUiComponentRepository;
       
    36     
       
    37 public:    
       
    38 
       
    39     explicit LcUiComponentRepository(LcUiEngine& engine);
       
    40     ~LcUiComponentRepository();
       
    41 
       
    42 public:
       
    43     
       
    44     LcView* idleView();
       
    45     LcView* receiveView();
       
    46     LcView* receiveOnlyView();
       
    47     LcView* twowayView();
       
    48     LcView* sendView();
       
    49     LcView* allInOneView();
       
    50     
       
    51     HbDialog* acceptQuery();
       
    52     HbProgressDialog* invitingNote();
       
    53     HbProgressDialog* waitingNote();
       
    54     HbDialog* recipientQuery();
       
    55     HbDialog* shareOwnVideoQuery();
       
    56     void sharedVideoContextMenuActions( HbMenu* menu, LcView& view );
       
    57     bool loadLayout( const QString& layoutName );
       
    58     // returns the currently loaded layout name
       
    59     QString layout()const;
       
    60     // returns the previously loaded layout name
       
    61     QString previousLayout()const;
       
    62     
       
    63 private: //from HbDocumentLoader
       
    64 
       
    65     QObject *createObject(const QString& type, const QString &name);
       
    66 
       
    67 private:
       
    68 
       
    69     LcView* loadView( QObjectList& components, 
       
    70                       const QString& viewId, 
       
    71                       const QString& xmlFile );
       
    72     void connectActions( LcView& view ) const;
       
    73     bool connect( QAction& hbAction, LcView& view ) const;
       
    74 
       
    75 private:
       
    76     
       
    77     QString mLastLoadedView;
       
    78     
       
    79     LcUiEngine& mEngine;
       
    80     
       
    81     QObjectList mIdleViewComponents;
       
    82     QObjectList mReceiveViewComponents;
       
    83     QObjectList mSendViewComponents;
       
    84     QObjectList mTwowayViewComponents;
       
    85     QObjectList mAllInOneViewComponents;
       
    86     QObjectList mReceiveOnlyViewComponents;
       
    87     
       
    88     QHash<QString,const char*>* mSlots;
       
    89     
       
    90     LcView* mIdleView;
       
    91     LcView* mReceiveView;
       
    92     LcView* mSendView;
       
    93     LcView* mTwowayView;
       
    94     LcView* mAllInOneView;
       
    95     LcView* mReceiveOnlyView;
       
    96     
       
    97     HbDialog* mAcceptQuery;
       
    98     HbProgressDialog* mInvitingNote;
       
    99     HbProgressDialog* mWaitingNote;
       
   100     HbDialog* mRecipientQuery;
       
   101     HbMessageBox* mShareOwnVideoQuery;
       
   102     
       
   103     QString mLayout;
       
   104     QString mPreviousLayout;
       
   105 };
       
   106 
       
   107 #endif // LCUICOMPONENTREPOSITORY_H