summaryrefslogtreecommitdiffabout
path: root/korganizer/lineview.h
authorzautrix <zautrix>2004-06-26 19:01:18 (UTC)
committer zautrix <zautrix>2004-06-26 19:01:18 (UTC)
commitb9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (unidiff)
tree2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /korganizer/lineview.h
downloadkdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2
Initial revision
Diffstat (limited to 'korganizer/lineview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/lineview.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/korganizer/lineview.h b/korganizer/lineview.h
new file mode 100644
index 0000000..aa34dbc
--- a/dev/null
+++ b/korganizer/lineview.h
@@ -0,0 +1,36 @@
1#ifndef LINEVIEW_H
2#define LINEVIEW_H
3
4#include <qscrollview.h>
5#include <qptrlist.h>
6
7class LineView : public QScrollView
8{
9 Q_OBJECT
10 public:
11 LineView( QWidget *parent = 0, const char *name = 0 );
12 virtual ~LineView();
13
14 int pixelWidth();
15
16 void addLine( int start, int end );
17
18 void clear();
19
20 protected:
21 void drawContents(QPainter* p, int cx, int cy, int cw, int ch);
22
23 private:
24 struct Line {
25 Line( int c, int s, int e ) : column( c ), start( s ), end( e ) {}
26 int column;
27 int start;
28 int end;
29 };
30
31 QPtrList<Line> mLines;
32 int mPixelWidth;
33};
34
35#endif
36