textfind.h

00001 /*
00002  * Silence
00003  *
00004  * Copyright (C) 2009 Manuel Unglaub, Yves Adler
00005  *
00006  * This file is part of Silence.
00007  *
00008  * Silence is free software: you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation, version GPLv2 only of the License.
00011  *
00012  * Silence is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016 
00017  * You should have received a copy of the GNU General Public License
00018  * along with Silence.  If not, see <http://www.gnu.org/licenses/>.
00019  */
00020 
00021 #ifndef TEXTFIND_H
00022 #define TEXTFIND_H
00023 
00024 #include <QCheckBox>
00025 #include <QGridLayout>
00026 #include <klineedit.h>
00027 #include <QPushButton>
00028 #include <QTextEdit>
00029 #include <QWidget>
00030 #include <QAction>
00031 
00032 
00042 class TextFind : public QWidget
00043 {
00044     Q_OBJECT
00045 
00046     public:
00052         TextFind(QWidget *parent = 0);
00053 
00058         ~TextFind();    
00059 
00064         bool getCaseSensitivity();
00065 
00070         bool getWholeWord();
00071 
00076         QString getSearchString();
00077 
00082         QString getReplaceString();
00083 
00088         void setFound(bool found);
00089 
00090     
00091     public slots:
00095         void show();
00096 
00100         void showMore();
00101 
00105         void showFull();
00106 
00107     signals:
00111         void findNext();
00112 
00116         void findPrev();
00117 
00121         void replace();
00122 
00126         void replaceAll();
00127 
00132         void searchStringChanged(const QString& searchString);
00133 
00134     private slots:
00135         void findTextChange(const QString &text);
00136         void nextBtnClicked();
00137         void prevBtnClicked();
00138         void replaceBtnClicked();
00139         void replaceAllBtnClicked();
00140 
00141     private:
00142         bool showAll;
00143         QGridLayout *layout;
00144         QHBoxLayout *optionLayout;
00145         QFrame *optionPanel;
00146         KLineEdit *findEdit,
00147                 *replaceEdit;
00148         QPushButton *nextBtn,
00149                     *prevBtn,
00150                     *hideBtn,
00151                     *moreBtn,
00152                     *replaceBtn,
00153                     *replaceAllBtn;
00154         QCheckBox   *caseCbx,
00155                     *wordCbx;
00156         QAction *abortAction;
00157 
00158 };
00159 
00160 #endif // TEXTFIND_H
00161 
Generated on Fri May 14 19:12:50 2010 for Silence by  doxygen 1.6.3