summaryrefslogtreecommitdiffstats
path: root/kgantt/kgantt/xQGanttListView.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch)
tree67208f7c145782a7e90b123b982ca78d88cc2c87 /kgantt/kgantt/xQGanttListView.cpp
downloadtdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz
tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kgantt/kgantt/xQGanttListView.cpp')
-rw-r--r--kgantt/kgantt/xQGanttListView.cpp75
1 files changed, 75 insertions, 0 deletions
diff --git a/kgantt/kgantt/xQGanttListView.cpp b/kgantt/kgantt/xQGanttListView.cpp
new file mode 100644
index 00000000..01b4ac24
--- /dev/null
+++ b/kgantt/kgantt/xQGanttListView.cpp
@@ -0,0 +1,75 @@
+//
+// file : xQGanttListView.C
+// date : 23 nov 2000
+// changed :
+// author : jh
+//
+
+#include "xQGanttListView.h"
+
+#include <qcolor.h>
+#include <klocale.h>
+
+xQGanttListView::xQGanttListView(KGanttItem* toplevelitem, QWidget* parent,
+ const char * name, WFlags f)
+ : QScrollView(parent,name,f)
+/////////////////////////////////////////////////////////
+{
+ _toplevelitem = toplevelitem;
+
+ setFrameStyle(QFrame::Sunken);
+ setLineWidth(1);
+
+ _headerBackBrush = QBrush(QColor(230,230,230));
+
+ setMargins( 1, TOPMARGIN , 1, 1 );
+
+ setVScrollBarMode( AlwaysOff );
+
+ _viewport = new xQGanttListViewPort(toplevelitem,viewport());
+ addChild(_viewport);
+
+ viewport()->setBackgroundColor(QColor(white));
+
+}
+
+
+
+xQGanttListView::~xQGanttListView()
+///////////////////////////////////
+{
+}
+
+
+void
+xQGanttListView::drawHeader()
+///////////////////////////////
+{
+ // printf("xQGanttListView::drawHeader()\n");
+
+ QPainter p(this);
+ p.setPen( QPen(QColor(black)) );
+ p.fillRect(0,0,width(),TOPMARGIN, _headerBackBrush );
+
+ p.drawText(5, (int)(0.8 * TOPMARGIN), i18n("Items"));
+
+}
+
+
+
+void
+xQGanttListView::contentsMoved(int x, int y)
+////////////////////////////////////////////
+{
+ printf("xQGanttListView::contentsMoved(%d,%d)\n", x, y);
+ setContentsPos( 0, y );
+}
+
+
+
+void
+xQGanttListView::paintEvent(QPaintEvent * /*e*/)
+{
+ drawHeader();
+}
+#include "xQGanttListView.moc"