~ubuntu-branches/ubuntu/precise/konsole/precise-proposed

« back to all changes in this revision

Viewing changes to src/IncrementalSearchBar.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-16 13:14:43 UTC
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: package-import@ubuntu.com-20111216131443-rhdplbmmuxntat3k
Tags: upstream-4.7.90
ImportĀ upstreamĀ versionĀ 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
// Qt
24
24
#include <QtGui/QWidget>
25
 
#include <QBitArray>
 
25
#include <QtCore/QBitArray>
26
26
 
27
27
class QCheckBox;
28
28
class QLabel;
29
 
class QProgressBar;
30
29
class QTimer;
31
30
class KLineEdit;
32
31
 
33
32
namespace Konsole
34
33
{
35
34
 
36
 
/** 
37
 
 * A widget which allows users to search incrementally through a document for a 
 
35
/**
 
36
 * A widget which allows users to search incrementally through a document for a
38
37
 * a text string or regular expression.
39
38
 *
40
39
 * The widget consists of a text box into which the user can enter their search text and
44
43
 * the document for the new text should begin immediately and the active view of the document
45
44
 * should jump to display any matches if found.  setFoundMatch() should be called whenever the
46
45
 * search text changes to indicate whether a match for the text was found in the document.
47
 
 * 
48
 
 * findNextClicked() and findPreviousClicked() signals are emitted when the user presses buttons 
 
46
 *
 
47
 * findNextClicked() and findPreviousClicked() signals are emitted when the user presses buttons
49
48
 * to find next and previous matches respectively.
50
49
 *
51
 
 * The first indicates whether searches are case sensitive.  
 
50
 * The first indicates whether searches are case sensitive.
52
51
 * The matchCaseToggled() signal is emitted when this is changed.
53
 
 * The second indicates whether the search text should be treated as a plain string or 
 
52
 * The second indicates whether the search text should be treated as a plain string or
54
53
 * as a regular expression.
55
54
 * The matchRegExpToggled() signal is emitted when this is changed.
56
55
 */
60
59
 
61
60
public:
62
61
 
63
 
    /** 
 
62
    /**
64
63
     * This enum defines the options that can be checked.
65
64
     */
66
65
    enum SearchOptions
73
72
        RegExp           = 2
74
73
    };
75
74
 
76
 
    /** 
77
 
     * Constructs a new incremental search bar with the given parent widget 
 
75
    /**
 
76
     * Constructs a new incremental search bar with the given parent widget
78
77
     */
79
78
    explicit IncrementalSearchBar(QWidget* parent = 0);
80
79
 
81
80
    /* Returns search options that are checked */
82
81
    const QBitArray optionsChecked();
83
82
 
84
 
    /** 
85
 
     * Sets an indicator for the user as to whether or not a match for the 
 
83
    /**
 
84
     * Sets an indicator for the user as to whether or not a match for the
86
85
     * current search text was found in the document.
87
86
     *
88
87
     * The indicator will not be shown if the search text is empty ( because
106
105
    void findNextClicked();
107
106
    /** Emitted when the user clicks the button to find the previous match */
108
107
    void findPreviousClicked();
109
 
    /** 
 
108
    /**
110
109
     * Emitted when the user toggles the checkbox to indicate whether
111
110
     * matches for the search text should be highlighted
112
111
     */
118
117
    void matchCaseToggled(bool);
119
118
    /**
120
119
     * Emitted when the user toggles the checkbox to indicate whether
121
 
     * the search text should be treated as a plain string or a regular expression 
 
120
     * the search text should be treated as a plain string or a regular expression
122
121
     */
123
122
    void matchRegExpToggled(bool);
124
123
    /** Emitted when the close button is clicked */
135
134
    bool _foundMatch;
136
135
 
137
136
    KLineEdit* _searchEdit;
138
 
    QProgressBar* _progress;
139
137
    QAction* _caseSensitive;
140
138
    QAction* _regExpression;
141
139
    QAction* _highlightMatches;