LCD-type digital meter.
The QMeter object is a special QLabel. It displays a rectangular, vertical LCD-type digital meter. If you make it large enough, a QMeter will be composed of several individual "lights" stacked together, as in an LCD-meter. If the QMeter is too small, it will be continuous.The QMeter changes level continuously. That is, as you increase the level, each "light" grows in size. After one light is completely lit, the next one is drawn. There is no set level cooresponding to a particular change in the lights. That depends on the size of the meter, the size of the lights, and so on.
This class inherits the Qt QLabel class. I've documented the protected methods in case you want to use this class as a base for a new widget.
---------------------------------------------------------- ----------------------------------------------------------
Automatically calls initMeter(), but not
Redraw().
You should call this after any change in size. It's
automatically called by setLightSize() and the class
constructor. It does not, however, call Redraw(); you
need to do that yourself.
void Redraw(void)
void setLightSize(float percent)
float getLevel(void)
void initMeter(void)
public slots: void setLevel(double percent)
void setLevel(int ipercent)
QPixmap meter_map
float lightsize
float current_level
int ppl
QSize oldSize
bool continuous
QRect flipVert(int x0, int y0, int ww, int hh, QPixmap map)
Copyright 1997 by John Weiss [John.Weiss@colorado.edu]
"generated by doc++"?! More like mangled generated by doc++