diff -r 11fa016241a4 -r da3ec8478e66 perfmon/ui/hb/win/enginewrapper.h --- a/perfmon/ui/hb/win/enginewrapper.h Thu Sep 02 20:27:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,270 +0,0 @@ -/* -* Copyright (c) 2010 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 ENGINEWRAPPER_H -#define ENGINEWRAPPER_H - -#include -#include -#include -#include -#include - -enum SettingThreadPriorityTypes -{ - EThreadPriorityTypeMuchLess = 0, - EThreadPriorityTypeLess, - EThreadPriorityTypeNormal, - EThreadPriorityTypeMore, - EThreadPriorityTypeMuchMore, - EThreadPriorityTypeRealTime, - EThreadPriorityTypeAbsoluteVeryLow, - EThreadPriorityTypeAbsoluteLow, - EThreadPriorityTypeAbsoluteBackground, - EThreadPriorityTypeAbsoluteForeground, - EThreadPriorityTypeAbsoluteHigh -}; - -enum SettingCPUModes -{ - ECPUModeNotSet = -1, - ECPUModeCPUTime, - ECPUModeNOPs -}; - -enum SettingDataPopupVisbilities -{ - EDataPopupVisbilityAlwaysOn = 0, - EDataPopupVisbilityBackgroundOnly, - EDataPopupVisbilityAlwaysAlwaysOff -}; - -enum SettingDataPopupLocations -{ - EDataPopupLocationTopRight = 0, - EDataPopupLocationBottomMiddle -}; - -enum SettingSources -{ - ESourceCPU = 0, - ESourceRAM, - ESourceC, - ESourceD, - ESourceE, - ESourceF, - ESourceG, - ESourceH, - ESourceI, - ESourcesLength // this should be always the last! -}; - -enum SettingLoggingMode -{ - ELoggingModeRDebug = 0, - ELoggingModeLogFile, - ELoggingModeRDebugLogFile -}; - - -struct SampleData -{ - qint64 mFree; - qint64 mSize; - qint64 mTimeFromStart; -}; - -class SampleEntry -{ -public: - QString description() const { return mDescription; } - QString unitShort() const { return mUnitShort; } - QString unitLong() const { return mUnitLong; } - int driveNumber() const { return mDriveNumber; } - QColor graphColor() const { return mGraphColor; } - - int sampleCount() const { return mSampleData.length(); } - const SampleData &sample(int index) const { return mSampleData[index]; } -private: - QString mDescription; - QString mUnitShort; - QString mUnitLong; - int mDriveNumber; - QColor mGraphColor; - - QList mSampleData; - -friend class EngineWrapper; -}; - -class PerfMonSources -{ -public: - int count() const { return 9; } - int isEnabled (int index) const { return mSources[index]; } - void setEnabled(int index, bool enabled) { mSources[index] = enabled; } - QList enabledIndexes() const - { - QList indexes; - for(int i=0; i &indexes) - { - for(int i=0; i& sampleEntries() const { return mEntries; } - - PerfMonSettings &settings() { return mSettings; } - const PerfMonSettings &settings() const { return mSettings; } - - void setLoggingEnabled(bool enabled) { mSettings.setLoggingEnabled(enabled); } - -public slots: - - bool updateSettings(); - bool initialize(); - void finalize(); - -signals: - - void samplesUpdated(); - void settingsUpdated(); - -private slots: - - void update(); - -private: - - QList mEntries; - - QTimer mTimer; - - QTime mStartTime; - - PerfMonSettings mSettings; -}; - -#endif //ENGINEWRAPPER_H