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