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.
53 lines
1.6 KiB
53 lines
1.6 KiB
15 years ago
|
/*
|
||
|
Copyright (C) 2002, David Faure <david@mandrakesoft.com>
|
||
|
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 KREPLACETEST_H
|
||
|
#define KREPLACETEST_H
|
||
|
|
||
15 years ago
|
#include <tqobject.h>
|
||
|
#include <tqstringlist.h>
|
||
15 years ago
|
|
||
|
class KReplace;
|
||
|
|
||
14 years ago
|
class KReplaceTest : public TQObject
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
15 years ago
|
KReplaceTest( const TQStringList& text, int button )
|
||
14 years ago
|
: TQObject( 0L ), m_text( text ), m_replace( 0 ), m_button( button ) {}
|
||
15 years ago
|
|
||
14 years ago
|
void replace( const TQString &pattern, const TQString &replacement, long options );
|
||
15 years ago
|
void print();
|
||
15 years ago
|
const TQStringList& textLines() const { return m_text; }
|
||
15 years ago
|
|
||
|
public slots:
|
||
15 years ago
|
void slotHighlight( const TQString &, int, int );
|
||
15 years ago
|
void slotReplaceNext();
|
||
14 years ago
|
void slotReplace(const TQString &text, int replacementIndex, int replacedLength, int matchedLength);
|
||
15 years ago
|
|
||
|
private:
|
||
15 years ago
|
TQStringList::Iterator m_currentPos;
|
||
|
TQStringList m_text;
|
||
14 years ago
|
KReplace* m_replace;
|
||
15 years ago
|
bool m_needEventLoop;
|
||
|
int m_button;
|
||
|
};
|
||
|
|
||
|
#endif
|