资源简介
里面有SSD4所需要的全部答案,包括所有的Exercise和所有的Quiz。

代码片段和文件信息
#include
#include “analogclock.h“
AnalogClock::AnalogClock(QWidget *parent)
: QWidget(parent)
{
QTimer *timer = new QTimer(this);
connect(timer SIGNAL(timeout()) this SLOT(update()));
timer->start(1000);
setWindowtitle(tr(“Analog Clock“));
resize(200 200);
}
void AnalogClock::paintEvent(QPaintEvent *)
{
static const QPoint hourHand[3] = {
QPoint(7 8)
QPoint(-7 8)
QPoint(0 -40)
};
static const QPoint minuteHand[3] = {
QPoint(7 8)
QPoint(-7 8)
QPoint(0 -70)
};
static const QPoint secondHand[3] = {
QPoint(7 8)
QPoint(-7 8)
QPoint(0 -90)
};
QColor hourColor(127 0 127);
QColor minuteColor(0 127 127 191);
QColor secondColor(0 127 12 191);
int side = qMin(width() height());
QTime time = QTime::currentTime();
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing);
painter.translate(width() / 2 height() / 2);
painter.scale(side / 200.0 side / 200.0);
painter.setPen(Qt::NoPen);
painter.setBrush(hourColor);
painter.save();
painter.rotate(30.0 * ((time.hour() + time.minute() / 60.0)));
painter.drawConvexPolygon(hourHand 3);
painter.restore();
painter.setPen(hourColor);
for (int i = 0; i < 12; ++i) {
painter.drawLine(88 0 96 0);
painter.rotate(30.0);
}
painter.setPen(Qt::NoPen);
painter.setBrush(minuteColor);
painter.save();
painter.rotate(6.0 * (time.minute() + time.second() / 60.0));
painter.drawConvexPolygon(minuteHand 3);
painter.restore();
painter.setPen(minuteColor);
for (int j = 0; j < 60; ++j) {
if ((j % 5) != 0)
painter.drawLine(92 0 96 0);
painter.rotate(6.0);
}
painter.setPen(Qt::NoPen);
painter.setBrush(secondColor);
painter.save();
painter.rotate(6.0*time.second());
painter.drawConvexPolygon(secondHand 3);
painter.restore();
painter.setPen(secondColor);
for (int j = 0; j < 60; ++j) {
if ((j % 5) != 0)
painter.drawLine(92 0 96 0);
painter.rotate(6.0);
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 30720 2009-05-18 23:42 Exam1\bin\Debug\Exam1.exe
文件 42496 2009-05-18 23:42 Exam1\bin\Debug\Exam1.pdb
文件 14328 2009-05-18 23:46 Exam1\bin\Debug\Exam1.vshost.exe
文件 490 2007-07-21 02:33 Exam1\bin\Debug\Exam1.vshost.exe.manifest
文件 652 2009-05-18 23:42 Exam1\bin\Debug\Exam1.xm
文件 13668 2009-05-18 23:42 Exam1\Exam1.Designer.vb
文件 5814 2009-05-18 23:42 Exam1\Exam1.resx
文件 905 2008-10-21 22:59 Exam1\Exam1.sln
..A..H. 27136 2009-05-18 23:46 Exam1\Exam1.suo
文件 6726 2009-05-18 23:42 Exam1\Exam1.vb
文件 13792 2008-10-22 11:24 Exam1\Exam1byLiliang.Designer.vb
文件 5814 2008-10-22 11:24 Exam1\Exam1byLiliang.resx
文件 6471 2008-10-22 11:24 Exam1\Exam1byLiliang.vb
文件 4561 2008-10-22 11:26 Exam1\Exam1_SL.vbproj
文件 1508 2008-10-22 11:26 Exam1\My Project\Application.Designer.vb
文件 469 2008-10-22 11:26 Exam1\My Project\Application.myapp
文件 1099 2008-04-03 10:02 Exam1\My Project\AssemblyInfo.vb
文件 2773 2008-10-21 22:17 Exam1\My Project\Resources.Designer.vb
文件 5612 2005-09-23 03:27 Exam1\My Project\Resources.resx
文件 2969 2008-10-21 22:17 Exam1\My Project\Settings.Designer.vb
文件 279 2005-09-23 03:27 Exam1\My Project\Settings.settings
文件 180 2009-05-18 23:42 Exam1\obj\Debug\Exam1.Exam1.resources
文件 180 2008-10-22 11:24 Exam1\obj\Debug\Exam1.Exam1byLiliang.resources
文件 30720 2009-05-18 23:42 Exam1\obj\Debug\Exam1.exe
文件 180 2008-10-21 22:53 Exam1\obj\Debug\Exam1.Exercise2.resources
文件 42496 2009-05-18 23:42 Exam1\obj\Debug\Exam1.pdb
文件 180 2008-10-22 11:26 Exam1\obj\Debug\Exam1.Resources.resources
文件 652 2009-05-18 23:42 Exam1\obj\Debug\Exam1.xm
文件 1376 2009-05-18 23:46 Exam1\obj\Debug\Exam1_SL.vbproj.FileListAbsolute.txt
文件 847 2009-05-18 23:42 Exam1\obj\Debug\Exam1_SL.vbproj.GenerateResource.Cache
............此处省略14个文件信息
- 上一篇:Qt商业版完整SDK+license
- 下一篇:基于SVM与ANN的车牌识别
相关资源
- SSD4 exercise8答案
- 操作系统概念第九版原版辅助资源含
- 川大数据库系统(SSD6)历年考题、
- PRML-Solutions to Exercises Tutors Edition
- One_thousand_exercises_in_probability259692
- ssd3全部答案,最全的
- ssd6 exercise6
- ssd5 optional exercise 7
- ssd4 UAR report
- zw_softmax_exercise.zip
- 牛津版概率论与随机过程配套答案及
- Cloudera Custom Training: Hands-On Exercises
- 《Multivariate Statistics- Exercises and Solu
- ssd7 exercise10 答案 卡耐基 icarnegie
- ssd4 ex4 ssd4 ex4 人机界面 QT QT版本的作
- 卡耐基 SSD7 exercise 10 答案
- Additional Exercises for Convex Optimization
- SSD3 quiz+exercise+exam所有完整答案
- Mathematical Statistics Exercises and Solution
- SSD4 用户界面设计 pdf
- SSD4 Exercise全部答案
- One thousand exercises in probability
- 吴恩达-深度学习-神经网络与深度学习
- ssd6答案和电子书
- 数据库系统概念第六版习题全部答案
- SSD6全部Exercise答案
- 吴恩达-深度学习-改善深层神经网络课
- ssd3 practical quiz 8
- SSD7 所有习题答案完美版
- storyline 2 Quizmaker13测试题批量导入模板
评论
共有 条评论