activityfw/testapplications/hbmeasuretest/hbmeasuretest.h
author Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
Thu, 16 Sep 2010 12:11:40 +0100
changeset 117 c63ee96dbe5f
permissions -rw-r--r--
Missing activityfw and taskswitcher components - fix for Bug 3670

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/
#ifndef MEASURETEST_H
#define MEASURETEST_H

#include <QWidget>
#include <HbView>

class HbLabel;
class QString;
class ActivityClient;
class QPixmap;
class QByteArray;
class QVariant;
class HbComboBox;
class QGraphicsGridLayout;
class HbPushButton;
class QByteArray;
class QFile;
class QTextStream;

class MeasureTest: public HbView
{

    Q_OBJECT

public:
    MeasureTest(QGraphicsItem *parent = 0);
    ~MeasureTest();

private slots:
    void saveActivity();
    void deleteActivity();
    void getActivity();
    void getActivityData();
    void updateActivity();
    void getActivityThumb();
    void saveTimes();
    void save10actTimes();
    void getTimesActivityData();
    
    void thumbnailReady(QPixmap pix, void * ptr);

private:
    void Before();
    void After();
    void Result();
    int average(const QList<int>& list);
    int writeResults(const QList<int>& list, int average);


private:
    HbLabel *mResultLabel;
    HbLabel *mItemLabel;
    HbLabel *mTimesLabel;
    HbLabel *mPixmapLabel;
    HbLabel *mBytesLabel;
    HbLabel *mTypeLabel;
    HbLabel *mSizeLabel;
    QString mItemMessage;
    QString mResultMessage;
    QObject *mActivityClient;
    QObject *mActivityManager;
    QPixmap *mPixmap;
    QPixmap *mEmptyPixmap;
    HbComboBox *mTimesCombo;
    HbComboBox *mLengthCombo;
    HbComboBox *mPixmapCombo;
    HbComboBox *mWidthCombo;
    HbComboBox *mHeightCombo;
    QGraphicsGridLayout *mLayout;
    HbPushButton *mSaveButton;
    HbPushButton *mDelButton;
    HbPushButton *mGetButton;
    HbPushButton *mGetDataButton;
    HbPushButton *mUpdateButton;
    HbPushButton *mThumbButton;
    HbPushButton *mGetDataTimesButton;
    HbPushButton *mSaveTimesButton;
    HbPushButton *mSave10TimesButton;
    QByteArray *mByteArray;
    TInt64 iBefore;
    TInt64 iAfter;
    TInt64 iResult;
    
    int mThumbwait;
    int mThumbnull;
    int mThumbcurrent;
    
    QFile* mFile;
    QTextStream* mStream;



};

#endif //MEASURETEST_H