lineview.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
#ifndef LINEVIEW_H
00025
#define LINEVIEW_H
00026
00027
#include <qscrollview.h>
00028
#include <qptrlist.h>
00029
00030
class LineView :
public QScrollView
00031 {
00032 Q_OBJECT
00033
public:
00034 LineView(
QWidget *parent = 0,
const char *name = 0 );
00035
virtual ~LineView();
00036
00037
int pixelWidth();
00038
00039
void addLine(
int start,
int end );
00040
00041
void clear();
00042
00043
protected:
00044
void drawContents(
QPainter* p,
int cx,
int cy,
int cw,
int ch);
00045
00046
private:
00047
struct Line {
00048 Line(
int c,
int s,
int e ) : column( c ), start( s ), end( e ) {}
00049
int column;
00050
int start;
00051
int end;
00052 };
00053
00054
QPtrList<Line> mLines;
00055
int mPixelWidth;
00056 };
00057
00058
#endif
00059
This file is part of the documentation for korganizer Library Version 3.3.0.