/usr/include/KWWidgets/vtkKWProgressGauge.h is in libkwwidgets1-dev 1.0.0~cvs20100930-8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | /*=========================================================================
Module: $RCSfile: vtkKWProgressGauge.h,v $
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkKWProgressGauge - a horizontal progress bar widget
// .SECTION Description
// A simple widget used for displaying a progress bar with a percent value
// text in the center of the widget.
#ifndef __vtkKWProgressGauge_h
#define __vtkKWProgressGauge_h
#include "vtkKWCompositeWidget.h"
class vtkKWCanvas;
class vtkKWProgressGaugeInternals;
class KWWidgets_EXPORT vtkKWProgressGauge : public vtkKWCompositeWidget
{
public:
static vtkKWProgressGauge* New();
vtkTypeRevisionMacro(vtkKWProgressGauge,vtkKWCompositeWidget);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Set/Get the percentage displayed for the primary progress gauge.
// This number is clamped between 0.0 and 100.0.
// Note: setting the progress to zero resets the gauge to its nominal
// blank appearance.
virtual void SetValue(double value);
virtual double GetValue();
// Description:
// Set/Get the percentage displayed for the primary (ranked 0) and
// the secondary progress gauges. If rank = 0, calling this method is
// the same as calling the SetValue method.
// This number is clamped between 0.0 and 100.0.
// Note: setting the progress to zero resets the gauge to its nominal
// blank appearance.
// All progress gauges are stacked vertically on top of each other, with the
// lower rank at the top by default (this can be changed with
// the SetPrimaryGaugePosition method). Space for the primary gauge
// (ranked 0) is always allocated. It is not for secondary gauges which
// value is 0.0 unless a higher rank gauge is != 0.0.
virtual void SetNthValue(int rank, double value);
virtual double GetNthValue(int rank);
// Description:
// Set/Get the width and height of the widget.
// The height parameter is ignored if ExpandHeight is set to On.
virtual void SetWidth(int width);
vtkGetMacro(Width, int);
virtual void SetHeight(int height);
vtkGetMacro(Height, int);
// Description:
// Set/Get if the height of the gauge should be automatically adjusted
// to fill the available vertical space. The widget should be packed
// accordingly to expand automatically. Check MinimumHeight too.
vtkBooleanMacro(ExpandHeight, int);
virtual void SetExpandHeight(int);
vtkGetMacro(ExpandHeight, int);
// Description:
// Set/Get the minimum height of the widget.
// This value is ignored if ExpandHeight is set to Off. If set to On,
// the height computed from the available vertical space will not be any
// smaller than this minimum height.
virtual void SetMinimumHeight(int height);
vtkGetMacro(MinimumHeight, int);
// Description:
// Set/Get the color of the progress bar, the default is blue.
virtual void SetBarColor(double r, double g, double b);
virtual void SetBarColor(double rgb[3])
{ this->SetBarColor(rgb[0], rgb[1], rgb[2]); }
vtkGetVectorMacro(BarColor,double,3);
// Description:
// Set/Get the position of the primary gauge (rank 0).
// If on top, higher rank are stacked below. If at the bottom, higher rank
// are stacked on top.
//BTX
enum
{
GaugePositionTop = 0,
GaugePositionBottom
};
//ETX
virtual void SetPrimaryGaugePosition(int);
vtkGetMacro(PrimaryGaugePosition, int);
virtual void SetPrimaryGaugePositionToTop();
virtual void SetPrimaryGaugePositionToBottom();
// Description:
// Callbacks. Internal, do not use.
virtual void ConfigureCallback();
protected:
vtkKWProgressGauge();
~vtkKWProgressGauge();
// Description:
// Create the widget.
virtual void CreateWidget();
virtual void Redraw();
int Width;
int Height;
int MinimumHeight;
double BarColor[3];
double Value;
int ExpandHeight;
int PrimaryGaugePosition;
vtkKWCanvas *Canvas;
// PIMPL Encapsulation for STL containers
//BTX
vtkKWProgressGaugeInternals *Internals;
//ETX
private:
vtkKWProgressGauge(const vtkKWProgressGauge&); // Not implemented
void operator=(const vtkKWProgressGauge&); // Not implemented
};
#endif
|