diff --git a/Quartus/v6_testbench/work/_lib1_0.qtl b/Quartus/v6_testbench/work/_lib1_0.qtl new file mode 100644 index 0000000..4ed6b2e Binary files /dev/null and b/Quartus/v6_testbench/work/_lib1_0.qtl differ diff --git a/Quartus/v6_testbench_top/work/_lib1_0.qtl b/Quartus/v6_testbench_top/work/_lib1_0.qtl new file mode 100644 index 0000000..46bf479 Binary files /dev/null and b/Quartus/v6_testbench_top/work/_lib1_0.qtl differ diff --git a/Quartus/v7_testbench/work/_lib1_0.qtl b/Quartus/v7_testbench/work/_lib1_0.qtl new file mode 100644 index 0000000..fb337ed Binary files /dev/null and b/Quartus/v7_testbench/work/_lib1_0.qtl differ diff --git a/SoftwareDesign/Lab5/lab5_1_painter/mainwindow.cpp b/SoftwareDesign/Lab5/lab5_1_painter/mainwindow.cpp index 168c695..89728e9 100644 --- a/SoftwareDesign/Lab5/lab5_1_painter/mainwindow.cpp +++ b/SoftwareDesign/Lab5/lab5_1_painter/mainwindow.cpp @@ -33,22 +33,49 @@ void MainWindow::on_styCor_triggered() //边框颜色 QPainter painter(this); painter.drawPixmap(0, 0, pix); } - void MainWindow::paintEvent(QPaintEvent *event) { - if (enable) - switch (drawStatus) { - case line: - QPainter pp(&pix); // 根据鼠标指针前后两个位置就行绘制直线 - pp.drawLine( - lastPoint, - endPoint); // 让前一个坐标值等于后一个坐标值,这样就能实现画出连续的线 - enable = false; - } QPainter painter(this); - painter.drawPixmap(0, 0, pix); + painter.drawLine(QPoint(100, 100), QPoint(200, 200)); - drawStatus = idle; + QPen pen(Qt::green, 5, Qt::DotLine, Qt::RoundCap, Qt::RoundJoin); + painter.setPen(pen); + QRectF rect(170.0, 140.0, 180.0, 60.0); + int startAngle = 30 * 16; + int spanAngle = 120 * 16; + painter.drawArc(rect, startAngle, spanAngle); + + pen.setWidth(1); + pen.setStyle(Qt::SolidLine); + painter.setPen(pen); + painter.drawRect(260, 220, 250, 240); + QBrush brush(QColor(0, 0, 255), Qt::Dense4Pattern); + painter.setBrush(brush); + painter.drawEllipse(220, 220, 250, 150); + + static const QPointF points[4] = { + QPointF(270.0, 180.0), QPointF(290.0, 110.0), QPointF(350.0, 130.0), + QPointF(390.0, 170.0)}; + painter.drawPolygon(points, 4); + + painter.fillRect(QRect(10, 100, 150, 20), QBrush(Qt::darkYellow)); + painter.eraseRect(QRect(50, 0, 50, 120)); } +// void MainWindow::paintEvent(QPaintEvent *event) { +// if (enable) +// switch (drawStatus) { +// case line: +// QPainter pp(&pix); // 根据鼠标指针前后两个位置就行绘制直线 +// pp.drawLine( +// lastPoint, +// endPoint); // +// 让前一个坐标值等于后一个坐标值,这样就能实现画出连续的线 +// enable = false; +// } +// QPainter painter(this); +// painter.drawPixmap(0, 0, pix); + +// drawStatus = idle; +//} void MainWindow::drawLineTriger() { drawStatus = line; } void MainWindow::on_drawLine_triggered() { diff --git a/SoftwareDesign/Lab5/lab5_1_painter/mainwindow.ui b/SoftwareDesign/Lab5/lab5_1_painter/mainwindow.ui index d03c876..d7c0faf 100644 --- a/SoftwareDesign/Lab5/lab5_1_painter/mainwindow.ui +++ b/SoftwareDesign/Lab5/lab5_1_painter/mainwindow.ui @@ -11,7 +11,7 @@ - MainWindow + 实验5-***REMOVED***-***REMOVED***