searchui/stateproviders/searchstateprovider/inc/searchprogressivestate.h
changeset 11 773be20e0a25
parent 5 3bc31ad99ee7
child 12 993ab30e92fc
equal deleted inserted replaced
7:51d10d255e92 11:773be20e0a25
    28 #include <xqappmgr.h>
    28 #include <xqappmgr.h>
    29 #include <xqaiwrequest.h>
    29 #include <xqaiwrequest.h>
    30 #include "search_global.h"
    30 #include "search_global.h"
    31 #include <f32file.h>
    31 #include <f32file.h>
    32 
    32 
    33 //Uncomment to enable performance measurements.
    33 
    34 //#define OST_TRACE_COMPILER_IN_USE
    34 
    35 
    35 #ifdef OST_TRACE_COMPILER_IN_USE //defined in Search_global.h 
    36 #ifdef OST_TRACE_COMPILER_IN_USE
       
    37 
    36 
    38 #define PERF_CAT_API_TIME_RESTART  m_categorySearchApiTime.restart();
    37 #define PERF_CAT_API_TIME_RESTART  m_categorySearchApiTime.restart();
    39 #define PERF_CAT_UI_TIME_RESTART  m_categorySearchUiTime.restart();
    38 #define PERF_CAT_UI_TIME_RESTART  m_categorySearchUiTime.restart();
    40 #define PERF_CAT_TOTAL_TIME_RESTART  m_totalSearchUiTime.restart();
    39 #define PERF_CAT_TOTAL_TIME_RESTART  m_totalSearchUiTime.restart();
    41 #define PERF_CAT_API_ENDLOG qDebug() << "Search on category (API): " << mTemplist.at( mDatabasecount-1 ) << "took "<< m_categorySearchApiTime.elapsed() << " msec";
    40 #define PERF_CAT_API_ENDLOG qDebug() << "Search on category (API): " << mTemplist.at( mDatabasecount-1 ) << "took "<< m_categorySearchApiTime.elapsed() << " msec";
    44 #define PERF_CAT_HITS_ENDLOG qDebug() << "Hits on category: " << mTemplist.at( mDatabasecount-1 ) << ": "<< aResultCount;
    43 #define PERF_CAT_HITS_ENDLOG qDebug() << "Hits on category: " << mTemplist.at( mDatabasecount-1 ) << ": "<< aResultCount;
    45 #define PERF_CAT_GETDOC_TIME_RESTART m_categoryGetDocumentApiTime.restart();
    44 #define PERF_CAT_GETDOC_TIME_RESTART m_categoryGetDocumentApiTime.restart();
    46 #define PERF_CAT_GETDOC_TIME_ACCUMULATE m_getDocumentCatergoryTimeAccumulator += m_categoryGetDocumentApiTime.elapsed();
    45 #define PERF_CAT_GETDOC_TIME_ACCUMULATE m_getDocumentCatergoryTimeAccumulator += m_categoryGetDocumentApiTime.elapsed();
    47 #define PERF_CAT_GETDOC_ACCUMULATOR_RESET m_getDocumentCatergoryTimeAccumulator = 0;
    46 #define PERF_CAT_GETDOC_ACCUMULATOR_RESET m_getDocumentCatergoryTimeAccumulator = 0;
    48 #define PERF_CAT_GETDOC_ACCUMULATOR_ENDLOG qDebug() << "Get Doc on category (API): " << mTemplist.at( mDatabasecount-1 ) << "took " << m_getDocumentCatergoryTimeAccumulator << "msec";
    47 #define PERF_CAT_GETDOC_ACCUMULATOR_ENDLOG qDebug() << "Get Doc on category (API): " << mTemplist.at( mDatabasecount-1 ) << "took " << m_getDocumentCatergoryTimeAccumulator << "msec";
    49 
    48 #define PERF_RESULT_ITEM_LAUNCH_TIME_RESTART m_resultItemLaunchTime.restart();
       
    49 #define PERF_RESULT_ITEM_FOR_LAUNCHING(string) qDebug() <<"Result_Item_Launching: Launching "<<string ;
       
    50 #define PERF_RESULT_ITEM_LAUNCH_TIME_ENDLOG(string) qDebug() <<"Result_Item_Launching:"<<string<<"took "<<m_resultItemLaunchTime.elapsed()<<" msec";
    50 #else
    51 #else
    51 
    52 
    52 #define PERF_CAT_API_TIME_RESTART  
    53 #define PERF_CAT_API_TIME_RESTART  
    53 #define PERF_CAT_UI_TIME_RESTART  
    54 #define PERF_CAT_UI_TIME_RESTART  
    54 #define PERF_CAT_TOTAL_TIME_RESTART
    55 #define PERF_CAT_TOTAL_TIME_RESTART
    58 #define PERF_CAT_HITS_ENDLOG
    59 #define PERF_CAT_HITS_ENDLOG
    59 #define PERF_CAT_GETDOC_TIME_RESTART
    60 #define PERF_CAT_GETDOC_TIME_RESTART
    60 #define PERF_CAT_GETDOC_TIME_ACCUMULATE 
    61 #define PERF_CAT_GETDOC_TIME_ACCUMULATE 
    61 #define PERF_CAT_GETDOC_ACCUMULATOR_RESET
    62 #define PERF_CAT_GETDOC_ACCUMULATOR_RESET
    62 #define PERF_CAT_GETDOC_ACCUMULATOR_ENDLOG
    63 #define PERF_CAT_GETDOC_ACCUMULATOR_ENDLOG
    63 
    64 #define PERF_RESULT_ITEM_LAUNCH_TIME_RESTART
       
    65 #define PERF_RESULT_ITEM_FOR_LAUNCHING(string)
       
    66 #define PERF_RESULT_ITEM_LAUNCH_TIME_ENDLOG(string)
    64 #endif //OST_TRACE_COMPILER_IN_USE
    67 #endif //OST_TRACE_COMPILER_IN_USE
    65 class HbMainWindow;
    68 class HbMainWindow;
    66 class HbView;
    69 class HbView;
    67 class HbListView;
    70 class HbListView;
    68 class HbDocumentLoader;
    71 class HbDocumentLoader;
    69 class QStandardItemModel;
    72 class QStandardItemModel;
    70 class HbSearchPanel;
    73 class HbSearchPanel;
    71 class CFbsBitmap;
    74 class CFbsBitmap;
    72 class InDeviceHandler;
    75 class InDeviceHandler;
    73 class QCPixDocument;
    76 class QCPixDocument;
    74 class NotesEditor;
    77 class NotesEditorInterface;
    75 class EventViewerPluginInterface;
    78 class EventViewerPluginInterface;
       
    79 class QPluginLoader;
    76 SEARCH_CLASS( SearchStateProviderTest)
    80 SEARCH_CLASS( SearchStateProviderTest)
    77 /** @ingroup group_searchstateprovider
    81 /** @ingroup group_searchstateprovider
    78  * @brief The state where progressive search state is shown
    82  * @brief The state where progressive search state is shown
    79  *
    83  *
    80  * @see StateMachine
    84  * @see StateMachine
   226      * Slot implemented to delete the calenderviewer plugin  
   230      * Slot implemented to delete the calenderviewer plugin  
   227      * @since S60 ?S60_version.
   231      * @since S60 ?S60_version.
   228      */
   232      */
   229 
   233 
   230     void _viewingCompleted();
   234     void _viewingCompleted();
       
   235     
       
   236 
       
   237     void viewReady();
       
   238 
       
   239     
   231 private:
   240 private:
   232 
   241 
   233     /**
   242     /**
   234      * initiate the fresh search for selected category separately 
   243      * initiate the fresh search for selected category separately 
   235      * 
   244      * 
   435 
   444 
   436     /**
   445     /**
   437      * to create Notes editor 
   446      * to create Notes editor 
   438      * 
   447      * 
   439      */
   448      */
   440     NotesEditor *notesEditor;
   449     NotesEditorInterface *mNotesEditor;
       
   450 
       
   451     /**
       
   452      * to create Notes plugin loader 
       
   453      * 
       
   454      */
       
   455     QPluginLoader *mNotespluginLoader;
   441 
   456 
   442 private:
   457 private:
   443     /**
   458     /**
   444      * Application manager handler to perform resultitem opening.
   459      * Application manager handler to perform resultitem opening.
   445      * 
   460      * 
   460 #ifdef OST_TRACE_COMPILER_IN_USE
   475 #ifdef OST_TRACE_COMPILER_IN_USE
   461     QTime m_totalSearchUiTime;
   476     QTime m_totalSearchUiTime;
   462     QTime m_categorySearchUiTime;
   477     QTime m_categorySearchUiTime;
   463     QTime m_categorySearchApiTime;
   478     QTime m_categorySearchApiTime;
   464     QTime m_categoryGetDocumentApiTime;
   479     QTime m_categoryGetDocumentApiTime;
       
   480     QTime m_resultItemLaunchTime;
   465     //use long to safeguard overflow from long running operations.
   481     //use long to safeguard overflow from long running operations.
   466     long m_getDocumentCatergoryTimeAccumulator; 
   482     long m_getDocumentCatergoryTimeAccumulator; 
   467 #endif
   483 #endif
   468 
   484 
   469 SEARCH_FRIEND_CLASS    (SearchStateProviderTest)
   485 SEARCH_FRIEND_CLASS    (SearchStateProviderTest)