~ubuntu-branches/debian/sid/texstudio/sid

« back to all changes in this revision

Viewing changes to searchresultwidget.h

  • Committer: Package Import Robot
  • Author(s): Tom Jampen
  • Date: 2015-09-13 21:19:38 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20150913211938-r3ro0cmgzo7w6frp
Tags: 2.10.0+debian-1
* Merging upstream version 2.10.0+debian.
* Updating 01-use-libhunspell.patch.
* Regenerating 03-disable-auto-update.patch.
* Updating 04-no-qt-translations.patch.
* Removing 05-fix-mercurial-revision.patch, included upstream.
* Updating copyright file to match source code changes.
* Updating rules file to reflect new changelog location.
* Removing no longer used lintian-override.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef SEARCHRESULTWIDGET_H
 
2
#define SEARCHRESULTWIDGET_H
 
3
 
 
4
#include "mostQtHeaders.h"
 
5
 
 
6
#include "searchquery.h"
 
7
#include "qdocumentsearch.h"
 
8
#include "qdocument.h"
 
9
 
 
10
class SearchResultWidget : public QWidget
 
11
{
 
12
        Q_OBJECT
 
13
public:
 
14
        explicit SearchResultWidget(QWidget *parent = 0);
 
15
        
 
16
        void setQuery(SearchQuery *sq);
 
17
        SearchQuery::Scope searchScope() const;
 
18
 
 
19
signals:
 
20
        void jumpToSearchResult(QDocument *doc, int lineNumber, const SearchQuery *query);
 
21
        void runSearch(SearchQuery *query);
 
22
 
 
23
public slots:
 
24
        void clearSearch();
 
25
 
 
26
private slots:
 
27
        void clickedSearchResult(const QModelIndex &index);
 
28
        void updateSearch();
 
29
 
 
30
private:
 
31
        QLabel *searchTypeLabel;
 
32
        QLabel *searchTextLabel;
 
33
        QPushButton *searchAgainButton;
 
34
        QLineEdit *replaceTextEdit;
 
35
        QPushButton *replaceButton;
 
36
        QComboBox *searchScopeBox;
 
37
        QTreeView *searchTree;
 
38
 
 
39
        SearchQuery *query;
 
40
 
 
41
        void retranslateUi();
 
42
        void updateSearchScopeBox(SearchQuery::Scope sc);
 
43
};
 
44
 
 
45
 
 
46
class SearchTreeDelegate: public QItemDelegate {
 
47
        Q_OBJECT
 
48
public:
 
49
        SearchTreeDelegate(QObject *parent = 0);
 
50
protected:
 
51
        void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
 
52
        QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
 
53
};
 
54
 
 
55
 
 
56
#endif // SEARCHRESULTWIDGET_H