Kate
katearbitraryhighlight.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef KATEARBITRARYHIGHLIGHT_H
00020 #define KATEARBITRARYHIGHLIGHT_H
00021
00022 #include "kateattribute.h"
00023 #include "katesupercursor.h"
00024
00025 #include <qobject.h>
00026 #include <qptrlist.h>
00027 #include <qmap.h>
00028
00029 class KateDocument;
00030 class KateView;
00031
00032 class KateArbitraryHighlightRange : public KateSuperRange, public KateAttribute
00033 {
00034 Q_OBJECT
00035
00036 public:
00037 KateArbitraryHighlightRange(KateSuperCursor* start, KateSuperCursor* end, QObject* parent = 0L, const char* name = 0L);
00038 KateArbitraryHighlightRange(KateDocument* doc, const KateRange& range, QObject* parent = 0L, const char* name = 0L);
00039 KateArbitraryHighlightRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, QObject* parent = 0L, const char* name = 0L);
00040
00041 virtual ~KateArbitraryHighlightRange();
00042
00043 virtual void changed() { slotTagRange(); };
00044
00045 static KateAttribute merge(QPtrList<KateSuperRange> ranges);
00046 };
00047
00060 class KateArbitraryHighlight : public QObject
00061 {
00062 Q_OBJECT
00063
00064 public:
00065 KateArbitraryHighlight(KateDocument* parent = 0L, const char* name = 0L);
00066
00067 void addHighlightToDocument(KateSuperRangeList* list);
00068 void addHighlightToView(KateSuperRangeList* list, KateView* view);
00069
00070 KateSuperRangeList& rangesIncluding(uint line, KateView* view = 0L);
00071
00072 signals:
00073 void tagLines(KateView* view, KateSuperRange* range);
00074
00075 private slots:
00076 void slotTagRange(KateSuperRange* range);
00077 void slotRangeListDeleted(QObject* obj);
00078 private:
00079 KateView* viewForRange(KateSuperRange* range);
00080
00081 QMap<KateView*, QPtrList<KateSuperRangeList>* > m_viewHLs;
00082 QPtrList<KateSuperRangeList> m_docHLs;
00083 };
00084
00085 #endif
00086
00087