// QTreeChangeView: a QCanvasView holding the change and job bars. It does
// not scroll, except to align itself horizontally with its parent
// QTreeWindow.
class QTreeChangeView : public QCanvasView
{
public:
QTreeChangeView( QTreeCanvas* canvas, QTreeWindow* parent );
virtual ~QTreeChangeView();
// Reimplement WheelEvent to ignore the wheel.
void contentsWheelEvent( QWheelEvent* e );
// Double-click events spawn info dialogs.
void contentsMouseDoubleClickEvent( QMouseEvent* e );
// Press events begin dragging actions.
void contentsMousePressEvent( QMouseEvent* e );
// This is important - makes sure the view is the right size.
void AdjustGeometry();
// These two support QTreeWindow's ToggleJobs() function.
void HideJobs() { realheight = TREE_BARHEIGHT + 4; AdjustGeometry(); };
void ShowJobs() { realheight = maxheight; AdjustGeometry(); };
private:
// Set up the icon bar.
void InitIcons();
// Maxheight is the height including the job bar, if any.//
// Height is the current height, which may or may not be //
// equal to maxheight.
int maxheight;
int realheight;
// qtw == parent()
QTreeWindow* qtw;
QTreeCanvas* qtcanvas;
QLabel* changelabel;
QLabel* joblabel;
QTreeToolTip tips;
};