camerauis/cameraxui/cxui/inc/cxuifullscreenpopup.h
branchRCL_3
changeset 54 bac7acad7cb3
parent 53 61bc0f252b2b
child 57 2c87b2808fd7
equal deleted inserted replaced
53:61bc0f252b2b 54: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 CXUFULLSCREENPOPUP_H
       
    19 #define CXUFULLSCREENPOPUP_H
       
    20 
       
    21 
       
    22 #include <HbWidget>
       
    23 #include <HbDocumentLoader>
       
    24 
       
    25 class QString;
       
    26 class QGraphicsScene;
       
    27 
       
    28 /*!
       
    29 * Class for showing simple full screen popups.
       
    30 */
       
    31 class CxuiFullScreenPopup : public HbWidget
       
    32 {
       
    33     Q_OBJECT
       
    34 
       
    35 public:
       
    36     static CxuiFullScreenPopup *create(QGraphicsScene *scene,
       
    37                                        const QString &message,
       
    38                                        const QString &action = QString());
       
    39     ~CxuiFullScreenPopup();
       
    40 
       
    41     void handleMousePress();
       
    42     void handleMouseRelease();
       
    43 
       
    44 public slots:
       
    45     void show();
       
    46     void hide();
       
    47 
       
    48 private:
       
    49     qreal topZValue() const;
       
    50     void setScene(QGraphicsScene *scene);
       
    51 
       
    52 private:
       
    53     CxuiFullScreenPopup();
       
    54 
       
    55     /*!
       
    56     * Internal custom DocML loader.
       
    57     */
       
    58     class CxuiFullScreenPopupLoader : public HbDocumentLoader
       
    59     {
       
    60     public:
       
    61         CxuiFullScreenPopupLoader();
       
    62         QObject *createObject(const QString& type, const QString &name);
       
    63     };
       
    64 
       
    65 private:
       
    66     QGraphicsScene *mScene;
       
    67     bool mPopupShown;
       
    68 
       
    69     Q_DISABLE_COPY(CxuiFullScreenPopup)
       
    70 };
       
    71 
       
    72 #endif // CXUFULLSCREENPOPUP_H