1
#ifndef SEARCHRESULTWIDGET_H
2
#define SEARCHRESULTWIDGET_H
4
#include "mostQtHeaders.h"
6
#include "searchquery.h"
7
#include "qdocumentsearch.h"
10
class SearchResultWidget : public QWidget
14
explicit SearchResultWidget(QWidget *parent = 0);
16
void setQuery(SearchQuery *sq);
17
SearchQuery::Scope searchScope() const;
20
void jumpToSearchResult(QDocument *doc, int lineNumber, const SearchQuery *query);
21
void runSearch(SearchQuery *query);
27
void clickedSearchResult(const QModelIndex &index);
31
QLabel *searchTypeLabel;
32
QLabel *searchTextLabel;
33
QPushButton *searchAgainButton;
34
QLineEdit *replaceTextEdit;
35
QPushButton *replaceButton;
36
QComboBox *searchScopeBox;
37
QTreeView *searchTree;
42
void updateSearchScopeBox(SearchQuery::Scope sc);
46
class SearchTreeDelegate: public QItemDelegate {
49
SearchTreeDelegate(QObject *parent = 0);
51
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
52
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
56
#endif // SEARCHRESULTWIDGET_H