parts/replace/replace_widget.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 * Copyright (C) 2003 by Jens Dagerbo * 00003 * jens.dagerbo@swipnet.se * 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 __REPLACE_WIDGET_H__ 00013 #define __REPLACE_WIDGET_H__ 00014 00015 #include <ktexteditor/editinterface.h> 00016 00017 #include <qwidget.h> 00018 #include <qstring.h> 00019 00020 class QPushButton; 00021 class QListViewItem; 00022 class QDialog; 00023 00024 class ReplacePart; 00025 class ReplaceDlgImpl; 00026 class ReplaceItem; 00027 class ReplaceView; 00028 00029 class ReplaceWidget : public QWidget 00030 { 00031 Q_OBJECT 00032 00033 public: 00034 ReplaceWidget(ReplacePart *part); 00035 00036 public slots: 00037 void showDialog(); 00038 void stopButtonClicked( KDevPlugin * ); 00039 00040 private slots: 00041 void find(); 00042 void replace(); 00043 void clear(); 00044 void editDocument( const QString & ,int ); 00045 00046 private: 00047 bool showReplacements(); 00048 bool makeReplacements(); 00049 bool shouldTerminate(); 00050 00051 QString relativeProjectPath( QString ); 00052 QString fullProjectPath( QString ); 00053 00054 QStringList workFiles(); 00055 QStringList allProjectFiles(); 00056 QStringList subProjectFiles( QString const & ); 00057 QStringList openProjectFiles(); 00058 00059 KTextEditor::EditInterface * getEditInterfaceForFile( QString const & file ); 00060 00061 ReplacePart * m_part; 00062 ReplaceDlgImpl * m_dialog; 00063 00064 ReplaceView * _listview; 00065 QPushButton * _cancel; 00066 QPushButton * _replace; 00067 00068 bool _terminateOperation; 00069 }; 00070 00071 00072 #endif