camerauis/cameraxui/cxengine/inc/cxecameradevicedesktop.h
branchRCL_3
changeset 24 bac7acad7cb3
parent 23 61bc0f252b2b
child 25 2c87b2808fd7
equal deleted inserted replaced
23:61bc0f252b2b 24:bac7acad7cb3
     1 /*
       
     2 * Copyright (c) 2010 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 #ifndef CXECAMERADEVICEDESKTOP_H
       
    19 #define CXECAMERADEVICEDESKTOP_H
       
    20 
       
    21 #include <QGraphicsWidget>
       
    22 #include <QList>
       
    23 
       
    24 class QTimer;
       
    25 class QPixmap;
       
    26 
       
    27 class CxeCameraDeviceDesktop : public QObject
       
    28 {
       
    29     Q_OBJECT
       
    30 public:
       
    31     CxeCameraDeviceDesktop();
       
    32     virtual ~CxeCameraDeviceDesktop();
       
    33     void start();
       
    34     void stop();
       
    35     const QPixmap &currentSnaphot();
       
    36     
       
    37 signals:
       
    38     void imageChanged(const QPixmap &newImage);
       
    39 
       
    40 protected slots:
       
    41     void handleTimeout();
       
    42 
       
    43 private:
       
    44     void loadPictures();
       
    45     void setupTimer();
       
    46 
       
    47     QTimer *mSwitchPictureTimer;
       
    48     QList<QPixmap> mPictureList;
       
    49     QList<QPixmap>::size_type mPictureIndex;
       
    50 };
       
    51 
       
    52 #endif // CXECAMERADEVICEDESKTOP_H