2 Copyright 2007 Robert Knight <robertknight@gmail.com>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
23 #include "core/kickoff_export.h"
24 #include "core/kickoffmodel.h"
36 typedef QList
<SearchResult
> ResultList
;
38 class KICKOFF_EXPORT SearchModel
: public KickoffModel
43 SearchModel(QObject
*parent
);
44 virtual ~SearchModel();
47 void setQuery(const QString
& query
);
50 void resultsAvailable(const QStringList
& results
);
51 void resultsAvailable(const ResultList
& results
);
54 void resultsAvailable();
61 class SearchInterface
: public QObject
66 SearchInterface(QObject
*parent
);
68 virtual QString
name() const = 0;
69 virtual void setQuery(const QString
& query
) = 0;
73 void resultsAvailable(const QStringList
& results
);
74 void resultsAvailable(const ResultList
& results
);
77 class ApplicationSearch
: public SearchInterface
82 ApplicationSearch(QObject
*parent
);
84 virtual QString
name() const;
85 virtual void setQuery(const QString
& query
);
88 QString
mimeNameForQuery(const QString
& query
) const;
91 class WebSearch
: public SearchInterface
96 WebSearch(QObject
*parent
);
97 virtual QString
name() const;
98 virtual void setQuery(const QString
& query
);
101 class IndexerSearch
: public SearchInterface
106 IndexerSearch(QObject
*parent
);
107 virtual QString
name() const;
108 virtual void setQuery(const QString
& query
);
113 #endif // SEARCHMODEL_H