filebrowser/ui/inc/searchview.h
branchGCC_SURGE
changeset 37 c20154ccf3c0
parent 35 98924d2efce9
equal deleted inserted replaced
20:ba8a586c45f1 37:c20154ccf3c0
    16 */
    16 */
    17 
    17 
    18 #ifndef SEARCHVIEW_H
    18 #ifndef SEARCHVIEW_H
    19 #define SEARCHVIEW_H
    19 #define SEARCHVIEW_H
    20 
    20 
    21 #include <hbview.h>
    21 #include <HbView>
    22 #include <hbmainwindow.h>
       
    23 
    22 
    24 #include <qdatetime.h>
    23 #include <QDateTime>
    25 
    24 
    26 class QDir;
    25 class QStringList;
       
    26 
    27 class EngineWrapper;
    27 class EngineWrapper;
    28 class QStringList;
       
    29 class HbDataForm;
    28 class HbDataForm;
    30 class HbDataFormModelItem;
    29 class HbDataFormModelItem;
       
    30 class HbProgressDialog;
    31 
    31 
    32 /**
    32 /**
    33   * Settings class that is used for 
    33   * Settings class that is used for 
    34   */
    34   */
    35 class SearchAttributes
    35 class SearchAttributes
    49  * search results class.
    49  * search results class.
    50  */
    50  */
    51 class SearchResults
    51 class SearchResults
    52 {
    52 {
    53 public:
    53 public:
    54     int         mNumberOfFoundFiles;
    54     int mNumberOfFoundFiles;
    55     QStringList* mFoundFilesList;
    55     QStringList *mFoundFilesList;
    56 };
    56 };
    57 
    57 
    58 class SearchView : public HbView
    58 class SearchView : public HbView
    59 {
    59 {
    60     Q_OBJECT
    60     Q_OBJECT
    61 
    61 
    62 public:
    62 public:
    63     SearchView(HbView &mainView, HbMainWindow &mainWindow, EngineWrapper &engineWrapper);
    63     explicit SearchView(EngineWrapper &engineWrapper);
    64     ~SearchView();
    64     ~SearchView();
    65     void open(const QString &path);
    65     void open(const QString &path);
    66 
    66 
       
    67 signals:
       
    68     void finished(bool ok);
    67 
    69 
    68 private slots:
    70 private slots:
    69     void backButtonClicked();
    71     void accept();
    70     void startFileSearch();
    72     void reject();
       
    73 
       
    74 private:
       
    75     void initDataForm();
       
    76     void createToolbar();
    71     void loadAttributes();
    77     void loadAttributes();
    72     void readFormItems();
    78     void readFormItems();
    73     
    79 
    74 private:
    80     void startFileSearch();
    75     void fileSearchResults();
    81     void fileSearchResults();
    76 
    82 
    77     /* Main Window of folderbrowser */
    83 private:
    78     HbMainWindow &mMainWindow;
       
    79     /* Main View of folderbrowser*/
       
    80     HbView &mMainView;
       
    81     /* EngineWrapper */
    84     /* EngineWrapper */
    82     EngineWrapper &mEngineWrapper;  
    85     EngineWrapper &mEngineWrapper;  
    83 
    86 
    84     /* Search attributes */
    87     /* Search attributes */
    85     SearchAttributes mAttributes;    
    88     SearchAttributes mAttributes;    
    95     HbDataFormModelItem *mMaxSize;
    98     HbDataFormModelItem *mMaxSize;
    96     HbDataFormModelItem *mMinDate;
    99     HbDataFormModelItem *mMinDate;
    97     HbDataFormModelItem *mMaxDate;
   100     HbDataFormModelItem *mMaxDate;
    98 
   101 
    99     QString mPath;
   102     QString mPath;
       
   103 
       
   104     HbProgressDialog *mProgressDialog;
   100 };
   105 };
   101 
   106 
   102 #endif // SEARCHVIEW_H
   107 #endif // SEARCHVIEW_H