examples/ForumNokia/ImageConverter/inc/ImageConverterAppUi.h

00001 /*
00002  * Copyright © 2008 Nokia Corporation.
00003  */
00004 
00005 #ifndef IMAGECONVERTERAPPUI_H
00006 #define IMAGECONVERTERAPPUI_H
00007 
00008 // INCLUDES
00009 #include <eikapp.h>
00010 #include <eikdoc.h>
00011 #include <e32std.h>
00012 #include <coeccntx.h>
00013 #include <aknappui.h>
00014 #include <aknutils.h>
00015 
00016 #include "ImageConverterEngine.h"
00017 #include "ImageConverterContainer.h"
00018 
00019 const TUid KUidHelpFile = {0x2000e192};  // From help
00020 
00021 // FORWARD DECLARATIONS
00022 class CImageConverterContainer;
00023 
00024 
00025 // CLASS DECLARATION
00026 
00027 class CAknListQueryDialog;
00028 class CShowInfoDialog;
00029 class CFrameInfoStrings;
00030 
00037 class CImageConverterAppUi : public CAknAppUi, MConverterController
00038     {
00039     public: // // Constructors and destructor
00040 
00044         void ConstructL();
00045 
00049         ~CImageConverterAppUi();
00050         
00051     public: // New functions
00052         void ShowMessage(const TDesC& aMsg) const;
00053         void DoEvent(EPointerEvents aEvent);
00054         void ReadImage(TInt aDirection);
00055         TBool IsEngineBusy();
00056         TInt ImageIndex();
00057         TInt ImageCount();        
00058         void ImageName(TFileName& aFilename);
00059         void PlainImageName(TFileName& aFilename);
00064         void HandleCommandL(TInt aCommand);
00065         
00066     public: // Functions from base classes
00067         // from MConverterController
00068         void NotifyCompletion( TInt aErr, const TDesC& aMsg  );
00069         TBool IsAnimating();
00070         TBool IsOptionsButtonOnTop();
00071         void SearchOptionsButtonPosition();
00072         TState EngineState();
00073 
00074 
00075         
00076     private:
00077         // From MEikMenuObserver
00078         void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
00079 
00080     private:
00081 
00088         virtual TKeyResponse HandleKeyEventL(
00089             const TKeyEvent& aKeyEvent,TEventCode aType);
00090 
00091         CArrayFix<TCoeHelpContext>* HelpContextL() const;
00092         
00093     private: // internal methods
00097         void HandleOpenL();
00098 
00102         void HandleSaveAsL();
00103         
00107         void HandleInfoL();
00108         
00112         void HandleRotate();
00113         
00117         void HandleScale();
00118         
00122         void ShowMessageL(const TDesC& aMsg) const;
00123         
00124         void ReadImageDirectoryL();
00125         
00126         void HandleResourceChangeL( TInt aType );
00127 
00128         
00129     private: //Data
00133         TBool                       iImageLoaded;
00134 
00137         CImageConverterContainer*   iAppContainer; 
00138 
00141         CImageConverterEngine*      iConverter;
00142         
00143         RArray<TFileName>           iFiles;
00144         TInt                        iOpenFileIndex;
00145         TBool                       iShiftDown;
00146         
00147         TBool                       iOptionButtonOnTop;
00148         
00149         CAknListQueryDialog*        iSaveAs;
00150         CShowInfoDialog*            iInfoDialog;
00151         CFrameInfoStrings*          iInfoStrings;
00152 
00153     };
00154 
00155 #endif
00156 
00157 // End of File

Generated by  doxygen 1.6.2