lineview.h
00001 #ifndef LINEVIEW_H
00002 #define LINEVIEW_H
00003
00004 #include <qscrollview.h>
00005 #include <qptrlist.h>
00006
00007 class LineView : public QScrollView
00008 {
00009 Q_OBJECT
00010 public:
00011 LineView( QWidget *parent = 0, const char *name = 0 );
00012 virtual ~LineView();
00013
00014 int pixelWidth();
00015
00016 void addLine( int start, int end );
00017
00018 void clear();
00019
00020 protected:
00021 void drawContents(QPainter* p, int cx, int cy, int cw, int ch);
00022
00023 private:
00024 struct Line {
00025 Line( int c, int s, int e ) : column( c ), start( s ), end( e ) {}
00026 int column;
00027 int start;
00028 int end;
00029 };
00030
00031 QPtrList<Line> mLines;
00032 int mPixelWidth;
00033 };
00034
00035 #endif
00036
This file is part of the documentation for kdelibs Version 3.1.4.