diff -r 71da52165949 -r ce1c7ad1f18b photosgallery/viewframework/uiutilities/inc/glxprogressindicator.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/photosgallery/viewframework/uiutilities/inc/glxprogressindicator.h Mon Mar 15 12:40:30 2010 +0200 @@ -0,0 +1,85 @@ +/* +* Copyright (c) 2008-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: Progressdialog +* +*/ + +#ifndef GLXPROGRESSINDICATOR_H_ +#define GLXPROGRESSINDICATOR_H_ + +#include +#include + +class CAknProgressDialog; +class CEikProgressInfo; + +class MDialogDismisedObserver + { +public: + virtual void HandleDialogDismissedL()=0; + }; + +class CGlxProgressIndicator : public CBase, + public MProgressDialogCallback + { +public: + IMPORT_C static CGlxProgressIndicator* NewL(MDialogDismisedObserver& aGlxGridViewNotifyObserver); + ~CGlxProgressIndicator(); + static CGlxProgressIndicator* NewLC(MDialogDismisedObserver& aGlxGridViewNotifyObserver); + +private: + CGlxProgressIndicator(MDialogDismisedObserver& aGlxGridViewNotifyObserver); + void ConstructL(); + + /** + * show the progress bar + * @param aFinalValue Sets the final value of the bar + * @param aShow hide/display the progress bar + */ + void StartProgressNoteL(TInt aFinalValue ,TBool aShow); + /** + * displays the increment of progress bar + */ + void UpdateProgressBar(); + + /** + * calculates how much increment to be done in progress bar + * @return increment value + */ + TInt CalculateDisplayBarIncrementL(); +public: + // Callback for periodic timer, static, + static TInt PeriodicCallbackL( TAny* aPtr ); + + //nonstatic func called from periodic timer + void DisplayProgressBarL(); +protected://MProgressDialogCallback + void DialogDismissedL (TInt aButtonId); + +private: + //Progress bar updation ticker + CPeriodic* iProgressbarTicker; + + //Progress bar + CAknProgressDialog* iProgressDialog; + + //Progress info + CEikProgressInfo* iProgressInfo; + + //final count to set in progress bar + TInt iFinalCount; + MDialogDismisedObserver& iGlxGridViewNotifyObserver; + + }; +#endif /* GLXPROGRESSINDICATOR_H_ */