~ubuntu-branches/ubuntu/wily/tora/wily-proposed

« back to all changes in this revision

Viewing changes to src/tosearchreplace.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Meskes
  • Date: 2009-09-11 12:37:52 UTC
  • mfrom: (1.2.8 upstream) (3.3.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090911123752-qhu322xlclo2hpqu
Tags: 2.1.0-1
* New upstream version, the rebuild closes: #540046.
* Bumped Standards-Version to 3.8.3, no changes needed.
* New project homepage.
* Removed no longer needed 01_missing_includes.dpatch.
* Removed no longer used dh_desktop call.
* Added README.source file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 * 
8
8
 * Portions Copyright (C) 2000-2001 Underscore AB
9
9
 * Portions Copyright (C) 2003-2005 Quest Software, Inc.
10
 
 * Portions Copyright (C) 2004-2008 Numerous Other Contributors
 
10
 * Portions Copyright (C) 2004-2009 Numerous Other Contributors
11
11
 * 
12
12
 * This program is free software; you can redistribute it and/or
13
13
 * modify it under the terms of the GNU General Public License
51
51
class toMarkedText;
52
52
class toResultContentEditor;
53
53
 
 
54
 
 
55
//! \brief A helper namespace for Search related tools
 
56
namespace Search
 
57
{
 
58
    enum SearchMode {
 
59
        SearchPlaintext = 0,
 
60
        SearchRegexp
 
61
    };
 
62
 
 
63
    enum SearchDirection {
 
64
        SearchUndefined = -1,
 
65
        SearchForward = 0,
 
66
        SearchBackward = 1
 
67
    };
 
68
}; // namespace Search
 
69
 
 
70
 
54
71
class toSearchReplace : public QDialog, public Ui::toSearchReplaceUI,
55
72
            public toHelpContext, public toEditWidget::editHandler
56
73
{
57
74
    Q_OBJECT
58
75
 
59
76
    toEditWidget *Target;
 
77
 
60
78
public:
61
79
    toSearchReplace(QWidget *parent);
62
80
    ~toSearchReplace()
63
81
    {
64
82
        toEditWidget::delHandler(this);
65
 
    }
66
 
 
67
 
    virtual void show();
68
 
    bool findString(const QString &text, int &pos, int &endPos);
 
83
    };
 
84
 
 
85
    void show();
 
86
 
 
87
    QString currentSearchText();
 
88
    Search::SearchMode searchMode();
 
89
    bool wholeWords();
 
90
    bool caseSensitive();
 
91
 
69
92
    virtual void receivedFocus(toEditWidget *widget);
70
93
    virtual void lostFocus(toEditWidget *)
71
94
    {
72
95
        receivedFocus(NULL);
73
96
    }
74
 
    bool searchNextAvailable(void);
 
97
 
75
98
public slots:
76
 
    virtual void searchNext();
 
99
    void searchNext();
 
100
    void searchPrevious();
77
101
private slots:
78
 
    virtual void replaceAll();
79
 
    virtual void replace();
80
 
    virtual void search();
81
 
    virtual void searchChanged();
82
 
    virtual void displayHelp();
 
102
    void replaceAll();
 
103
    void replace();
 
104
    void searchChanged(const QString & text);
 
105
    void displayHelp();
83
106
};
84
107
 
85
108
#endif