易截截图软件、单文件、免安装、纯绿色、仅160KB

呵呵!一个QT通过贴图实现的模拟时钟 c文件

#include "draw.h"
#include "ui_draw.h"
#include <QPixmap>
draw::draw(QWidget *parent)
    : QDialog(parent), ui(new Ui::draw)
{
    ui->setupUi(this);
//    this->setWindowFlags( Qt::FramelessWindowHint);
    ctrlPoint.setX(this->width() / 2);
    ctrlPoint.setY(this->height() / 2);
    m_pixmap = QPixmap("Skin/Night Blue/main.png");
    m_mainScale = this->width() /((qreal)(m_pixmap.width()))  ;
    m_pixmap = QPixmap("Skin/Night Blue/hour.png");
    m_hourScale = (this->width()/(qreal)2.0 ) / (m_pixmap.width()) ;
    m_pixmap = QPixmap("Skin/Night Blue/min.png");
    m_minScale = (this->width()/(qreal)1.8 ) / (m_pixmap.width()) ;
    m_pixmap = QPixmap("Skin/Night Blue/sec.png");
    m_secScale = (this->width()/(qreal)1.5 ) / (m_pixmap.width()) ;
//    qDebug("m_mainScale = %f , m_hourScale = %f , m_minScale = %f ,m_secScale = %f",m_mainScale,m_hourScale,m_minScale,m_secScale);
    m_secRotation = QTime::currentTime ().second() *6 - 90;
    m_minRotation = QTime::currentTime ().minute() *6 - 90;
    m_hourRotation = m_minRotation / 10 + QTime::currentTime ().hour() * 30 - 90;
    upTimer = new QTimer(this);
    connect(upTimer,SIGNAL(timeout()),this,SLOT(updataTime()));
    upTimer->start(500);
}
draw::~draw()
{
    delete ui;
}
void draw::paintEvent(QPaintEvent *event)
{
    //face
    QPainter painter(this);
    m_pixmap = QPixmap("Skin/Night Blue/main.png");
    painter.scale(m_mainScale,m_mainScale);
    painter.drawPixmap(QPointF(0, 0), m_pixmap);
    //hour
    QPainter p


相关文档:

c陷阱与缺陷学习笔记

http://c.chinaitlab.com/c/basic/200907/789321.html
  词法陷阱:
    1        = 不同于==不要在程序中将两者写错,小心。将表达式与常量比较时,可将常量放在左边。
    2        &和| 不同于& ......

如何理解c和c++的复杂类型声明

 曾经碰到过让你迷惑不解、类似于int * (* (*fp1) (int) ) [10];这样的变量声明吗?
本文将由易到难,一步一步教会你如何理解这种复杂的C/C++声明。
我们将从每天都能碰到的较简单的声明入手,然后逐步加入const修饰符和typedef,还有函数指针,最后介绍一个能够让你准确地理解任何C/C++声明的“右左法则&rdquo ......

c 语言获取系统时间和世界各时区时间

The meaning of each is:
MemberMeaningRange
tm_sec
seconds after the minute
0-61*
tm_min
minutes after the hour
0-59
tm_hour
hours since midnight
0-23
tm_mday
day of the month
1-31
tm_mon
months since January
0-11
tm_year
years since 1900
tm_wday
days since Sunday
0-6
tm_yday
d ......

S3C44B0 uart程序库 c文件

 /* =========================================================================== */
/* Project:        s3c44b0_lib                         & ......

fat16文件系统 c文件

/* =========================================================================== */
/* Project:        mp3 player                */
/* File:         & ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号