parts/grepview/grepdlg.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 * Copyright (C) 1999-2001 by Bernd Gehrmann and the KDevelop Team * 00003 * bernd@kdevelop.org * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 ***************************************************************************/ 00011 00012 #ifndef _GREPDLG_H_ 00013 #define _GREPDLG_H_ 00014 00015 #define IGNORE_SCM_DIRS 00016 00017 #include <qdialog.h> 00018 #include <qlineedit.h> 00019 #include <qcombobox.h> 00020 #include <qcheckbox.h> 00021 #include <kcombobox.h> 00022 00023 00024 class KConfig; 00025 class KURLRequester; 00026 class QPushButton; 00027 00028 class GrepDialog : public QDialog 00029 { 00030 Q_OBJECT 00031 00032 public: 00033 GrepDialog(QWidget *parent=0, const char *name=0); 00034 ~GrepDialog(); 00035 00036 void setPattern(const QString &pattern) 00037 { pattern_combo->setEditText(pattern); } 00038 void setDirectory(const QString &dir) 00039 { dir_combo->setEditText(dir); } 00040 00041 QString patternString() const 00042 { return pattern_combo->currentText(); } 00043 QString templateString() const 00044 { return template_edit->text(); } 00045 QString filesString() const 00046 { return files_combo->currentText(); } 00047 QString directoryString() const 00048 { return dir_combo->currentText(); } 00049 bool recursiveFlag() const 00050 { return recursive_box->isChecked(); } 00051 void show(); 00052 00053 #ifdef IGNORE_SCM_DIRS 00054 bool ignoreSCMDirsFlag() const 00055 { return ignore_scm_box->isChecked(); } 00056 #endif 00057 00058 signals: 00059 void searchClicked(); 00060 00061 private slots: 00062 void templateActivated(int index); 00063 void slotSearchClicked(); 00064 void slotPatternChanged( const QString &); 00065 private: 00066 QLineEdit *template_edit; 00067 QComboBox *pattern_combo, *files_combo; 00068 KComboBox * dir_combo; 00069 KURLRequester * url_requester; 00070 00071 QCheckBox *recursive_box; 00072 #ifdef IGNORE_SCM_DIRS 00073 QCheckBox *ignore_scm_box; 00074 #endif 00075 KConfig* config; 00076 QPushButton *search_button; 00077 }; 00078 00079 00080 #endif 00081 00082 00083 00084 00085