kgantt

xQGanttListViewPort.h
1#ifndef _XTQGANTTLISTVIEWPORT_H_
2#define _XTQGANTTLISTVIEWPORT_H_
3
4/*
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20
21 author : jh, jochen@ifb.bv.tu-berlin.de
22
23 file : xQGanttListViewPort.h
24 date : 26 oct 2000
25
26
27 changelog :
28
29*/
30
31
32
33#include "xQGanttBarViewPort.h"
34#include "KGanttItem.h"
35
36
37#include <tqcursor.h>
38
39
40
42
47class xQGanttListViewPort : public TQFrame
49{
50
51 TQ_OBJECT
52
53
54 friend class xQGanttListView;
55
56
57public:
58
59
61
64 xQGanttListViewPort(KGanttItem* toplevelitem, TQWidget* parent = 0,
65 const char * name=0, WFlags f=0 );
66
67
68
70
74
75
76
77public slots:
78
79 void barViewResized();
80
81
82protected:
83
85
88 void update(int x1, int y1, int x2, int y2);
89
90
92
95 void setBarViewPort(xQGanttBarViewPort* v);
96
97
98 void drawContents(TQPainter*, int x1, int y1, int x2, int y2);
99 void drawItem(KGanttItem*, TQPainter* p, const TQRect&, int);
100
101 xQGanttBarViewPort* _barviewport;
102
103 int _width;
104
105 KGanttItem* _toplevelitem;
106
107 void paintEvent(TQPaintEvent * e) {
108 // printf("xQGanttListViewPort::paintEvent()\n");
109 update(e->rect().left(), e->rect().top(),
110 e->rect().right(), e->rect().bottom() );
111 }
112
113 TQPopupMenu* _menu;
114
115 void mousePressEvent(TQMouseEvent* e) {
116
117 if(e->button() == TQt::RightButton && e->state() == ControlButton ) {
118 _menu->popup(e->globalPos());
119 return;
120 }
121
122 }
123
124
125 TQBrush brush1, brush2;
126
127 static int _ListViewCounter;
128
129};
130
131
132#endif
KGanttItem.
Definition: KGanttItem.h:56
GanttBarViewPort Widget.
GanttListViewPort Widget.
~xQGanttListViewPort()
Destructor.
xQGanttListViewPort(KGanttItem *toplevelitem, TQWidget *parent=0, const char *name=0, WFlags f=0)
Constructor.
void update(int x1, int y1, int x2, int y2)
Update widget.
GanttListView Widget.