searchui/stateproviders/searchstateprovider/inc/searchuiloader.h
changeset 26 367228f82b66
parent 21 708468d5143e
equal deleted inserted replaced
24:1abfa342db42 26:367228f82b66
    25 class HbView;
    25 class HbView;
    26 class HbListWidget;
    26 class HbListWidget;
    27 class HbSearchPanel;
    27 class HbSearchPanel;
    28 class TsTaskSettings;
    28 class TsTaskSettings;
    29 class SearchMainWindow;
    29 class SearchMainWindow;
    30 class SearchHbApplication;
       
    31 class HbShrinkingVkbHost;
    30 class HbShrinkingVkbHost;
       
    31 class SearchContentInfoDbData;
       
    32 class ContentInfoDbRead;
    32 SEARCH_CLASS( SearchStateProviderTest)
    33 SEARCH_CLASS( SearchStateProviderTest)
    33 
    34 
    34 class SearchUiLoader : public QObject
    35 class SearchUiLoader : public QObject
    35     {
    36     {
    36 Q_OBJECT
    37 Q_OBJECT
    37 public:
    38 public:
    38 
       
    39     /**
    39     /**
    40      * Singleton construtor
    40      * Singleton construtor
    41      * @since S60 ?S60_version.
    41      * @since S60 ?S60_version.
    42      */
    42      */
    43     static SearchUiLoader* instance()
    43     static SearchUiLoader* instance()
    68             {
    68             {
    69             delete m_instance;
    69             delete m_instance;
    70             m_instance = 0;
    70             m_instance = 0;
    71             }
    71             }
    72         }
    72         }
       
    73 
       
    74 private:
       
    75     void readDB();
       
    76 
    73 public slots:
    77 public slots:
    74 
    78 
    75     /**
    79     /**
    76      * Slot to send the application to background fake exit
    80      * Slot to send the application to background fake exit
    77      * @since S60 ?S60_version.
    81      * @since S60 ?S60_version.
    81     /**
    85     /**
    82      * Slot to open vkb 
    86      * Slot to open vkb 
    83      * @since S60 ?S60_version.
    87      * @since S60 ?S60_version.
    84      */
    88      */
    85     void slotbringvkb();
    89     void slotbringvkb();
       
    90 
       
    91     void slotdataChanged();
       
    92 
       
    93 signals:
       
    94     void dbChanged();
    86 
    95 
    87 public:
    96 public:
    88 
    97 
    89     /**
    98     /**
    90      * Function returns the HbListWidget object 
    99      * Function returns the HbListWidget object 
   109      *  @param aUid Unique app Id.
   118      *  @param aUid Unique app Id.
   110      */
   119      */
   111     HbSearchPanel* SearchPanel()
   120     HbSearchPanel* SearchPanel()
   112         {
   121         {
   113         return mSearchPanel;
   122         return mSearchPanel;
       
   123         }
       
   124     QList<SearchContentInfoDbData*> ContentInfoList()
       
   125         {
       
   126         return mContentInfoList;
   114         }
   127         }
   115 private:
   128 private:
   116     /**
   129     /**
   117      * Constructor.
   130      * Constructor.
   118      * @since S60 ?S60_version.     
   131      * @since S60 ?S60_version.     
   182     /**
   195     /**
   183      * flag to validate fake exit
   196      * flag to validate fake exit
   184      * Own.
   197      * Own.
   185      */
   198      */
   186     bool mBringtoForground;
   199     bool mBringtoForground;
       
   200 
       
   201     QList<SearchContentInfoDbData*> mContentInfoList;
       
   202 
       
   203     ContentInfoDbRead* mDb;
   187 private:
   204 private:
   188     SEARCH_FRIEND_CLASS ( SearchStateProviderTest)
   205     SEARCH_FRIEND_CLASS ( SearchStateProviderTest)
   189     };
   206     };
   190 
   207 
   191 class SearchMainWindow : public HbMainWindow
   208 class SearchMainWindow : public HbMainWindow
   220      * signal to send the notification for vkb
   237      * signal to send the notification for vkb
   221      * @since S60 ?S60_version.
   238      * @since S60 ?S60_version.
   222      */
   239      */
   223     void bringvkb();
   240     void bringvkb();
   224     };
   241     };
       
   242 class SearchContentInfoDbData : public QObject
       
   243     {
       
   244 Q_OBJECT
       
   245 public:
       
   246 
       
   247     /**
       
   248      * Constructor.
       
   249      * @since S60 ?S60_version.     
       
   250      * @param aParent Owner.
       
   251      */
       
   252     SearchContentInfoDbData()
       
   253         {
       
   254         mSearchProgress = false;
       
   255         mSelected = false;
       
   256         }
       
   257 
       
   258     /**
       
   259      * Destructor.
       
   260      * @since S60 ?S60_version.
       
   261      */
       
   262     ~SearchContentInfoDbData()
       
   263         {
       
   264         }
       
   265 public:
       
   266     QString getCategoryName()
       
   267         {
       
   268         return mCategoryName;
       
   269         }
       
   270     QString getDisplayName()
       
   271         {
       
   272         return mDisplayName;
       
   273         }
       
   274     QString getDisplayIcon()
       
   275         {
       
   276         return mDisplayIcon;
       
   277         }
       
   278     QString getExceptionString()
       
   279         {
       
   280         return mExceptionString;
       
   281         }
       
   282     QString getBaseApp()
       
   283         {
       
   284         return mBaseApp;
       
   285         }
       
   286     QString getTranslationPath()
       
   287         {
       
   288         return mTranslationPath;
       
   289         }
       
   290     bool getActivityUri()
       
   291         {
       
   292         return mActivityUri;
       
   293         }
       
   294     int getDisplayOrder()
       
   295         {
       
   296         return mDisplayOrder;
       
   297         }
       
   298     bool getSearchProgress()
       
   299         {
       
   300         return mSearchProgress;
       
   301         }
       
   302     bool getSelected()
       
   303         {
       
   304         return mSelected;
       
   305         }
       
   306 
       
   307     void setCategoryName(QString aCategoryName)
       
   308         {
       
   309         mCategoryName = aCategoryName;
       
   310         }
       
   311     void setDisplayName(QString aDisplayName)
       
   312         {
       
   313         mDisplayName = aDisplayName;
       
   314         }
       
   315     void setDisplayIcon(QString aDisplayIcon)
       
   316         {
       
   317         mDisplayIcon = aDisplayIcon;
       
   318         }
       
   319     void setExceptionString(QString aExceptionString)
       
   320         {
       
   321         mExceptionString = aExceptionString;
       
   322         }
       
   323     void setBaseApp(QString aBaseApp)
       
   324         {
       
   325         mBaseApp = aBaseApp;
       
   326         }
       
   327     void setTranslationPath(QString aTranslationPath)
       
   328         {
       
   329         mTranslationPath = aTranslationPath;
       
   330         }
       
   331     void setActivityUri(QString aActivityUri)
       
   332         {
       
   333         mActivityUri = false;
       
   334         if (aActivityUri.length())
       
   335             {
       
   336             mActivityUri = true;
       
   337             }
       
   338         }
       
   339     void setDisplayOrder(int aDisplayOrder)
       
   340         {
       
   341         mDisplayOrder = aDisplayOrder;
       
   342         }
       
   343     void setSearchProgress(bool aSearchProgress)
       
   344         {
       
   345         mSearchProgress = aSearchProgress;
       
   346         }
       
   347     void setSelected(bool aSelected)
       
   348         {
       
   349         mSelected = aSelected;
       
   350         }
       
   351 private:
       
   352     QString mCategoryName;
       
   353     QString mDisplayName;
       
   354     QString mDisplayIcon;
       
   355     QString mExceptionString;
       
   356     bool mActivityUri;
       
   357     QString mBaseApp;
       
   358     int mDisplayOrder;
       
   359     QString mTranslationPath;
       
   360 
       
   361     bool mSearchProgress;
       
   362     bool mSelected;
       
   363     };
   225 
   364 
   226 #endif //SEARCH_CONTROLLER_H
   365 #endif //SEARCH_CONTROLLER_H