~ubuntu-branches/ubuntu/karmic/kdevelop/karmic

« back to all changes in this revision

Viewing changes to parts/replace/replace_widget.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2009-05-25 19:34:26 UTC
  • mfrom: (1.1.11 upstream) (2.3.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090525193426-hdntv90rvflyew8g
Tags: 4:3.9.93-1ubuntu1
* Merge from Debian experimental, remaining changes:
  - Conflict/replace -kde4 packages

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
 *   Copyright (C) 2003 by Jens Dagerbo                                    *
3
 
 *   jens.dagerbo@swipnet.se                                               *
4
 
 *                                                                         *
5
 
 *   This program is free software; you can redistribute it and/or modify  *
6
 
 *   it under the terms of the GNU General Public License as published by  *
7
 
 *   the Free Software Foundation; either version 2 of the License, or     *
8
 
 *   (at your option) any later version.                                   *
9
 
 *                                                                         *
10
 
 ***************************************************************************/
11
 
 
12
 
#ifndef __REPLACE_WIDGET_H__
13
 
#define __REPLACE_WIDGET_H__
14
 
 
15
 
#include <ktexteditor/editinterface.h>
16
 
 
17
 
#include <qwidget.h>
18
 
#include <qstring.h>
19
 
 
20
 
class QPushButton;
21
 
class QListViewItem;
22
 
class QDialog;
23
 
 
24
 
class ReplacePart;
25
 
class ReplaceDlgImpl;
26
 
class ReplaceItem;
27
 
class ReplaceView;
28
 
 
29
 
class ReplaceWidget : public QWidget
30
 
{
31
 
    Q_OBJECT
32
 
 
33
 
public:
34
 
    ReplaceWidget(ReplacePart *part);
35
 
 
36
 
public slots:
37
 
    void showDialog();
38
 
    void stopButtonClicked( KDevPlugin * );
39
 
 
40
 
protected:
41
 
    virtual void focusInEvent(QFocusEvent *e);
42
 
 
43
 
private slots:
44
 
    void find();
45
 
    void replace();
46
 
    void clear();
47
 
    void editDocument( const QString & ,int );
48
 
    void setCursorPos( KParts::Part *part, uint line, uint col );
49
 
    void cursorPos( KParts::Part *part, uint * line, uint * col );
50
 
 
51
 
private:
52
 
    bool showReplacements();
53
 
    bool makeReplacements();
54
 
    bool shouldTerminate();
55
 
 
56
 
    QString relativeProjectPath( QString );
57
 
    QString fullProjectPath( QString );
58
 
 
59
 
    QStringList workFiles();
60
 
    QStringList allProjectFiles();
61
 
    QStringList subProjectFiles( QString const & );
62
 
    QStringList openProjectFiles();
63
 
 
64
 
    KTextEditor::EditInterface * getEditInterfaceForFile( QString const & file );
65
 
 
66
 
    ReplacePart * m_part;
67
 
    ReplaceDlgImpl * m_dialog;
68
 
 
69
 
    ReplaceView * _listview;
70
 
    QPushButton * _cancel;
71
 
    QPushButton * _replace;
72
 
 
73
 
    uint calledCol;
74
 
    uint calledLine;
75
 
    QString calledUrl;
76
 
 
77
 
    bool _terminateOperation;
78
 
};
79
 
 
80
 
 
81
 
#endif