亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? worldtimer.cpp

?? 世界時間轉換程序
?? CPP
字號:
/****************************************************************************** File: 'worldtimer.cpp'**** 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**-------------------------------------------------------------------------****-------------------------------------------------------------------------**Modifier:**         2006 12 09 --correct the display of AM, PM , when euro to china**         @revesion 22**-------------------------------------------------------------------------******************************************************************************/#include "worldtimer.h"#include "stopwatch.h"#include "analogclock.h"#include "digitalclock.h"#include "yconfigure.h"/***** construction*****/YWorldTimer::YWorldTimer(QWidget *parent ) : QDialog(parent){    setupUi(this);     m_digitalClock = NULL;	m_analogClock  = NULL;	m_OffsetTime=0;	m_StopWatchCounter=0;//start 0 stopwatch	m_SynchroEnable=false;	m_LogStream=NULL;	m_Log=NULL;	//disable the synchron checkbox	setSynchroEnable (false);#if CHINA_TIME       m_eTimeZone=eCHINA;  //china#endif#if EURO_TIME       m_eTimeZone=eEUROPE; //europe#endif		   m_conf=new YConfigure(this);//init the world	   //activity log stream	   openLogStream();	connect(btSetLocalTime, SIGNAL(clicked(bool)), this, SLOT(slotSetLocalTimeButton(bool)));	connect(sliderWorldTimer, SIGNAL(valueChanged (int)), this, SLOT(slotSlideWorldTimer(int)));    connect(slideTimerStopWatch,SIGNAL(sliderReleased ()),this, SLOT(slotStartOneStopWatch()));	connect(cbSychron,SIGNAL(stateChanged ( int) ),this, SLOT(slotSynchroCheckBox(int)));	    slotActivityAnalogTimer();	//set the ok time	QTimer *timer = new QTimer(this);   connect(timer, SIGNAL(timeout()), this, SLOT(slotActivityDigitalTimer()));      timer->start(1000);}/***** deconstruction*****/YWorldTimer::~YWorldTimer(){                  }/********/void YWorldTimer::slotActivityAnalogTimer(){  if( m_digitalClock)	{      delete  m_digitalClock;      m_digitalClock=NULL;	}   m_analogClock  = new AnalogClock(frameTimer);  }/********/void YWorldTimer::slotActivityDigitalTimer(){    	//every second will check the offset value    slotUpdateOffset();//check whether AM or PM and update the time	 QTime time = QTime::currentTime();	 if(time.hour()+getTheOffsetTimeValue() >=24 )	 {       lbIndicateTimer->setText("AM");	 }	 else if(time.hour()+getTheOffsetTimeValue() >=12 )	 {        lbIndicateTimer->setText("PM");	 }	 else if (time.hour()+getTheOffsetTimeValue() <0 )     {        lbIndicateTimer->setText("PM");	 }	 else	 {       lbIndicateTimer->setText("AM");	 }	 timeEditConfigue->setTime(time);}/**********/void YWorldTimer::slotSetLocalTimeButton(bool ok){  // start the set time dialog   	 YSetLocalTime * set;           switch (m_eTimeZone )  {	  case eCHINA:		 set = new YSetLocalTime(this,m_conf,eCHINA);		 set->show();		break;	  case eEUROPE:		 set = new YSetLocalTime(this,m_conf,eEUROPE);		 set->show();	    		break;	  case eUSA:		 set = new YSetLocalTime(this,m_conf,eUSA);		 set->show();	    		break;	  case eERROR:	  default:	   	set = new YSetLocalTime(this,m_conf,eERROR);		set->show();		break;  };   }/**********/void YWorldTimer::slotSlideWorldTimer(int i){	QTime time = QTime::currentTime();	 	int j=time.hour();  switch(i)  {	   case eCHINA: //china    m_eTimeZone=eCHINA;	m_OffsetTime=m_conf->getChinaTimeOffset(0);	   m_analogClock->setOffsetTimeValue(m_OffsetTime);	  	   if( time.hour()+m_OffsetTime >=24)	   {        lbIndicateTimer->setText("AM");	   }	   else if( time.hour()+m_OffsetTime >=12)	   {            lbIndicateTimer->setText("PM");	   }	   else	   {          lbIndicateTimer->setText("AM");	   }      break;	  case eEUROPE: //europe		  m_eTimeZone=eEUROPE;		  m_OffsetTime=m_conf->getEuropeTimeOffset(0);//get the value from conf		   m_analogClock->setOffsetTimeValue( m_OffsetTime);	   if( time.hour()+m_OffsetTime >=12)	   {        lbIndicateTimer->setText("PM");	   }	   else	   {          lbIndicateTimer->setText("AM");	   }		  break;	  case eUSA:  //USA		  		  m_eTimeZone=eUSA;          m_OffsetTime=m_conf->getUsaTimeOffset(0);		  m_analogClock->setOffsetTimeValue( m_OffsetTime);        if( time.hour()+m_OffsetTime  )	   {        lbIndicateTimer->setText("AM");	   }	   else if(time.hour()+m_OffsetTime <=0 )	   {            lbIndicateTimer->setText("PM");	   }	   else if(  time.hour()+m_OffsetTime <=12)	   {          lbIndicateTimer->setText("PM");	   }	   else	   {          lbIndicateTimer->setText("AM");	   }		 break;  };}/***** after change the offet value , we need update the offset value for analog time *****/void YWorldTimer::slotUpdateOffset(){ switch (m_eTimeZone )  {	  case eCHINA:		 m_OffsetTime=m_conf->getChinaTimeOffset(0);	     m_analogClock->setOffsetTimeValue(m_OffsetTime);		break;	  case eEUROPE:		  m_OffsetTime=m_conf->getEuropeTimeOffset(0);//get the value from conf          m_analogClock->setOffsetTimeValue( m_OffsetTime);	    		break;	  case eUSA:		  m_OffsetTime=m_conf->getUsaTimeOffset(0);		  m_analogClock->setOffsetTimeValue( m_OffsetTime);	    		break;	  case eERROR:	  default:		break;  };   }/*****  event close windows*****/void YWorldTimer::closeEvent( QCloseEvent* ce ){	qDeleteAll(watchList.begin(), watchList.end());	watchList.clear();	m_conf->saveConf();	//delete the stream	if(m_Log!=NULL)	{	 m_Log->close();     delete m_LogStream;          delete m_Log;     m_LogStream=NULL;	 m_Log=NULL;	}    //start close win    ce->accept(); }/*****  activity  or disable the widget of checkbox*****/void  YWorldTimer::setSynchroEnable(bool b){ if(b==true) {  cbSychron->setDisabled (!b); //ennable the synchro check box } else {  cbSychron->setDisabled (!b);  //disable the synchro checkbox  cbSychron->setCheckState(Qt::Unchecked);//uncheck the checkbox if check ,because is disable }}/***** open one stop watch*****/void YWorldTimer::slotStartOneStopWatch(){	slideTimerStopWatch->setSliderPosition(1);//return back slider    YStopWatch *stopwatch1;	switch(getStopWatchCounter())	{	case 0:      stopwatch1=new YStopWatch(this);	  stopwatch1->setIndication(1); //set indication in the class stopwatch	  stopwatch1->setTitleName();  //set windows title display the indication	  stopwatch1->setTextStream( m_LogStream);	  watchList.append(stopwatch1);  //save to the value	  setStopWatchCounter(1); //save the counter of stop watch in this class	  stopwatch1->show();	  connect(stopwatch1,SIGNAL(closeStopWatch(int)),this,SLOT(slotCloseStopWatch(int)));	  break;	case 1:	  setSynchroEnable (true);//activity the synchro check box      stopwatch1=new YStopWatch(this);	  stopwatch1->setIndication(2);//set indication in the class stopwatch	  stopwatch1->setTitleName();//set windows title display the indication	  stopwatch1->setTextStream( m_LogStream);// set stream in order to save the stream	  watchList.append(stopwatch1);  //save to the value	  setStopWatchCounter(2);//save the counter of stop watch in this class	  stopwatch1->show();	  connect(stopwatch1,SIGNAL(closeStopWatch(int)),this,SLOT(slotCloseStopWatch(int)));      break;	case 2:      stopwatch1=new YStopWatch(this);	  stopwatch1->setIndication(3);//set indication in the class stopwatch	  stopwatch1->setTitleName();//set windows title display the indication	  stopwatch1->setTextStream( m_LogStream);// set stream in order to save the stream	  watchList.append(stopwatch1);  //save to the value	  setStopWatchCounter(3);//save the counter of stop watch in this class	  stopwatch1->show();	   connect(stopwatch1,SIGNAL(closeStopWatch(int)),this,SLOT(slotCloseStopWatch(int)));      break;	case 3:	default:		QMessageBox::warning(this, "No StopWatch",                                    "Could not launch a new StopWatch,\n"                                    "because the Max value of  Stop watch are 3. You can only delete\n"                                    "one Stop Watch,if you want a new.");		break;	};		}/**********/void YWorldTimer::slotSynchroCheckBox(int i){	if(i==Qt::Unchecked)	{	  if(m_SynchroEnable==true)	  {        disSynchroStopWatchList();	  }       m_SynchroEnable = false;		      	}	else	{      m_SynchroEnable = true;	  synchroStopWatchList();	}}/***** delete the  stop watch in the list when receive the signal "close windows*****/void YWorldTimer::slotCloseStopWatch(int ind){	int i=0;	//check we have how much stop watch  switch(ind)	{    	case 1:	  watchList.removeAt(0);//remove from the list,it seem while delete the object      setStopWatchCounter(getStopWatchCounter()-1);	  //reset the indication	  for(i=0;i<watchList.count();i++)	  {          watchList.at(i)->setIndication(i+1);//set indication in the class stopwatch	      watchList.at(i)->setTitleName();	  }	  //we will set sychron is disable	  if(i<2)	  {       setSynchroEnable(false);	  }      break;	case 2:	  watchList.removeAt(1);//remove form the list      setStopWatchCounter(getStopWatchCounter()-1);	  //reset the indication	  for(i=0;i<watchList.count();i++)	  {         watchList.at(i)->setIndication(i+1);//set indication in the class stopwatch	     watchList.at(i)->setTitleName();	   }	  //we will set sychron is disable	  if(i<2)	  {       setSynchroEnable(false);	  }      break;	case 3:      watchList.removeAt(2);//remove form the list	  setStopWatchCounter(getStopWatchCounter()-1);	  break;	case 0:	default:		break;	};}/***** synchro the stop watch list*****/void YWorldTimer::synchroStopWatchList(){  YStopWatch * sw0,*sw1,*sw2;  switch(getStopWatchCounter())  {  case 2:	  sw0= watchList.at(0);      sw1= watchList.at(1);	  connect( sw0,SIGNAL(stopStopWatch(bool)), sw1,SLOT(slotStartButton(bool)));	  break;  case 3:	   sw0= watchList.at(0);       sw1= watchList.at(1);	   sw2= watchList.at(2);       connect(sw0,SIGNAL(stopStopWatch(bool)), sw1,SLOT(slotStartButton(bool)));	   connect( sw1,SIGNAL(stopStopWatch(bool)), sw2,SLOT(slotStartButton(bool)));	  break;  default:	  break;  };	 }/***** disconnect the slot function*****/void YWorldTimer::disSynchroStopWatchList(){  YStopWatch * sw0,*sw1,*sw2;  switch(getStopWatchCounter())  {  case 2:	  sw0= watchList.at(0);      sw1= watchList.at(1);	  disconnect( sw0,SIGNAL(stopStopWatch(bool)), sw1,SLOT(slotStartButton(bool)));	  break;  case 3:	   sw0= watchList.at(0);       sw1= watchList.at(1);	   sw2= watchList.at(2);       disconnect(sw0,SIGNAL(stopStopWatch(bool)), sw1,SLOT(slotStartButton(bool)));	   disconnect( sw1,SIGNAL(stopStopWatch(bool)), sw2,SLOT(slotStartButton(bool)));	  break;  default:	  break;  };}/***** open the stream*****/bool YWorldTimer::openLogStream(){	bool res=false;	//just for clean the text	QDateTime t;	t=QDateTime::currentDateTime ();	QFile f(m_conf->getStopWatchLogFile());     if (f.open(QFile::WriteOnly | QFile::Truncate)) {         QTextStream stream(&f);		 stream<<"###"<<char(0x0d)<<char(0x0a)<<"##"<<" World Time and Stopwatch log File, by wya. "<<t.toString("yyyy MM dd hh:mm:ss")<<char(0x0d)<<char(0x0a)<<"###"<<char(0x0d)<<char(0x0a);	}	else	{      	QMessageBox::warning(this, "Can't open the stopwatch log file",                                    "Error when open a new StopWatch log file");		return res=false;	}	f.close();	 m_Log=new QFile(m_conf->getStopWatchLogFile());    if (m_Log->open(QFile::WriteOnly|QIODevice::Append)) {         		m_LogStream =new QTextStream(m_Log);		          *m_LogStream<<"******************************************************************************"<<char(0x0d)<<char(0x0a);		 res=true;	}	return res;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产a久久麻豆| 国产人妖乱国产精品人妖| 日韩一区二区三区精品视频| 欧美激情中文不卡| 日韩国产在线一| 波多野结衣中文字幕一区 | 视频一区二区三区在线| 国产一区二区不卡| 欧美日韩国产首页| 亚洲色图一区二区| 国产成人在线网站| 精品国产a毛片| 性久久久久久久久久久久| 成人性生交大片| 精品国产乱码久久| 日韩电影免费在线观看网站| 色综合久久99| 最新高清无码专区| 成人福利视频在线| 国产精品美日韩| 国产精品伊人色| 亚洲精品在线观| 人人精品人人爱| 日韩一卡二卡三卡四卡| 日日欢夜夜爽一区| 91极品美女在线| 最好看的中文字幕久久| 国产成人aaa| 国产清纯在线一区二区www| 久久国产精品99久久久久久老狼| 欧美另类videos死尸| 亚洲一区二区中文在线| 欧美最猛黑人xxxxx猛交| 亚洲天堂2016| 欧美综合欧美视频| 亚洲综合一区二区| 欧美日韩一区二区三区在线看| 一区二区三区四区在线| 91在线视频播放地址| 成人欧美一区二区三区小说| 99久久伊人精品| 亚洲三级在线看| 欧美日韩一级二级三级| 亚洲国产一区二区a毛片| 欧美丝袜丝交足nylons图片| 久久在线观看免费| 中文欧美字幕免费| 欧美电视剧免费观看| 国产精品第四页| 色成人在线视频| 亚洲成av人片一区二区三区| 欧美日韩国产天堂| 韩国成人精品a∨在线观看| 久久久久国产免费免费| 成人av网站在线| 有坂深雪av一区二区精品| 欧美日韩国产美| 久久国产精品一区二区| 国产精品国产三级国产普通话三级 | 亚洲主播在线观看| 日韩女优视频免费观看| 国产高清久久久久| 亚洲欧洲综合另类在线| 在线成人免费观看| 国产成人自拍在线| 亚洲激情在线激情| 日韩写真欧美这视频| 成人精品一区二区三区中文字幕| 亚洲精品视频一区| 欧美不卡在线视频| 97久久超碰精品国产| 日韩高清在线观看| 国产精品美日韩| 日韩三级视频在线看| 99re这里只有精品首页| 轻轻草成人在线| 亚洲人成伊人成综合网小说| 3atv在线一区二区三区| a在线欧美一区| 黑人巨大精品欧美一区| 亚洲一区二区三区精品在线| 欧美精品一区二区三区蜜桃 | 91麻豆精品国产91久久久久| 国产精品一二三四区| 天天综合日日夜夜精品| 国产精品久久久久久久久动漫 | 久久精品夜夜夜夜久久| 欧美日韩三级在线| 99这里只有久久精品视频| 老色鬼精品视频在线观看播放| 亚洲精品成人在线| 国产女人水真多18毛片18精品视频| 欧美日韩不卡一区二区| 色综合久久久久网| 成人av网站在线观看免费| 国产精品一区免费视频| 美国毛片一区二区| 婷婷国产在线综合| 亚洲一区二区三区小说| 国产精品成人免费在线| 久久九九全国免费| 久久午夜羞羞影院免费观看| 欧美一区二区性放荡片| 欧美日韩国产片| 在线观看国产日韩| 91免费观看国产| 99精品视频中文字幕| www.欧美色图| 懂色av一区二区三区免费观看| 久草这里只有精品视频| 日韩不卡一区二区三区| 三级欧美在线一区| 日本一不卡视频| 日本三级亚洲精品| 蜜臀av性久久久久蜜臀aⅴ四虎| 亚洲成人手机在线| 丝袜亚洲精品中文字幕一区| 性久久久久久久| 亚洲成人动漫在线免费观看| 亚洲成人动漫在线免费观看| 亚洲第一av色| 免费观看91视频大全| 免费日韩伦理电影| 国产一区二区影院| 成人一区二区三区| 99精品桃花视频在线观看| 色就色 综合激情| 欧美日韩高清不卡| 欧美一级欧美三级在线观看| 欧美v亚洲v综合ⅴ国产v| 久久你懂得1024| 中文字幕高清一区| 亚洲精品久久久蜜桃| 亚洲v日本v欧美v久久精品| 日本在线观看不卡视频| 国产一区福利在线| 99精品国产99久久久久久白柏| 在线精品视频一区二区三四| 欧美精品色一区二区三区| 久久日韩粉嫩一区二区三区| 国产精品免费看片| 亚洲成人av一区二区三区| 精品在线免费观看| 97精品久久久午夜一区二区三区| 在线日韩一区二区| 日韩欧美一区二区久久婷婷| 久久免费偷拍视频| 一区二区不卡在线视频 午夜欧美不卡在 | 久久久久久99精品| 1区2区3区国产精品| 日韩高清中文字幕一区| 丁香婷婷综合色啪| 欧美日韩高清一区二区三区| 国产亚洲人成网站| 一区二区日韩电影| 国产99一区视频免费| 欧美精品1区2区3区| 久久精品亚洲精品国产欧美| 一区二区三区国产豹纹内裤在线| 久草精品在线观看| 欧美日韩小视频| 中文字幕电影一区| 午夜a成v人精品| 91在线免费看| 国产亚洲欧美中文| 日精品一区二区| 99精品一区二区三区| 久久综合色婷婷| 亚洲国产综合在线| www.欧美精品一二区| 欧美一区二区三区在线视频| 综合激情成人伊人| 国产精品99久久久久久有的能看| 欧美日韩日日摸| **性色生活片久久毛片| 国产精品亚洲专一区二区三区| 欧美日韩一区视频| 亚洲激情图片小说视频| 大尺度一区二区| xf在线a精品一区二区视频网站| 亚洲一区二区精品视频| 99久久免费视频.com| 国产亚洲综合在线| 久久er精品视频| 欧美一区二区黄色| 青青草一区二区三区| 欧美视频一区二区三区四区| 亚洲欧美日韩精品久久久久| 成人精品视频网站| 国产亚洲成aⅴ人片在线观看| 久久电影网电视剧免费观看| 欧美一区二区视频在线观看2020| 夜夜爽夜夜爽精品视频| 91免费在线视频观看| 国产精品超碰97尤物18| 成人免费黄色大片| 国产精品全国免费观看高清| 国产一区二区三区高清播放| 欧美精品一区二区高清在线观看| 蜜桃av噜噜一区|