digitalclock.h

来自「世界时间转换程序」· C头文件 代码 · 共 51 行

H
51
字号
/****************************************************************************
** File: 'digitalclock.h'
**
** Created: Sat Dec 2 15:58:32 2006
**      by: Wya ($Id: edited Sat Dec 2 15:58:32 2006 $)
**
** WARNING! All changes made by wya
**
****************************************************************************/

#include <QtGui>
#ifndef DIGITALCLOCK_H
#define DIGITALCLOCK_H

#include <QLCDNumber>

class DigitalClock : public QLCDNumber
{
    Q_OBJECT

public:
    DigitalClock(QWidget *parent = 0);
	void setForamtWithSecond();    
	void setForamtWithMircoSecond();
    virtual   QString getTimeString(int hh,int mm,int ss,int zz);
#ifdef LOG_STOPWATCH
	QString getDisplayTime(){return m_time;}
#endif
public slots:
    void setDisplayTime(const QString & text);
	
protected:
	 void mouseDoubleClickEvent ( QMouseEvent * event ) ;
private slots:
    void showTime();
	void slotDisplayStopWatchTimer();

private:
	int m_hours;
	int m_minutes;
	int m_seconds;
	int m_microSeconds;
	bool m_formatMicroSecond;
#ifdef LOG_STOPWATCH
	QString m_time;
#endif
   
};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?