File indexing completed on 2024-04-21 05:51:40
0001 /* 0002 * SPDX-FileCopyrightText: 2002-2003 Jesper K. Pedersen <blackie@kde.org> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-only 0005 **/ 0006 0007 #ifndef VERIFIER_H 0008 #define VERIFIER_H 0009 0010 #include <KTextEdit> 0011 0012 class RegexpHighlighter; 0013 0014 class Verifier : public KTextEdit 0015 { 0016 Q_OBJECT 0017 public: 0018 explicit Verifier(QWidget *parent); 0019 void setHighlighter(RegexpHighlighter *); 0020 0021 public Q_SLOTS: 0022 void verify(const QString ®exp); 0023 void clearRegexp(); 0024 void setCaseSensitive(bool); 0025 void setMinimal(bool); 0026 0027 // I have no way of telling the current paragrahp when highlighting - thefore scrolling to next/prev match 0028 // do not work. Enable this when they work. 0029 // void gotoFirst(); 0030 // void gotoPrev(); 0031 // void gotoNext(); 0032 // void gotoLast(); 0033 // Q_SIGNALS: 0034 // void countChanged( int ); 0035 // void currentChanged( int ); 0036 // void goBackwardPossible( bool ); 0037 // void goForwardPossible( bool ); 0038 0039 // protected: 0040 // void gotoNum( int ); 0041 0042 private: 0043 int _count; 0044 // int _current; 0045 RegexpHighlighter *_highlighter = nullptr; 0046 }; 0047 0048 #endif // VERIFIER_H