katearbitraryhighlight.h
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 ArbitraryHighlightRange :
public KateSuperRange,
public KateAttribute
00033 {
00034 Q_OBJECT
00035
00036
public:
00037 ArbitraryHighlightRange(
KateSuperCursor* start,
KateSuperCursor* end,
QObject* parent = 0L,
const char* name = 0L);
00038 ArbitraryHighlightRange(KateDocument* doc,
const KateRange& range,
QObject* parent = 0L,
const char* name = 0L);
00039 ArbitraryHighlightRange(KateDocument* doc,
const KateTextCursor& start,
const KateTextCursor& end,
QObject* parent = 0L,
const char* name = 0L);
00040
00041
virtual ~ArbitraryHighlightRange();
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
00078
private:
00079 KateView* viewForRange(
KateSuperRange* range);
00080
00081
QMap<KateView*, QPtrList<KateSuperRangeList>* > m_viewHLs;
00082
QPtrList<KateSuperRangeList> m_docHLs;
00083 };
00084
00085
#endif
This file is part of the documentation for kate Library Version 3.2.3.