You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.6 KiB
60 lines
1.6 KiB
15 years ago
|
/*
|
||
|
Copyright (C) 2004, Arend van Beelen jr. <arend@auton.nl>
|
||
|
This file is part of the KDE project
|
||
|
|
||
|
This library is free software; you can redistribute it and/or
|
||
|
modify it under the terms of the GNU Library General Public
|
||
|
License version 2, as published by the Free Software Foundation.
|
||
|
|
||
|
This library is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
Library General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU Library General Public License
|
||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
|
||
|
#ifndef KFINDTEST_H
|
||
|
#define KFINDTEST_H
|
||
|
|
||
14 years ago
|
#include <tqobject.h>
|
||
|
#include <tqstringlist.h>
|
||
15 years ago
|
|
||
|
class KFind;
|
||
|
|
||
14 years ago
|
class KFindTest : public TQObject
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
14 years ago
|
KFindTest(const TQStringList &text) :
|
||
|
TQObject(0),
|
||
14 years ago
|
m_find(0),
|
||
15 years ago
|
m_text(text),
|
||
|
m_line(0)
|
||
|
{}
|
||
|
|
||
14 years ago
|
void find(const TQString &pattern, long options = 0);
|
||
|
void findNext(const TQString &pattern = TQString::null);
|
||
15 years ago
|
|
||
14 years ago
|
void changeText(uint line, const TQString &text);
|
||
15 years ago
|
|
||
14 years ago
|
const TQStringList &hits() const { return m_hits; }
|
||
15 years ago
|
void clearHits() { m_hits.clear(); }
|
||
|
|
||
|
public slots:
|
||
14 years ago
|
void slotHighlight(const TQString &text, int index, int matchedLength);
|
||
15 years ago
|
void slotHighlight(int id, int index, int matchedLengthlength);
|
||
|
|
||
|
private:
|
||
14 years ago
|
KFind *m_find;
|
||
14 years ago
|
TQStringList m_text;
|
||
15 years ago
|
uint m_line;
|
||
14 years ago
|
TQStringList m_hits;
|
||
15 years ago
|
};
|
||
|
|
||
|
#endif
|