freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于qt的模擬時(shí)鐘設(shè)計(jì)畢業(yè)設(shè)計(jì)(doc畢業(yè)設(shè)計(jì)論文)-資料下載頁

2025-06-27 19:02本頁面
  

【正文】 //設(shè)置窗體大小 setWindowFlags(Qt::FramelessWindowHint | Qt::WindowSystemMenuHint)。 //隱藏標(biāo)題欄 setContextMenuPolicy(Qt::ActionsContextMenu)。 //設(shè)置右鍵菜單 QAction *quitAction = new QAction(trUtf8(退出), this)。 //聲明動(dòng)作 QAction *skinAction = new QAction(trUtf8(皮膚), this)。 //聲明動(dòng)作 quitActionsetShortcut(tr(Ctrl+Q))。 //設(shè)置快捷鍵 skinActionsetShortcut(tr(Ctrl+L))。 //設(shè)置快捷鍵 connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit ()))。 //連接信號(hào)槽 connect(skinAction, SIGNAL(triggered()), this,SLOT(skinselect()))。 //連接信號(hào)槽 addAction(quitAction)。 //添加到右鍵菜單 addAction(skinAction)。 //添加到右鍵菜單}void Clock::mouseMoveEvent(QMouseEvent *event) //鼠標(biāo)移動(dòng)事件{ if (eventbuttons() amp。 Qt::LeftButton ) { move(eventglobalPos() dragPosition)。 eventaccept()。 }}void Clock::mousePressEvent(QMouseEvent *event) //鼠標(biāo)按下事件{ if (eventbutton() == Qt::LeftButton) { dragPosition =eventglobalPos() frameGeometry().topLeft()。 eventaccept()。 }}void Clock::paintEvent(QPaintEvent *){//下面的三個(gè)數(shù)組定義表針的三個(gè)頂點(diǎn) static const QPoint hourHand[3] = { QPoint(3, 8), QPoint(3, 8), QPoint(0, 70) }。 static const QPoint minuteHand[3] = { QPoint(3, 8), QPoint(3, 8), QPoint(0, 85) }。 static const QPoint secondHand[3] = { QPoint(3, 8), QPoint(3, 8), QPoint(0, 95) }。 int side = qMin(width(), height())。 //繪制的范圍 int r。 int cx,cy。 int j=0。 cy =height()/2。 cx =width()/2。 r=cycx?cx:cy20。 QTime time = QTime::currentTime()。 //獲取當(dāng)前時(shí)間 QPoint point。 QPainter painter(this)。 //聲明用來繪制用的painter (QPainter::Antialiasing)。 //繪制的圖像反鋸齒 (width() / 2, height() / 2)。 //重新定位坐標(biāo)起始點(diǎn) (side / , side / )。 //設(shè)定畫布的邊界 setWindowOpacity()。 //設(shè)置透明度 setAutoFillBackground(true)。 //允許背景填充 QPalette palette。 (QColor(247,252,13))。 //畫筆顏色設(shè)定 (QColor(247,252,13))。 //畫刷顏色設(shè)定 if (m==2) { (QColor(0,67,138))。 //設(shè)置畫筆顏色 (QColor(240,255,128))。 //設(shè)置畫刷顏色 (QPen(QBrush(QColor(0,67,138)), , Qt::SolidLine))。 //線條顏色和寬度 (QRect(98, 98, 196, 196))。 //設(shè)置圓的位置、大小 for (int i = 0。 i 12。 i++ ) //畫12個(gè)長刻度 { (86, 0, 96, 0)。 ()。 } for (int j = 0。 j 60。 ++j) //畫48個(gè)短刻度 { if ((j % 5) != 0) { (90, 0, 96, 0)。 } ()。 } for(int i =1。i=12。i++) //畫12個(gè)數(shù)字 { (sin((float)i/12*(2*))*r* 4)。 ((cos((float)i/12*(2*))*r*)+5)。 (point,QString::number(i))。 } (QPalette::Background, QColor(255,255,0))。 //設(shè)置背景顏色 setPalette(palette)。 } else if(m==3) { (QColor(0,0,0))。 //設(shè)置畫筆顏色 (QColor(0,0,0))。 //設(shè)置畫刷顏色 for(int i=0。i12。i++) //從0到60,間隔5,畫12個(gè)數(shù)字 { (sin((float)i/12*(2*))*r* )。 ((cos((float)i/12*(2*))*r*)+5)。 (point,QString::number(j))。 j=j+5。 } for (int j = 0。 j 60。 ++j) //畫48個(gè)小圓點(diǎn) { if ((j % 5) != 0) { (1, 78, 4, 4)。 } ()。 } (QPalette::Background, QColor(234,109,204))。 //設(shè)置背景顏色 setPalette(palette)。 } else if(m==4) { for (int i = 0。 i 12。 i++ ) //畫12個(gè)大圓點(diǎn) { (4, 98, 10, 10)。 ()。 } for (int j = 0。 j 60。 ++j) //畫48個(gè)小圓點(diǎn) { if ((j % 5) != 0) { (1, 94, 4, 4)。 } ()。 } for(int i =1。i=12。i++) //畫1到12,12個(gè)數(shù)字 { (sin((float)i/12*(2*))*r* 4)。 ((cos((float)i/12*(2*))*r*)+5)。 (point,QString::number(i))。 } (QPalette::Background, QColor(0,0,0))。 //設(shè)置背景顏色 setPalette(palette)。 } else if (m==5) { (QColor(64,64,64))。 //設(shè)置畫筆顏色 (QColor(160,160,200))。 //設(shè)置畫刷顏色 (QPen(QBrush(QColor(64,64,64)), , Qt::SolidLine))。 //設(shè)置線條的顏色、寬度 (QRect(90, 90, 180, 180))。 //繪制大圓 for (int j = 0。 j 60。 ++j) //畫48個(gè)短刻度 { if ((j % 5) != 0) { (93, 0, 94, 0)。 } ()。 } for(int i =1。i=12。i++) //畫1到12,12個(gè)數(shù)字 { (QColor(0,0,0))。 (sin((float)i/12*(2*))*r* 4)。 ((cos((float)i/12*(2*))*r*)+5)。 (point,QString::number(i))。 } (QPalette::Background, QColor(160,160,160))。 //設(shè)置背景顏色 setPalette(palette)。 } else { for (int i = 0。 i 12。 i++ ) //畫12個(gè)大圓點(diǎn) { (4, 98, 10, 10)。 ()。 } for (int j = 0。 j 60。 ++j) //畫48個(gè)小圓點(diǎn) { if ((j % 5) != 0) { (1, 94, 4, 4)。 } ()。 } for(int i =1。i=12。i++) //畫1到12,12個(gè)數(shù)字 { (sin((float)i/12*(2*))*r* 4)。 ((cos((float)i/12*(2*))*r*)+5)。 (point,QString::number(i))。 } (QPalette::Background, QColor(0,0,0))。 //設(shè)置背景顏色 setPalette(palette)。} (Qt::NoPen)。 //填充時(shí)針,不需要邊界線所以NoPen (QColor(0, 0,255))。 //設(shè)置畫刷顏色 ()。 //保存當(dāng)前狀態(tài) ( * ((() + () / )))。 //將painter(的”視角“)根據(jù)時(shí)間參數(shù)轉(zhuǎn)移(30176。 * (小時(shí) + 分鐘 / 60)) (hourHand, 3)。 //填充時(shí)針的區(qū)域 (
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1