• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Konsole

IncrementalSearchBar.h

Go to the documentation of this file.
00001 /*
00002     Copyright 2006-2008 by Robert Knight <robertknight@gmail.com>
00003 
00004     This program is free software; you can redistribute it and/or modify
00005     it under the terms of the GNU General Public License as published by
00006     the Free Software Foundation; either version 2 of the License, or
00007     (at your option) any later version.
00008 
00009     This program is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012     GNU General Public License for more details.
00013 
00014     You should have received a copy of the GNU General Public License
00015     along with this program; if not, write to the Free Software
00016     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017     02110-1301  USA.
00018 */
00019 
00020 #ifndef INCREMENTALSEARCHBAR_H
00021 #define INCREMENTALSEARCHBAR_H
00022 
00023 // Qt
00024 #include <QtGui/QWidget>
00025 
00026 class QCheckBox;
00027 class QLabel;
00028 class QProgressBar;
00029 class QTimer;
00030 class KLineEdit;
00031 
00032 namespace Konsole
00033 {
00034 
00064 class IncrementalSearchBar : public QWidget
00065 {
00066 Q_OBJECT
00067 
00068 public:
00069     enum Continue
00070     {
00075         ContinueFromTop,
00080         ContinueFromBottom,
00081 
00083         ClearContinue
00084     };
00085 
00090     enum Features
00091     {
00093         HighlightMatches = 1,
00095         MatchCase        = 2,
00097         RegExp           = 4,
00099         AllFeatures      = HighlightMatches | MatchCase | RegExp
00100     };
00101 
00106     IncrementalSearchBar(Features features , QWidget* parent = 0);
00107 
00119     void setFoundMatch( bool match );
00120 
00127     void setContinueFlag( Continue flag );
00128 
00130     QString searchText();
00135     bool highlightMatches();
00140     bool matchCase();
00145     bool matchRegExp();
00146 
00147     // reimplemented
00148     virtual void setVisible( bool visible );
00149 signals:
00151     void searchChanged( const QString& text );
00153     void findNextClicked();
00155     void findPreviousClicked();
00160     void highlightMatchesToggled(bool);
00165     void matchCaseToggled(bool);
00170     void matchRegExpToggled(bool);
00172     void closeClicked();
00173 
00174 protected:
00175     virtual bool eventFilter( QObject* watched , QEvent* event );
00176 
00177 private slots:
00178     void notifySearchChanged();
00179 
00180 private:
00181     bool _foundMatch;
00182     QCheckBox* _matchCaseBox;
00183     QCheckBox* _matchRegExpBox;
00184     QCheckBox* _highlightBox;
00185 
00186     KLineEdit* _searchEdit;
00187     QLabel* _continueLabel;
00188     QProgressBar* _progress;
00189 
00190     QTimer* _searchTimer;
00191 };
00192 
00193 }
00194 #endif // INCREMENTALSEARCHBAR_H

Konsole

Skip menu "Konsole"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • Konsole
  • Libraries
  •   libkonq
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal