下你所需,载你所想!
汇集开发技术源码资料

实现心电图

:1.458MB :1 :2022-09-18 16:47:34

部分简介

Qt 实现心电图如果开发者对于本文件有需要的可以参考,void pWidget::paintEvent(QPaintEvent *)
{

QPainter painter(this); //创建QPainter一个对象
QPen pen;
pen.setColor(Qt::black);//设置画笔为蓝色
painter.setPen(pen);
// painter.drawRect(10,10,120,200);//绘制矩形

painter.setRenderHint(QPainter::Antialiasing, true);
painter.setPen(QPen(Qt::black, 12, Qt::DashDotLine, Qt::RoundCap));
painter.setBrush(QBrush(Qt::green, Qt::SolidPattern));
// painter.drawEllipse(150,10, 400, 200);//绘制椭圆
painter.setPen(Qt::red);
//for(int i=0;i<=200;i )
// {
// painter.drawPoint(i,140);//由点拼成线条
// }
//painter.drawLine(20,20,150,310);//两点划线

/*for(int x=0;x<=700;x=x 5)
{
y1=y2;
y2=rand()%400;
painter.drawLine(x-5,y1,x,y2);
}

stack p;
p.push(32);
p.push(4);
cout<
*/




for(int m=1;m<2;m )
{

int x=0;

// painter.eraseRect(0,0,800,600);
listOne.push_front(rand()%300);
listOne.push_front(rand()%300);
i=listOne.begin(); //
temp1=*i;

for(i=listOne.begin();i!=listOne.end(); i=i.operator (1))
{


j=i.operator (1);

temp2=*j;
painter.drawLine(x,temp1,x 20,temp2);
cout<
temp1=temp2;
x=x 20;

热门推荐

相关文章