camerauis/cameraxui/cxui/src/cxuivideoprecaptureview2.cpp
changeset 28 3075d9b614e6
parent 19 d9aefe59d544
child 30 7680ea4bbfe7
child 38 0f0b4c1d7744
child 43 0e652f8f1fbd
equal deleted inserted replaced
19:d9aefe59d544 28:3075d9b614e6
     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 
       
    18 #include <hbtransparentwindow.h>
       
    19 #include <hblabel.h>
       
    20 #include <hbslider.h>
       
    21 #include <hbtoolbar.h>
       
    22 #include <hbaction.h>
       
    23 
       
    24 #include "cxutils.h"
       
    25 #include "cxenamespace.h"
       
    26 #include "cxuienums.h"
       
    27 #include "cxuidocumentloader.h"
       
    28 #include "cxuivideoprecaptureview.h"
       
    29 #include "cxuivideoprecaptureview2.h"
       
    30 
       
    31 
       
    32 using namespace Cxe;
       
    33 using namespace CxUiLayout;
       
    34 
       
    35 
       
    36 CxuiVideoPrecaptureView2::CxuiVideoPrecaptureView2( QGraphicsItem *parent) :
       
    37     CxuiVideoPrecaptureView(parent)
       
    38 {
       
    39     CX_DEBUG_IN_FUNCTION();
       
    40 }
       
    41 
       
    42 CxuiVideoPrecaptureView2::~CxuiVideoPrecaptureView2()
       
    43 {
       
    44     CX_DEBUG_IN_FUNCTION();
       
    45 }
       
    46 
       
    47 void CxuiVideoPrecaptureView2::loadDefaultWidgets()
       
    48 {
       
    49     CX_DEBUG_ENTER_FUNCTION();
       
    50     CX_DEBUG_ASSERT(mDocumentLoader);
       
    51 
       
    52     // Get pointers to ui components from the layout data
       
    53     QGraphicsWidget *widget = NULL;
       
    54     widget = mDocumentLoader->findWidget(VIDEO_PRE_CAPTURE_VIEWFINDER);
       
    55     mViewfinder = qobject_cast<HbTransparentWindow *> (widget);
       
    56     CX_DEBUG_ASSERT(mViewfinder);
       
    57 
       
    58     widget = mDocumentLoader->findWidget(VIDEO_PRE_CAPTURE_ELAPSED_TIME_LABEL);
       
    59     mElapsedTimeText = qobject_cast<HbLabel *> (widget);
       
    60     CX_DEBUG_ASSERT(mElapsedTimeText);
       
    61 
       
    62     widget = mDocumentLoader->findWidget(VIDEO_PRE_CAPTURE_RECORDING_ICON);
       
    63     mRecordingIcon = qobject_cast<HbLabel *> (widget);
       
    64     CX_DEBUG_ASSERT(mRecordingIcon);
       
    65 
       
    66     // get needed pointers to some of the widgets
       
    67     widget = mDocumentLoader->findWidget(VIDEO_PRE_CAPTURE_ZOOM_SLIDER);
       
    68     mSlider = qobject_cast<HbSlider *> (widget);
       
    69     CX_DEBUG_ASSERT(mSlider);
       
    70 
       
    71     widget = mDocumentLoader->findWidget(VIDEO_PRE_CAPTURE_TOOLBAR);
       
    72     mToolBar = qobject_cast<HbToolBar *> (widget);
       
    73     CX_DEBUG_ASSERT(mToolBar);
       
    74 
       
    75     mWidgetsLoaded = true;
       
    76 
       
    77     hideControls();
       
    78 
       
    79     CX_DEBUG_EXIT_FUNCTION();
       
    80 }
       
    81 
       
    82 
       
    83 void CxuiVideoPrecaptureView2::loadWidgets()
       
    84 {
       
    85     CX_DEBUG_ENTER_FUNCTION();
       
    86     // All loaded in loadDefaultWidgets()
       
    87     CX_DEBUG_EXIT_FUNCTION();
       
    88 }
       
    89 
       
    90 
       
    91 // end of file