taskswitcher/testapplications/generator/hellostarter/lunchwidget.h
changeset 117 c63ee96dbe5f
equal deleted inserted replaced
115:3ab5c078b490 117:c63ee96dbe5f
       
     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 LUNCHWIDGET_H_
       
    18 #define LUNCHWIDGET_H_
       
    19 
       
    20 #include <hbwidget.h>
       
    21 #include <QGraphicsLinearLayout>
       
    22 #include <QGraphicsGridLayout>
       
    23 #include <HbPushButton>
       
    24 #include <hblabel.h>
       
    25 
       
    26 class HbComboBox;
       
    27 class QFile;
       
    28 class QTextStream;
       
    29 class QTimer;
       
    30 class HbValidator;
       
    31 class HbLineEdit;
       
    32 
       
    33 class lunchwidget: public HbWidget
       
    34 {
       
    35     Q_OBJECT
       
    36 public:
       
    37     lunchwidget(QGraphicsItem *parent = 0);
       
    38     ~lunchwidget();
       
    39 
       
    40 private:
       
    41 
       
    42     QGraphicsGridLayout *mGridLayout;
       
    43     HbPushButton *mStartButton;
       
    44     HbPushButton *mCloseButton;
       
    45     HbPushButton *mAutoButton;
       
    46     HbComboBox *mTenCombo;
       
    47     HbComboBox *mOneCombo;
       
    48     HbLineEdit* mTimesEdid;
       
    49     HbLabel* mResultLabel;    
       
    50     HbLabel* mTenLabel;    
       
    51     HbLabel* mPlusLabel;    
       
    52     HbLabel* mOneLabel;        
       
    53     HbLabel* mTimesLabel;
       
    54     HbLabel* mCounterLabel;
       
    55     HbLabel* mCounterValueLabel;
       
    56     
       
    57     QFile* mFile;
       
    58     QTextStream* mStream;
       
    59     
       
    60     QTimer* mTimer;
       
    61     int mActionCounter;
       
    62     int mTimes;
       
    63     bool mOpened;
       
    64     
       
    65     QIntValidator* mQTimesValidator;
       
    66     HbValidator* mTimesValidator;
       
    67     
       
    68 
       
    69 private:
       
    70 
       
    71     
       
    72 private slots:
       
    73     void start();
       
    74     void stop();
       
    75     void automat();
       
    76     void timeout();
       
    77 
       
    78 private:    
       
    79     void enableControls(bool enable);
       
    80     void setCounterLabel(int count);
       
    81     int times();
       
    82 
       
    83 };
       
    84 
       
    85 #endif /* LUNCHWIDGET_H_*/