bar.h

来自「一个基于QT的电网监控程序」· C头文件 代码 · 共 59 行

H
59
字号
#ifndef BAR_H#define BAR_H#include <qvariant.h>#include <qwidget.h>#include <qframe.h>#include <qlabel.h>#include <qpainter.h>#include <qcolor.h>#include <qpalette.h>#define STARTLINE	20#define BASELINE		180#define GRID		((BASELINE-STARTLINE)/10)class Bar:public QFrame{	Q_OBJECT	public:		Bar(QWidget *parent=0,const char *name=0);	~Bar();		void setLineString(const QString &);	void setAVString(const QString &);	void setBarColor(const QColor &);	void drawBar(double *Harmonic,int cnt=64);	void setTitle(const QString &,const QColor &);	private:	void init();    	void paintEvent(QPaintEvent* );		int per[64];	    	QPainter* painter;	QPalette *pal;    	QColorGroup *cg;	QColor BarColor;	QLabel* TextLabel1;	QLabel* TextLabel2;    	QLabel* TextLabel3;    	QLabel* TextLabel4;    	QLabel* TextLabel5;    	QLabel* TextLabel6;    	QLabel* TextLabel7;    	QLabel* TextLabel8;	QLabel* TextLabel9;    	QLabel* TextLabel10;    	QLabel* TextLabel11;    	QLabel* TextLabel12;    	QLabel* TextLabel13;    	QLabel* TextLabel14;	QLabel* TextLabel15;	QLabel* TextLabel16;	QLabel* TextLabel17;	};#endif // BAR_H 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?