-rw-r--r-- | korganizer/lineview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/lineview.cpp b/korganizer/lineview.cpp index e72e41c..012455e 100644 --- a/korganizer/lineview.cpp +++ b/korganizer/lineview.cpp @@ -1,74 +1,74 @@ #include <qpainter.h> #include <kdebug.h> #include "koprefs.h" #include "lineview.h" LineView::LineView( QWidget *parent, const char *name ) : - QScrollView( parent, name ) + Q3ScrollView( parent, name ) { mPixelWidth = 1000; mLines.setAutoDelete( true ); resizeContents( mPixelWidth, contentsHeight() ); viewport()->setBackgroundColor(KOPrefs::instance()->mAgendaBgColor); } LineView::~LineView() { } int LineView::pixelWidth() { return mPixelWidth; } void LineView::addLine( int start, int end ) { int count = mLines.count(); if( start < 0 ) start = 0; if( end > mPixelWidth) end = mPixelWidth; kdDebug() << "LineView::addLine() col: " << count << " start: " << start << " end: " << end << endl; mLines.append( new Line( count, start, end ) ); } void LineView::clear() { mLines.clear(); update(); } void LineView::drawContents(QPainter* p, int cx, int cy, int cw, int ch) { // kdDebug() << "LineView::drawContents()" << endl; int mGridSpacingX = 10; int mGridSpacingY = 20; #if 0 // Draw vertical lines of grid // kdDebug() << "drawContents cx: " << cx << " cy: " << cy << " cw: " << cw << " ch: " << ch << endl; int x = ((int)(cx/mGridSpacingX))*mGridSpacingX; while (x < cx + cw) { p->drawLine(x,cy,x,cy+ch); x+=mGridSpacingX; } #endif // Draw horizontal lines of grid int y = ((int)(cy/mGridSpacingY))*mGridSpacingY + 10; while (y < cy + ch) { // kdDebug() << " y: " << y << endl; p->drawLine(cx,y,cx+cw,y); y+=mGridSpacingY; } Line *line; |