~ubuntu-branches/ubuntu/lucid/kde4libs/lucid-security

« back to all changes in this revision

Viewing changes to kate/spellcheck/ontheflycheck.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-02-26 22:37:28 UTC
  • mfrom: (1.1.45 upstream)
  • Revision ID: james.westby@ubuntu.com-20100226223728-yvwm9o0ojbq8n3vn
Tags: 4:4.4.1-0ubuntu1
* New upstream release
  - Bump build-depends
  - Drop kubuntu_73_khtml_scroll_fix.diff fixed by upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* 
2
 
 * Copyright (C) 2008-2009 by Michel Ludwig (michel.ludwig@kdemail.net)
3
 
 * Copyright (C) 2009 by Joseph Wenninger (jowenn@kde.org)
 
1
/*  This file is part of the KDE libraries and the Kate part.
 
2
 *
 
3
 *  Copyright (C) 2008-2010 by Michel Ludwig <michel.ludwig@kdemail.net>
 
4
 *  Copyright (C) 2009 by Joseph Wenninger <jowenn@kde.org>
4
5
 *
5
6
 *  This library is free software; you can redistribute it and/or
6
7
 *  modify it under the terms of the GNU Library General Public
12
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
14
 *  Library General Public License for more details.
14
15
 *
15
 
 * You should have received a copy of the GNU Library General Public License
16
 
 * along with this library; see the file COPYING.LIB.  If not, write to
17
 
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
 
 * Boston, MA 02110-1301, USA.
19
 
*/
 
16
 *  You should have received a copy of the GNU Library General Public License
 
17
 *  along with this library; see the file COPYING.LIB.  If not, write to
 
18
 *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
19
 *  Boston, MA 02110-1301, USA.
 
20
 */
20
21
 
21
22
#ifndef ONTHEFLYCHECK_H
22
23
#define ONTHEFLYCHECK_H
26
27
#include <QObject>
27
28
#include <QPair>
28
29
#include <QString>
 
30
#include <QSet>
29
31
 
30
 
#include <ktexteditor/document.h>
31
 
#include <ktexteditor/rangefeedback.h>
32
 
#include <sonnet/backgroundchecker.h>
 
32
#include <ktexteditor/smartrangewatcher.h>
33
33
#include <sonnet/speller.h>
34
34
 
35
35
#include "katedocument.h"
36
 
#include "kateview.h"
 
36
 
 
37
namespace Sonnet {
 
38
  class BackgroundChecker;
 
39
}
37
40
 
38
41
class KateOnTheFlyChecker : public QObject, private KTextEditor::SmartRangeWatcher {
39
42
  Q_OBJECT
67
70
    void refreshSpellCheck(const KTextEditor::Range &range = KTextEditor::Range::invalid());
68
71
 
69
72
    void updateInstalledSmartRanges(KateView *view);
70
 
    void updateInstalledSmartRanges();
71
73
 
72
74
  protected:
73
75
    KateDocument *const m_document;
110
112
    virtual void caretEnteredRange(KTextEditor::SmartRange *range, KTextEditor::View *view);
111
113
    virtual void caretExitedRange(KTextEditor::SmartRange *range, KTextEditor::View *view);
112
114
 
113
 
    QList<KTextEditor::SmartRange*> m_eliminatedRanges;
 
115
    QSet<KTextEditor::SmartRange*> m_eliminatedRanges;
114
116
 
115
117
    QMap<KTextEditor::View*, KTextEditor::Range> m_displayRangeMap;
116
118
    QList<KTextEditor::SmartRange*> m_myranges;
119
121
 
120
122
    void deleteSmartRangeLater(KTextEditor::SmartRange *range);
121
123
    void deleteSmartRangesLater(const QList<KTextEditor::SmartRange*>& list);
 
124
    void deleteSmartRangeQuickly(KTextEditor::SmartRange *range);
122
125
    void stopCurrentSpellCheck();
123
126
 
124
127
  protected Q_SLOTS: