~neon/pykde4/master

« back to all changes in this revision

Viewing changes to sip/ktexteditor/smartrange.sip

  • Committer: Simon Edwards
  • Date: 2007-09-02 19:43:19 UTC
  • Revision ID: git-v1:6b8df0c7009f6b218f54589a9bc313cd8c4f82b9

Initial drop of PyKDE4 - Python bindings for the KDE API. See the README file
for more info about the current state of PyKDE4.


svn path=/trunk/KDE/kdebindings/python/pykde4/; revision=707731

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
//     Copyright 2007 Jim Bublitz <jbublitz@nwinternet.com>
 
3
//     Earlier copyrights 1998 - 2006 Jim Bublitz also apply
 
4
 
 
5
 
 
6
//                 Generated by preSip
 
7
//            PyKDE4 module ktexteditor  version KDE 3.92.0
 
8
 
 
9
 
 
10
// This file is part of PyKDE4.
 
11
 
 
12
// PyKDE4 is free software; you can redistribute it and/or modify
 
13
// it under the terms of the GNU Lesser General Public License as
 
14
// published by the Free Software Foundation; either version 2.1 of
 
15
// the License, or (at your option) any later version.
 
16
 
 
17
// PyKDE4 is distributed in the hope that it will be useful,
 
18
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
19
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
20
// GNU General Public License for more details.
 
21
 
 
22
// You should have received a copy of the GNU General Public License
 
23
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
24
 
 
25
namespace KTextEditor
 
26
{
 
27
 
 
28
class SmartRange : KTextEditor::Range
 
29
{
 
30
%TypeHeaderCode
 
31
#include <smartrange.h>
 
32
%End
 
33
 
 
34
 
 
35
public:
 
36
 
 
37
    enum InsertBehavior
 
38
    {
 
39
        DoNotExpand, 
 
40
        ExpandLeft, 
 
41
        ExpandRight
 
42
    };
 
43
 
 
44
    typedef QFlags<KTextEditor::SmartRange::InsertBehavior> InsertBehaviors;
 
45
    virtual bool         isSmartRange () const;
 
46
    virtual KTextEditor::SmartRange* toSmartRange () const;
 
47
    virtual void         setRange (const KTextEditor::Range&);
 
48
    KTextEditor::SmartCursor& smartStart ();
 
49
    KTextEditor::SmartCursor& smartEnd ();
 
50
    virtual bool         confineToRange (const KTextEditor::Range&);
 
51
    virtual bool         expandToRange (const KTextEditor::Range&);
 
52
    KTextEditor::Document* document () const;
 
53
    virtual QStringList  text (bool = 0) const;
 
54
    virtual bool         replaceText (const QStringList&, bool = 0);
 
55
    virtual bool         removeText (bool = 0);
 
56
    KTextEditor::SmartRange::InsertBehaviors insertBehavior () const;
 
57
    void                 setInsertBehavior (KTextEditor::SmartRange::InsertBehaviors);
 
58
    KTextEditor::SmartRange* parentRange () const;
 
59
    virtual void         setParentRange (KTextEditor::SmartRange*);
 
60
    bool                 hasParent (KTextEditor::SmartRange*) const;
 
61
    int                  depth () const;
 
62
    KTextEditor::SmartRange* topParentRange () const;
 
63
    const QList<KTextEditor::SmartRange*>& childRanges () const;
 
64
    void                 clearChildRanges ();
 
65
    void                 deleteChildRanges ();
 
66
    void                 clearAndDeleteChildRanges ();
 
67
    KTextEditor::SmartRange* childBefore (const KTextEditor::SmartRange*) const;
 
68
    KTextEditor::SmartRange* childAfter (const KTextEditor::SmartRange*) const;
 
69
    KTextEditor::SmartRange* mostSpecificRange (const KTextEditor::Range&) const;
 
70
    KTextEditor::SmartRange* firstRangeContaining (const KTextEditor::Cursor&) const;
 
71
    KTextEditor::SmartRange* deepestRangeContaining (const KTextEditor::Cursor&, QStack<KTextEditor::SmartRange*>* = 0, QStack<KTextEditor::SmartRange*>* = 0) const;
 
72
    KTextEditor::Attribute::Ptr attribute () const;
 
73
    void                 setAttribute (KTextEditor::Attribute::Ptr);
 
74
    void                 associateAction (KAction*);
 
75
    void                 dissociateAction (KAction*);
 
76
    const QList<KAction*>& associatedActions () const;
 
77
    void                 clearAssociatedActions ();
 
78
    KTextEditor::SmartRangeNotifier* primaryNotifier ();
 
79
    const QList<KTextEditor::SmartRangeNotifier*> notifiers () const;
 
80
    void                 addNotifier (KTextEditor::SmartRangeNotifier*);
 
81
    void                 removeNotifier (KTextEditor::SmartRangeNotifier*);
 
82
    void                 deletePrimaryNotifier ();
 
83
    const QList<KTextEditor::SmartRangeWatcher*>& watchers () const;
 
84
    void                 addWatcher (KTextEditor::SmartRangeWatcher*);
 
85
    void                 removeWatcher (KTextEditor::SmartRangeWatcher*);
 
86
 
 
87
protected:
 
88
                         SmartRange (KTextEditor::SmartCursor*, KTextEditor::SmartCursor*, KTextEditor::SmartRange* = 0, KTextEditor::SmartRange::InsertBehaviors = KTextEditor::SmartRange::DoNotExpand );
 
89
    virtual void         rangeChanged (KTextEditor::Cursor*, const KTextEditor::Range&);
 
90
    virtual void         checkFeedback ();
 
91
    virtual KTextEditor::SmartRangeNotifier* createNotifier ()  = 0;
 
92
 
 
93
private:
 
94
                         SmartRange (const KTextEditor::SmartRange&);
 
95
 
 
96
};  // class SmartRange
 
97
 
 
98
};  // namespace KTextEditor
 
99