searchui/stateproviders/searchstateprovider/inc/searchsettingsstate.h
changeset 0 ccd0fd43f247
child 2 208a4ba3894c
equal deleted inserted replaced
-1:000000000000 0:ccd0fd43f247
       
     1 /*
       
     2  * Copyright (c) 2009 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 SEARCH_STATES_SETTINGS_H
       
    19 #define SEARCH_STATES_SETTINGS_H
       
    20 
       
    21 #include <qstate.h>
       
    22 #include <qabstractitemmodel.h>
       
    23 #include "Search_global.h"
       
    24 
       
    25 SEARCH_CLASS( SearchStateProviderTest)
       
    26 
       
    27 class QGraphicsWidget;
       
    28 class HbMainWindow;
       
    29 class HbLabel;
       
    30 class HbStackedWidget;
       
    31 class HbView;
       
    32 class HbDocumentLoader;
       
    33 class HbAction;
       
    34 class HbGridView;
       
    35 class QGraphicsLinearLayout;
       
    36 class SettingsWidget;
       
    37 
       
    38 /** @ingroup group_searchstateprovider
       
    39  * @brief The state handles wizard activation and interaction.
       
    40  *
       
    41  * @see StateMachine
       
    42  *
       
    43  * @lib ?library
       
    44  * @since S60 ?S60_version
       
    45  */
       
    46 class SearchSettingsState : public QState
       
    47     {
       
    48 Q_OBJECT
       
    49 public:
       
    50     /*
       
    51      * The plugin's display mode enumeration.
       
    52      * FullScreen means menustrip is not shown.
       
    53      * PartialScreen means menustrip is shown.
       
    54      */
       
    55     enum PluginDisplayMode
       
    56         {
       
    57         FullScreen, PartialScreen
       
    58         };
       
    59 
       
    60 public:
       
    61 
       
    62     /**
       
    63      * Constructor.
       
    64      * @since S60 ?S60_version.     
       
    65      * @param aParent Owner.
       
    66      */
       
    67     SearchSettingsState(QState *aParent = 0);
       
    68 
       
    69     /**
       
    70      * Destructor.
       
    71      * @since S60 ?S60_version.
       
    72      */
       
    73     virtual ~SearchSettingsState();
       
    74 
       
    75 protected:
       
    76 
       
    77     /**
       
    78      * @copydoc QState::onEntry()
       
    79      */
       
    80     void onEntry(QEvent *event);
       
    81 
       
    82     /**
       
    83      * @copydoc QState::onExit()
       
    84      */
       
    85     void onExit(QEvent *event);
       
    86 
       
    87 private:
       
    88 
       
    89     /**
       
    90      * Returns the main window handle.
       
    91      * @since S60 ?S60_version.
       
    92      * @return The pointer to the main window.
       
    93      */
       
    94     //  HbMainWindow* mainWindow();
       
    95 
       
    96     /**
       
    97      * Connects signals and slots for active wizard.
       
    98      * @since S60 ?S60_version.
       
    99      */
       
   100 
       
   101     void isInternetOn();
       
   102 public slots:
       
   103 
       
   104     void getItemCategory(int, bool);
       
   105 
       
   106     /**
       
   107      * Signalled when back action is triggerd from toolbaar.
       
   108      * @since S60 ?S60_version.
       
   109      */
       
   110     void handleBackEvent(bool);
       
   111 
       
   112     /**
       
   113      * Function to customize the progressive state.
       
   114      * @since S60 ?S60_version.
       
   115      */
       
   116     //  void customizeGoButton();
       
   117 signals:
       
   118 
       
   119     /**
       
   120      * Emitted when the menu state is to be activated.
       
   121      * @since S60 ?S60_version.
       
   122      */
       
   123     void backEventTriggered();
       
   124     
       
   125     /**
       
   126      * Emitted when ok/cancel clicked on settings page
       
   127      * @since S60 ?S60_version.
       
   128      */
       
   129     void clickstatus(bool);
       
   130 
       
   131     /**
       
   132      * Emitted when categories selected for searching
       
   133      * @since S60 ?S60_version.
       
   134      */
       
   135     void publishSelectedCategory(int, bool);
       
   136 
       
   137     /**
       
   138      * Emitted when internet search is selectead 
       
   139      * @since S60 ?S60_version.
       
   140      */
       
   141     void customizeGoButton(bool);
       
   142 
       
   143 private:
       
   144 
       
   145     /**
       
   146      * HbMainWindow instance.
       
   147      */
       
   148     HbMainWindow* mMainWindow;
       
   149 
       
   150     /**
       
   151      * HbDocumentLoader instance.
       
   152      */
       
   153     HbDocumentLoader* mDocumentLoader;
       
   154 
       
   155     /**
       
   156      * settings widget
       
   157      * 
       
   158      */
       
   159     SettingsWidget* mWidget;
       
   160 
       
   161     bool minitialCount;
       
   162     /**
       
   163      * friend class for unit testing
       
   164      */
       
   165 SEARCH_FRIEND_CLASS    (SearchStateProviderTest)
       
   166     };
       
   167 
       
   168 #endif //SEARCH_STATES_SETTINGS_H