camerauis/cameraxui/cxui/inc/cxuiselftimer.h
changeset 43 0e652f8f1fbd
parent 28 3075d9b614e6
equal deleted inserted replaced
28:3075d9b614e6 43:0e652f8f1fbd
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    17 #ifndef CXUISELFTIMER_H
    17 #ifndef CXUISELFTIMER_H
    18 #define CXUISELFTIMER_H
    18 #define CXUISELFTIMER_H
    19 
    19 
    20 #include <QObject>
    20 #include <QObject>
    21 #include <QTimer>
    21 #include <QTimer>
       
    22 #include <QSound>
       
    23 #include <QVariant>
    22 
    24 
    23 class CxeSettings;
    25 class CxeSettings;
    24 class CxuiDocumentLoader;
    26 class CxuiDocumentLoader;
    25 class HbLabel;
    27 class HbLabel;
    26 class HbPushButton;
    28 class HbPushButton;
    36 
    38 
    37     void loadSelftimerWidgets(CxuiDocumentLoader *documentLoader);
    39     void loadSelftimerWidgets(CxuiDocumentLoader *documentLoader);
    38     bool isEnabled();
    40     bool isEnabled();
    39     bool isOngoing();
    41     bool isOngoing();
    40 
    42 
       
    43     int getTimeout() const;
    41 signals:
    44 signals:
    42     void timerFinished();
    45     void timerFinished();
    43     void cancelled();
    46     void cancelled();
    44 
    47 
    45 public slots:
    48 public slots:
    46     void changeTimeOut(int seconds);
    49     void changeTimeOut(int seconds);
    47     void startTimer();
    50     void startTimer();
    48     void reset();
    51     void reset(bool update = true);
    49     void cancel();
    52     void cancel();
       
    53     void enableSound(long int uid, unsigned long int key, QVariant value);
    50 
    54 
    51 protected slots:
    55 protected slots:
    52     void timeout();
    56     void timeout();
    53 
    57 
    54 private:
    58 private:
    55     void reset(bool update);
       
    56     void updateWidgets();
    59     void updateWidgets();
    57     void showWidgets();
    60     void showWidgets();
    58     void hideWidgets();
    61     void hideWidgets();
       
    62     void playSound();
    59 
    63 
    60 private:
    64 private:
    61     Q_DISABLE_COPY(CxuiSelfTimer)
    65     Q_DISABLE_COPY(CxuiSelfTimer)
    62 
    66 
    63     int mDelay;
    67     int mDelay;
    72     HbPushButton *mStartButton;
    76     HbPushButton *mStartButton;
    73 
    77 
    74     // settings, not own
    78     // settings, not own
    75     CxeSettings &mSettings;
    79     CxeSettings &mSettings;
    76 
    80 
       
    81     QSound mSound;
       
    82     bool mUseSound;
    77 };
    83 };
    78 
    84 
    79 #endif // CXUISELFTIMER_H
    85 #endif // CXUISELFTIMER_H