xQGanttListViewPort.h
00001 #ifndef _XQGANTTLISTVIEWPORT_H_
00002 #define _XQGANTTLISTVIEWPORT_H_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #include "xQGanttBarViewPort.h"
00034 #include "KGanttItem.h"
00035
00036
00037 #include <qcursor.h>
00038
00039
00040
00042
00046
00047 class xQGanttListViewPort : public QFrame
00049 {
00050
00051 Q_OBJECT
00052
00053 friend class xQGanttListView;
00054
00055
00056 public:
00057
00058
00060
00063 xQGanttListViewPort(KGanttItem* toplevelitem, QWidget* parent = 0,
00064 const char * name=0, WFlags f=0 );
00065
00066
00067
00069
00072 ~xQGanttListViewPort();
00073
00074
00075
00076 public slots:
00077
00078 void barViewResized();
00079
00080
00081 protected:
00082
00084
00087 void update(int x1, int y1, int x2, int y2);
00088
00089
00091
00094 void setBarViewPort(xQGanttBarViewPort* v);
00095
00096
00097 void drawContents(QPainter*, int x1, int y1, int x2, int y2);
00098 void drawItem(KGanttItem*, QPainter* p, const QRect&, int);
00099
00100 xQGanttBarViewPort* _barviewport;
00101
00102 int _width;
00103
00104 KGanttItem* _toplevelitem;
00105
00106 void paintEvent(QPaintEvent * e) {
00107
00108 update(e->rect().left(), e->rect().top(),
00109 e->rect().right(), e->rect().bottom() );
00110 }
00111
00112 QPopupMenu* _menu;
00113
00114 void mousePressEvent(QMouseEvent* e) {
00115
00116 if(e->button() == RightButton && e->state() == ControlButton ) {
00117 _menu->popup(e->globalPos());
00118 return;
00119 }
00120
00121 }
00122
00123
00124 QBrush brush1, brush2;
00125
00126 static int _ListViewCounter;
00127
00128 };
00129
00130
00131 #endif
This file is part of the documentation for kgantt Library Version 3.2.2.