diff -r 0818dd463d41 -r 924385140d98 coreapplicationuis/devicepowermenuplugin/inc/hbdevicepowermenuwidegt_p.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/coreapplicationuis/devicepowermenuplugin/inc/hbdevicepowermenuwidegt_p.h Tue Aug 31 15:24:25 2010 +0300 @@ -0,0 +1,95 @@ +/* + * 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 HBDEVICEPOWERMENUWIDEGT_P_H +#define HBDEVICEPOWERMENUWIDEGT_P_H + + +#include +#include +#include +#include +#include +#include +#include +//For widgets used +#include +#include +#include +#include + +class HbDevicePowerMenuWidget : public QObject, public HbDeviceDialogInterface +{ + Q_OBJECT + +public: + HbDevicePowerMenuWidget(const QVariantMap ¶meters); + ~HbDevicePowerMenuWidget(); + +public: + //HbDeviceDialogInterface methods to be implemented + bool setDeviceDialogParameters(const QVariantMap ¶meters); + int deviceDialogError() const; + void closeDeviceDialog(bool byClient); + HbPopup *deviceDialogWidget() const; + virtual QObject *signalSender() const; + + +private: + bool preConstructDialog(); + void constructDialog(const QVariantMap ¶meters); + void cleanupMemory(); + +private: + void customizeVolumeSlider(); + void setSpeakerIcon(); + bool IsValidHandles(); + +private slots: + void handleVolumeChanged(int aVolume); + void handleSilenceMode(bool aState); + void handleVibrationToggled(int aVibrationToggel); + void handleOfflineToggled(int aOfflineToggel); + void handlePowerOff(bool aState); + void closedialog(); + +signals: + void deviceDialogClosed(); + void deviceDialogData(QVariantMap data); + +private: + Q_DISABLE_COPY(HbDevicePowerMenuWidget) + + int mDeviceDialogError; //DeviceDialogError + int mVolumeLevel; //shows current Volume Level + bool mShowVolume; //used to Enable or Disbale Volume + bool mVibrationChecked; //Vibration enabled or Disabled + bool mOfflineChecked; //offline enabled or Disabled + bool mSilencelatched; //SilenceMode Enabled or Disabled + bool mCypherOff; //Shows Encryption/Decryption ON/OFF + + HbDialog* mDialogWidget; //Handle for Powermenu Dialog + HbPushButton* mSilenceButton; //Handle for Silence button + HbSlider* mVolumeSlider; //Handle for Slider + HbCheckBox* mVibarte; //Handle for Vibration check Box + HbCheckBox* mOffline; //Handle for Offline CheckBox + HbPushButton * mPowerOffButton; //Handle for PowerOff Button + HbDocumentLoader* mLoader; //Hnadle for Documnet Loader to load docml + HbTranslator* mHbTranslator; //Translator used for localization; loads translation files +}; + +#endif // HBDEVICEPOWERMENUWIDEGT_P_H