qcpix/tsrc/samplesearch/searchhandler.h
changeset 15 cf5c74390b98
parent 0 671dee74050a
equal deleted inserted replaced
10:afe194b6b1cd 15:cf5c74390b98
    18 #include <QtCore>
    18 #include <QtCore>
    19 #include <QCoreApplication>
    19 #include <QCoreApplication>
    20 #include <QDebug>
    20 #include <QDebug>
    21 #include <QTest>
    21 #include <QTest>
    22 
    22 
    23 class QCPixSearcher;
    23 class CpixSearcher;
    24 class QCPixDocument;
    24 class CpixDocument;
    25 
    25 
    26 class CSearchHandler: public QObject
    26 class CSearchHandler: public QObject
    27     {
    27     {
    28 Q_OBJECT
    28 Q_OBJECT
    29 public:
    29 public:
    30     CSearchHandler();
    30     CSearchHandler();
    31     
    31     
    32 signals:
    32 signals:
    33     void handleSearchResult(int, int);
    33     void handleSearchResult(int, int);
    34     void handleAsyncSearchResult(int, int);
    34     void handleAsyncSearchResult(int, int);
    35     void handleDocument(int aError, QCPixDocument* aDoc);
    35     void handleDocument(int aError, CpixDocument* aDoc);
    36 
    36 
    37 private slots:
    37 private slots:
    38     void __handleSearchResult(int aError, int estimatedResultCount);
    38     void __handleSearchResult(int aError, int estimatedResultCount);
    39     void __getDocumentAsync(int aError, QCPixDocument* aDocument );
    39     void __getDocumentAsync(int aError, CpixDocument* aDocument );
    40 
    40 
    41 public:
    41 public:
    42     ~CSearchHandler();
    42     ~CSearchHandler();
    43     QCPixDocument* getDocumentAtIndex(int aIndex);
    43     CpixDocument* getDocumentAtIndex(int aIndex);
    44     void getDocumentAsyncAtIndex(int aIndex);
    44     void getDocumentAsyncAtIndex(int aIndex);
    45     void search(QString aSearchString);
    45     void search(QString aSearchString);
    46     void searchAsync(QString aSearchString);
    46     void searchAsync(QString aSearchString);
    47     void cancelLastSearch();
    47     void cancelLastSearch();
    48     int getSearchResultCount();
    48     int getSearchResultCount();
    49 
    49 
    50 private:
    50 private:
    51     QCPixSearcher *iSearchInterface;
    51     CpixSearcher *iSearchInterface;
    52     QList<QVariantMap> searchResults;
    52     QList<QVariantMap> searchResults;
    53     int iSearchresultCount;
    53     int iSearchresultCount;
    54     };
    54     };