screengrabber/inc/mainview.h
branchRCL_3
changeset 21 b3cee849fa46
equal deleted inserted replaced
20:48060abbbeaf 21:b3cee849fa46
       
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MAINVIEW_H
       
    19 #define MAINVIEW_H
       
    20 
       
    21 #include <hbview.h>
       
    22 #include <hbmainwindow.h>
       
    23 
       
    24 class EngineWrapper;
       
    25 class HbMainWindow;
       
    26 class HbApplication;
       
    27 class SettingsView;
       
    28 class HbAction;
       
    29 
       
    30 
       
    31 
       
    32 /**
       
    33  * Class that implements the main view of Screen Grabber
       
    34  */
       
    35 class MainView : public HbView
       
    36 {
       
    37     Q_OBJECT
       
    38     
       
    39 public:
       
    40     
       
    41     /**
       
    42      * Constructor
       
    43      */
       
    44     MainView(HbMainWindow &mainWindow, EngineWrapper &engineWrapper);
       
    45     
       
    46     /**
       
    47      * Destructor
       
    48      */
       
    49 	~MainView();
       
    50 
       
    51 	/**
       
    52      * Initializes Engine Wrapper
       
    53      * @param app application class of Screen Grabber
       
    54      */
       
    55     void init(HbApplication &app);
       
    56     
       
    57     inline void setSettingsView(SettingsView *aSettingsView){ mSettingsView = aSettingsView; }
       
    58 
       
    59     
       
    60 private:
       
    61     
       
    62     /**
       
    63      * Creates menu
       
    64      */
       
    65     void createMenu(HbApplication &app);
       
    66     
       
    67     /**
       
    68      * Created info text ui components
       
    69      */
       
    70     void createInfoText();
       
    71     
       
    72     /**
       
    73      * Creates toolbar components
       
    74      */
       
    75     void createToolbar();
       
    76 
       
    77 public slots:
       
    78 
       
    79     
       
    80     /**
       
    81      * Shows about pop-up
       
    82      */
       
    83     void showAboutPopup();
       
    84     
       
    85     /**
       
    86      * Sends UI to background
       
    87      */
       
    88     void sendToBackground();
       
    89     
       
    90     /**
       
    91      * opens settings view
       
    92      */
       
    93     void showSettings();
       
    94 
       
    95     void my_quit();
       
    96     
       
    97     void quitYesNoQuestionClosed(HbAction*);
       
    98     
       
    99 
       
   100 public:
       
   101     
       
   102     /* Main windo of Screen Grabber */
       
   103     HbMainWindow &mMainWindow;
       
   104     
       
   105     /* Settings view */
       
   106     SettingsView *mSettingsView;
       
   107     
       
   108     /* Engine Wrapper */
       
   109     EngineWrapper &mEngineWrapper;
       
   110     
       
   111     /* Actions that are used in toolbars and menus */
       
   112     HbAction* actionSendToBg;
       
   113     HbAction* actionSettings;
       
   114     HbAction* actionAbout;
       
   115     HbAction* actionExit;
       
   116 
       
   117 };
       
   118 
       
   119 #endif // MAINVIEW_H