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

正文內(nèi)容

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

2025-06-27 19:02本頁面
  

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