searchui/stateproviders/searchstateprovider/inc/searchprogressivestate.h
changeset 26 367228f82b66
parent 18 1edf350003c5
child 27 7a8855317cbd
equal deleted inserted replaced
24:1abfa342db42 26:367228f82b66
   142      * Constructing cpix handlers  .
   142      * Constructing cpix handlers  .
   143      * @since S60 ?S60_version.
   143      * @since S60 ?S60_version.
   144      */
   144      */
   145     void constructHandlers();
   145     void constructHandlers();
   146 
   146 
   147     InDeviceHandler* constructHandlers(int mDatabase);
   147 
   148 
       
   149     /**
       
   150      * setting the categories .
       
   151      * @since S60 ?S60_version.
       
   152      */
       
   153     void setSelectedCategories();
       
   154 
   148 
   155     /**
   149     /**
   156      * parse the result documents.
   150      * parse the result documents.
   157      * @since S60 ?S60_version.
   151      * @since S60 ?S60_version.
   158      */
   152      */
   164      * slot connects to CSearchHandler to get the status of search result asynchronously 
   158      * slot connects to CSearchHandler to get the status of search result asynchronously 
   165      * @since S60 ?S60_version.
   159      * @since S60 ?S60_version.
   166      * @param aError error code.
   160      * @param aError error code.
   167      * @param aResultCount number of results
   161      * @param aResultCount number of results
   168      */
   162      */
   169     void onAsyncSearchComplete(int aError, int aResultCount);
   163     void slotonAsyncSearchComplete(int aError, int aResultCount);
   170 
   164 
   171     /**
   165     /**
   172      * slot connects to CSearchHandler to get the result item asynchronously 
   166      * slot connects to CSearchHandler to get the result item asynchronously 
   173      * @since S60 ?S60_version.
   167      * @since S60 ?S60_version.
   174      * @param aError error code.
   168      * @param aError error code.
   175      * @param aDoc result item
   169      * @param aDoc result item
   176      */
   170      */
   177     void onGetDocumentComplete(int aError, CpixDocument* aDoc);
   171     void slotonGetDocumentComplete(int aError, CpixDocument* aDoc);
   178 
   172 
   179     /**
   173     /**
   180      * slot connects to CSearchHandler to get the result item asynchronously 
   174      * slot connects to CSearchHandler to get the result item asynchronously 
   181      * @since S60 ?S60_version.
   175      * @since S60 ?S60_version.
   182      * @param aError error code.
   176      * @param aError error code.
   183      * @param aDoc result item
   177      * @param aDoc result item
   184      */
   178      */
   185     void onGetBatchDocumentComplete(int aError, int aCount,
   179     void slotonGetBatchDocumentComplete(int aError, int aCount,
   186             CpixDocument** aDoc);
   180             CpixDocument** aDoc);
   187 
   181 
   188     /**
   182     /**
   189      * slot connects to list view to launch the respective application
   183      * slot connects to list view to launch the respective application
   190      * @since S60 ?S60_version.
   184      * @since S60 ?S60_version.
   191      * @param aIndex index of the activated item.
   185      * @param aIndex index of the activated item.
   192      */
   186      */
   193     void openResultitem(HbListWidgetItem * item);
   187     void slotopenResultitem(HbListWidgetItem * item);
   194 
   188     
   195     /**
       
   196      * slot connects to settings state to get the selected category information
       
   197      * @since S60 ?S60_version.
       
   198      * @param aCategory category(database) name.
       
   199      * @param aStatus whether the category selected or not
       
   200      */
       
   201     void getSettingCategory(int, bool);
       
   202 
       
   203     /**
   189     /**
   204      * slot connects to action to change the current state to settings state
   190      * slot connects to action to change the current state to settings state
   205      * @since S60 ?S60_version. 
   191      * @since S60 ?S60_version. 
   206      */
   192      */
   207     void setSettings();
   193     void slotsetSettings();
   208 
   194 
   209     /**
   195     /**
   210      * slot connects to search panel to initiate the fresh search
   196      * slot connects to search panel to initiate the fresh search
   211      * @since S60 ?S60_version.
   197      * @since S60 ?S60_version.
   212      * @param aKeyword search keyword.
   198      * @param aKeyword search keyword.
   213      */
   199      */
   214     void startNewSearch(const QString &aKeyword);
   200     void slotstartNewSearch(const QString &aKeyword);
   215 
   201 
   216     /**
   202     /**
   217      * slot implemented to avoid repeated search for the same category 
   203      * slot implemented to avoid repeated search for the same category 
   218      * selection when user search for mutiple times
   204      * selection when user search for mutiple times
   219      * @since S60 ?S60_version.
   205      * @since S60 ?S60_version.
   220      */
   206      */
   221     void settingsaction(bool avalue);
   207     void slotsettingsaction(bool avalue);
   222 
   208 
   223     /**
   209     /**
   224      * slot connects to search state  for internet search
   210      * slot connects to search state  for internet search
   225      * @since S60 ?S60_version.
   211      * @since S60 ?S60_version.
   226      */
   212      */
   227 
   213 
   228     void handleOk(const QVariant& var);
   214     void slothandleOk(const QVariant& var);
   229 
   215 
   230     /**
   216     /**
   231      * slot added for Application manager
   217      * slot added for Application manager
   232      * @since S60 ?S60_version.
   218      * @since S60 ?S60_version.
   233      */
   219      */
   234 
   220 
   235     void handleError(int ret, const QString& var);
   221     void slothandleError(int ret, const QString& var);
   236 
   222 
   237     /**
   223     /**
   238      * Slot implemented to delete the calenderviewer plugin  
   224      * Slot implemented to delete the calenderviewer plugin  
   239      * @since S60 ?S60_version.
   225      * @since S60 ?S60_version.
   240      */
   226      */
   241     void _viewingCompleted();
   227     void slotviewingCompleted();
   242 
   228 
   243     /**
   229     /**
   244      * Slot to notify when view is ready   
   230      * Slot to notify when view is ready   
   245      * @since S60 ?S60_version.
   231      * @since S60 ?S60_version.
   246      */
   232      */
   247     void viewReady();
   233     void slotviewReady();
   248 
   234 
   249     /**
   235     /**
   250      * Slot to notify form query update form online state   
   236      * Slot to notify form query update form online state   
   251      * @since S60 ?S60_version.
   237      * @since S60 ?S60_version.
   252      */
   238      */
   260 
   246 
   261     /**
   247     /**
   262      * Slot to launch the search result screen with the activity URI  
   248      * Slot to launch the search result screen with the activity URI  
   263      * @since S60 ?S60_version.
   249      * @since S60 ?S60_version.
   264      */
   250      */
   265     void activityRequested(const QString &name);
   251     void slotactivityRequested(const QString &name);
   266 
   252 
   267     /**
   253     /**
   268      * Slot to notify when theme is changed
   254      * Slot to notify when theme is changed
   269      * @since S60 ?S60_version.
   255      * @since S60 ?S60_version.
   270      */
   256      */    
   271     void slotPrepareResultIcons();
   257     void slotdbChanged();
   272 private:
   258 private:
   273 
   259 
   274     /**
   260     /**
   275      * initiate the fresh search for selected category separately 
   261      * initiate the fresh search for selected category separately 
   276      * 
   262      * 
   342     /**
   328     /**
   343      * Function to get pixmap       
   329      * Function to get pixmap       
   344      */
   330      */
   345     void GetPixmapByFilenameL(TDesC& fileName, const QSize &size,
   331     void GetPixmapByFilenameL(TDesC& fileName, const QSize &size,
   346             QPixmap& pixmap);
   332             QPixmap& pixmap);
       
   333     
       
   334     /**
       
   335      * function to load the category translator files       
       
   336      */
       
   337     void loadTranslator(QString localizationpath);
   347 
   338 
   348 signals:
   339 signals:
   349 
   340 
   350     /**
   341     /**
   351      * Signalled when user selects an to switch the settings state
   342      * Signalled when user selects an to switch the settings state
   400     /**
   391     /**
   401      * Search Keyword                        
   392      * Search Keyword                        
   402      */
   393      */
   403 
   394 
   404     QString mOriginalString;
   395     QString mOriginalString;
   405 
   396     
   406     /**
       
   407      * selected categories on a map                        
       
   408      */
       
   409     QMap<int, bool> mSelectedCategory;
       
   410 
       
   411     /**
       
   412      * save the previous selected categories,decision to search again                        
       
   413      */
       
   414     QMap<int, bool> mTempSelectedCategory;
       
   415 
       
   416     /**
       
   417      * temporary list of selected categories
       
   418      */
       
   419     QStringList mTemplist;
       
   420 
       
   421     /**
   397     /**
   422      * number of categories selected
   398      * number of categories selected
   423      * 
   399      * 
   424      */
   400      */
   425     int mDatabasecount;
   401     int mDatabasecount;
   444      * setting loaded or not variable
   420      * setting loaded or not variable
   445      * 
   421      * 
   446      */
   422      */
   447     bool loadSettings;
   423     bool loadSettings;
   448 
   424 
   449     /**
   425     
   450      * 
       
   451      * Icon List to be created in boot up for all categories
       
   452      */
       
   453     QList<HbIcon> mIconArray;
       
   454 
       
   455     /**
   426     /**
   456      * Hbicon to be created 
   427      * Hbicon to be created 
   457      * 
   428      * 
   458      */
   429      */
   459     HbIcon mIcon;
   430     HbIcon mIcon;
   483     QPluginLoader *mNotespluginLoader;
   454     QPluginLoader *mNotespluginLoader;
   484 
   455 
   485     QMap<int, HbIcon> mISprovidersIcon;
   456     QMap<int, HbIcon> mISprovidersIcon;
   486 
   457 
   487     bool mOnlineQueryAvailable;
   458     bool mOnlineQueryAvailable;
       
   459     
       
   460     QMap<int,bool> mSelectedCategory;
   488 
   461 
   489 private:
   462 private:
   490     /**
   463     /**
   491      * Application manager handler to perform resultitem opening.
   464      * Application manager handler to perform resultitem opening.
   492      * 
   465      * 
   508     SearchUiLoader* mUiLoader;
   481     SearchUiLoader* mUiLoader;
   509 
   482 
   510     bool mStateStatus;
   483     bool mStateStatus;
   511 
   484 
   512     bool mValidateHandlerCreation;
   485     bool mValidateHandlerCreation;
       
   486     
       
   487     /**
       
   488      * to handle exception when searchserver get terminated aburptly.
       
   489      * 
       
   490      */
       
   491     bool mContinuationSearch;
   513 
   492 
   514 #ifdef OST_TRACE_COMPILER_IN_USE
   493 #ifdef OST_TRACE_COMPILER_IN_USE
   515     QTime m_totalSearchUiTime;
   494     QTime m_totalSearchUiTime;
   516     QTime m_categorySearchUiTime;
   495     QTime m_categorySearchUiTime;
   517     QTime m_categorySearchApiTime;
   496     QTime m_categorySearchApiTime;