00001
#ifndef _XQGANTTBARVIEW_H_
00002
#define _XQGANTTBARVIEW_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
#define sgn(n) (n < 0 ? -1 : 1)
00033
#define TOPMARGIN 45
00034
00035
00036
#include <qscrollview.h>
00037
00038
#include "xQGanttBarViewPort.h"
00039
00040
00041
class KGanttBarConfig;
00042
00043
00045
00049
00050 class xQGanttBarView :
public QScrollView
00052 {
00053
00054 Q_OBJECT
00055
00056
00057
public:
00058
00059
00061
00064
xQGanttBarView(
KGanttItem* toplevelitem,
QWidget* parent = 0,
00065
const char * name=0, WFlags f=0 );
00066
00067
00069
00072
~xQGanttBarView();
00073
00074
00075
00077
00080
xQGanttBarViewPort* viewport() {
00081
return _viewport;
00082 }
00083
00084
00085
00087
00090 KGanttBarConfig*
getConfig();
00091
00092
00093
00094
public slots:
00095
00096
void horizontalScrollBarChanged(
int);
00097
void showConfig();
00098
void hideConfig();
00099
00100
00101
protected slots:
00102
00103
void drawHeader();
00104
00105
00106
protected:
00107
00108
xQGanttBarViewPort* _viewport;
00109
00110
QBrush _headerBackBrush;
00111
00112
void paintEvent(
QPaintEvent * e);
00113
00114
KGanttItem* _toplevelitem;
00115 KGanttBarConfig* _config;
00116
00117 };
00118
00119
00120
00121
#endif