--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/activityfw/testapplications/nftapps/lowmemoryapp/basewidget.h Thu Sep 16 12:11:40 2010 +0100
@@ -0,0 +1,119 @@
+/*
+* 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 BASEWIDGET_H_
+#define BASEWIDGET_H_
+
+#include <hbwidget.h>
+#include <QGraphicsLinearLayout>
+#include <QGraphicsGridLayout>
+#include <HbPushButton>
+#include <hblabel.h>
+#include <HbComboBox>
+#include <hbcheckbox.h>
+#include <hblineedit.h>
+#include <HbValidator>
+#include <QPixmap>
+#include <QByteArray>
+#include <QTimer>
+#include <QTextStream>
+#include <afactivitystorage.h>
+#include <afstorageglobals.h>
+
+class basewidget: public HbWidget
+{
+ Q_OBJECT
+public:
+ basewidget(QObject* activityStorage, QObject* activityManager, QTextStream* stream, QGraphicsItem *parent = 0);
+ ~basewidget();
+
+
+protected:
+
+
+protected:
+
+ QGraphicsGridLayout *mGridLayout;
+ HbPushButton *mSaveButton;
+ HbPushButton *mThumbButton;
+ HbPushButton *mDataButton;
+ HbLabel* mStatusValueLabel;
+ HbLineEdit* mKBytesEdid;
+ HbLabel* mCatchLabel;
+
+ HbLabel* mBytesEditLabel;
+
+
+
+ QIntValidator* mQKBytesValidator;
+ HbValidator* mKBytesValidator;
+
+ QObject* mActivityStorage;
+ QObject* mActivityManager;
+ QPixmap* mPixmap;
+ QByteArray* mByteArray;
+
+
+ QTextStream* mStream;
+
+ QVariant* mSaveVariant;
+ QVariantHash* mSaveMetadata;
+ QStringList mActivities;
+ char* mAlloc;
+ QString mAction;
+
+
+
+protected slots:
+ void save();
+ void data();
+ void thumb();
+ void thumbnailReady(QPixmap pixmap, void* ptr);
+
+public:
+
+protected:
+ int Bytes() const;
+
+ int Edit2Int(const HbLineEdit* lineedit) const;
+ void prepareDataSave();
+ void prepareThumbSave();
+ void clearSaveData();
+ bool saveActivity(int name);
+ bool removeActivity(const QString& name);
+ bool privateData(const QString& name);
+ bool getThumbnail(const QString& name);
+ bool activities();
+
+ int ClientHeapSize();
+
+ void logErrorMessage(const QString& mess);
+
+ void releaseMem();
+
+ void logCatchError(const QString& mess);
+ void logDataType(const QString& type);
+ void logPixmapSize(const QPixmap& pix);
+ void logAction(const QString& mess);
+ void logSaveResult(bool res);
+ bool alloc();
+ void releaseAlloced();
+
+
+
+};
+
+#endif /* BASEWIDGET_H_*/