summaryrefslogtreecommitdiffabout
path: root/korganizer/lineview.cpp
Unidiff
Diffstat (limited to 'korganizer/lineview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/lineview.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/korganizer/lineview.cpp b/korganizer/lineview.cpp
index f1ff29f..e72e41c 100644
--- a/korganizer/lineview.cpp
+++ b/korganizer/lineview.cpp
@@ -1,56 +1,55 @@
1#include <qpainter.h> 1#include <qpainter.h>
2 2
3#include <kdebug.h> 3#include <kdebug.h>
4 4
5#include "koprefs.h" 5#include "koprefs.h"
6 6
7#include "lineview.h" 7#include "lineview.h"
8#include "lineview.moc"
9 8
10LineView::LineView( QWidget *parent, const char *name ) : 9LineView::LineView( QWidget *parent, const char *name ) :
11 QScrollView( parent, name ) 10 QScrollView( parent, name )
12{ 11{
13 mPixelWidth = 1000; 12 mPixelWidth = 1000;
14 13
15 mLines.setAutoDelete( true ); 14 mLines.setAutoDelete( true );
16 15
17 resizeContents( mPixelWidth, contentsHeight() ); 16 resizeContents( mPixelWidth, contentsHeight() );
18 17
19 viewport()->setBackgroundColor(KOPrefs::instance()->mAgendaBgColor); 18 viewport()->setBackgroundColor(KOPrefs::instance()->mAgendaBgColor);
20} 19}
21 20
22LineView::~LineView() 21LineView::~LineView()
23{ 22{
24} 23}
25 24
26int LineView::pixelWidth() 25int LineView::pixelWidth()
27{ 26{
28 return mPixelWidth; 27 return mPixelWidth;
29} 28}
30 29
31void LineView::addLine( int start, int end ) 30void LineView::addLine( int start, int end )
32{ 31{
33 int count = mLines.count(); 32 int count = mLines.count();
34 33
35 if( start < 0 ) start = 0; 34 if( start < 0 ) start = 0;
36 if( end > mPixelWidth) end = mPixelWidth; 35 if( end > mPixelWidth) end = mPixelWidth;
37 36
38 kdDebug() << "LineView::addLine() col: " << count << " start: " << start 37 kdDebug() << "LineView::addLine() col: " << count << " start: " << start
39 << " end: " << end << endl; 38 << " end: " << end << endl;
40 39
41 mLines.append( new Line( count, start, end ) ); 40 mLines.append( new Line( count, start, end ) );
42} 41}
43 42
44void LineView::clear() 43void LineView::clear()
45{ 44{
46 mLines.clear(); 45 mLines.clear();
47 update(); 46 update();
48} 47}
49 48
50void LineView::drawContents(QPainter* p, int cx, int cy, int cw, int ch) 49void LineView::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
51{ 50{
52// kdDebug() << "LineView::drawContents()" << endl; 51// kdDebug() << "LineView::drawContents()" << endl;
53 52
54 int mGridSpacingX = 10; 53 int mGridSpacingX = 10;
55 int mGridSpacingY = 20; 54 int mGridSpacingY = 20;
56 55