mmsharing/livecommsui/lcui/inc/lcview.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 LCVIEW_H
       
    18 #define LCVIEW_H
       
    19 
       
    20 #include <hbview.h>
       
    21 
       
    22 //temp
       
    23 #define LC_UNMUTE_TEXT "Unmute"
       
    24 #define LC_MUTE_TEXT "Mute"
       
    25 #define LC_HANDSET_TEXT "Handset"
       
    26 #define LC_SPEAKER_TEXT "Speaker"
       
    27 
       
    28 class LcUiEngine;
       
    29 class LcUiComponentRepository;
       
    30 class HbLabel;
       
    31 class HbMessageBox;
       
    32 class HbAction;
       
    33 class HbPushButton;
       
    34 class HbTransparentWindow;
       
    35 class HbMenu;
       
    36 class LcVideoWidget;
       
    37 class LcEffectHandler;
       
    38 class Dialpad;
       
    39 class DialpadVtKeyHandler;
       
    40 
       
    41 class LcView : public HbView    
       
    42 {
       
    43     Q_OBJECT
       
    44     friend class UT_LcView;
       
    45     friend class UT_LcUiComponentRepository;    
       
    46     
       
    47 public:    
       
    48 
       
    49     explicit LcView(LcUiEngine& engine, LcUiComponentRepository& repository);
       
    50     ~LcView();
       
    51 
       
    52 public:
       
    53     
       
    54     void init();
       
    55     void activated();
       
    56     void deactivated();
       
    57     QString currentLayout();
       
    58     
       
    59 public slots:
       
    60 
       
    61     void endVideoSession();    
       
    62     void disableCamera();
       
    63     void mute();
       
    64     void changeCamera();    
       
    65     void switchToVoiceCall();    
       
    66     void speaker();
       
    67     void updateVideoRects();
       
    68     void swap();
       
    69     void shareImage();
       
    70     void updateSwapLayout();
       
    71     void menuAboutToShow();    
       
    72     void back();
       
    73 //temp
       
    74     void notSupported();
       
    75 
       
    76 private slots:
       
    77 
       
    78     void setMuteActionToUnmute();
       
    79     void setMuteActionToMute();
       
    80     void setCameraActionToMain();
       
    81     void setCameraActionToSecondary();
       
    82     void setSpeakerActionToHandset();
       
    83     void setSpeakerActionToSpeaker();
       
    84     void setCameraActionToDisable();
       
    85     void setCameraActionToEnable();
       
    86     void disableControls();
       
    87     void enableControls();    
       
    88     void watchInactivity();
       
    89     void updateVolumeSlider(int aVolumeLevel);
       
    90 
       
    91 protected: // From HbView
       
    92     
       
    93     void gestureEvent(QGestureEvent *event);
       
    94  
       
    95 protected slots:
       
    96     void openDialpad();    
       
    97     virtual void dialpadOpened();
       
    98     virtual void dialpadClosed();
       
    99     virtual void dialpadEditorTextChanged();
       
   100     
       
   101 protected:
       
   102     void setDialpadPosition();
       
   103     
       
   104 private: // fullscreen
       
   105     void timerEvent( QTimerEvent * event );
       
   106     void toFullScreen( bool fullscreen );
       
   107     
       
   108 private:
       
   109     void createNotSupportedNote();
       
   110     void createContextMenu();
       
   111     QRectF translateRectForOrientation(const QRectF& origRect);
       
   112     QPointF translatePointForOrientation(const QPointF& origPoint);
       
   113     void setVisibility( QGraphicsItem* item, bool visible );    
       
   114     void addOptionsMenuActions();
       
   115     void gestureLongPress( QPointF coords );
       
   116     void gestureShortPress();
       
   117     bool isVideoPositionedCorrectly( LcVideoWidget* mVideoWidget );
       
   118     bool isPositioned();
       
   119 
       
   120 private://not owned
       
   121     
       
   122     LcUiEngine& mEngine;
       
   123     LcUiComponentRepository& mRepository;
       
   124     HbLabel* mRecipient;
       
   125     HbLabel* mDuration;
       
   126     HbLabel* mContactIcon;    
       
   127     LcVideoWidget* mSharedVideoWidget;
       
   128     LcVideoWidget* mReceivedVideoWidget;
       
   129     HbAction* mChangeCameraAction;
       
   130     HbAction* mMuteAction;
       
   131     HbAction* mSpeakerAction;
       
   132     HbAction* mDisableCameraAction;
       
   133     HbAction* mDisableCameraMenuAction;
       
   134     HbMessageBox* mNotSupportedNote;
       
   135     HbPushButton* mEndCallButton; 
       
   136 
       
   137     LcVideoWidget* mReceivedVideoEffectOverlay;
       
   138     LcVideoWidget* mSharedVideoEffectOverlay;
       
   139     LcEffectHandler* mEffectHandler;
       
   140 
       
   141 private:
       
   142 
       
   143     HbMenu* mItemContextMenu;    
       
   144     bool mIsOptionMenuOpen;
       
   145     Dialpad* mDialpad; // Not owned
       
   146     DialpadVtKeyHandler* mDialpadVtKeyHandler; 
       
   147     int timerId;
       
   148     bool isViewReady;
       
   149 };
       
   150 
       
   151 
       
   152 #endif // LCVIEW_H