3
* Copyright (C) 2011-2013 by Kåre Särs <kare.sars@iki.fi>
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program in a file called COPYING; if not, write to
17
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21
#ifndef _SEARCH_OPEN_FILES_H_
22
#define _SEARCH_OPEN_FILES_H_
27
#include <ktexteditor/document.h>
29
class SearchOpenFiles: public QObject
34
SearchOpenFiles(QObject *parent = 0);
36
void startSearch(const QList<KTextEditor::Document*> &list,const QRegExp ®exp);
42
/// return 0 on success or a line number where we stopped.
43
int searchOpenFile(KTextEditor::Document *doc, const QRegExp ®Exp, int startLine);
46
void doSearchNextFile(int startLine);
49
int searchSingleLineRegExp(KTextEditor::Document *doc, const QRegExp ®Exp, int startLine);
50
int searchMultiLineRegExp(KTextEditor::Document *doc, const QRegExp ®Exp, int startLine);
53
void searchNextFile(int startLine);
54
void matchFound(const QString &url, const QString &fileName, int line, int column, const QString &lineContent, int matchLen);
56
void searching(const QString &file);
59
QList<KTextEditor::Document*> m_docList;
64
QVector<int> m_lineStart;