当前位置: 首页 > wzjs >正文

洪梅镇做网站网站建设中图片

洪梅镇做网站,网站建设中图片,网站建设 嘉定,seosem是指什么意思&#xff08;1&#xff09;本 QTime 类型&#xff0c;是支持 <<、 >> 运算符直接往数据流里输出的 &#xff1a; &#xff08;2&#xff09; &#xff08;3&#xff09;本段开始 QTime 与字符串之间的转换 &#xff1a; &#xff08;4&#xff09;格式字符 &#…

(1)本 QTime 类型,是支持 <<、 >> 运算符直接往数据流里输出的

在这里插入图片描述

(2)

在这里插入图片描述

++

在这里插入图片描述

(3)本段开始 QTime 与字符串之间的转换

在这里插入图片描述

(4)格式字符

在这里插入图片描述

++

在这里插入图片描述

++

在这里插入图片描述

(5)源码来自于 qdatetime . h

/*
The QTime class provides clock time functions.QTime 对象包含一个时钟时间,它可以表示为午夜以来的小时、分钟、秒和亳秒数。
它提供了比较时间和通过添加毫秒数来操作时间的函数。
QTime 对象应该通过值而不是通过引用传递给 const;它们只是包装int。QTime使用24小时制时钟格式;它没有AM/PM的概念。
与QDateTime不同,QTime不知道时区或夏令时(DST)。
通常可以通过显式指定小时、分钟、秒和毫秒数来创建 QTime 对象,
或者使用静态函数currentTime()来创建一个表示系统本地时间的 QTime 对象。hour()、second()和msec()函数提供对时间小时数、分钟数、秒数minute()和毫秒数的访问。
toString()函数以文本格式提供相同的信息。
addSecs()和addMSecs()函数提供了比给定时间晚给定秒数或毫秒数的时间。
相应地可以使用secsTo()或msecsTo()函数找到两个时间之间的秒数或毫秒数。QTime提供了一套完整的运算符来比较两个QTime对象;
较早的时间被认为小于较晚的时间;如果A.msecsTo(B)是正数,则A<B。
QTime对象也可以从文本表示形式使用fromString()创建,并使用toString()转换为字符串表示形式。
All conversion to and from string formats is done using the C locale.
对于本地化转换,请参见QLocale。*/class Q_CORE_EXPORT QTime
{
private:enum TimeFlag { NullTime = -1 };constexpr inline int ds() const { return mds == -1 ? 0 : mds; }int mds;         //本类的数据成员.应该存储的是从夜里 0点开始的毫秒数friend constexpr //友元函数,这是全局函数bool operator==(QTime lhs, QTime rhs) { return lhs.mds == rhs.mds; }friend constexprbool operator!=(QTime lhs, QTime rhs) { return lhs.mds != rhs.mds; }friend constexprbool operator< (QTime lhs, QTime rhs) { return lhs.mds <  rhs.mds; }friend constexprbool operator<=(QTime lhs, QTime rhs) { return lhs.mds <= rhs.mds; }friend constexprbool operator> (QTime lhs, QTime rhs) { return lhs.mds >  rhs.mds; }friend constexprbool operator>=(QTime lhs, QTime rhs) { return lhs.mds >= rhs.mds; }friend class QDateTime;friend class QDateTimePrivate;#ifndef QT_NO_DATASTREAM //以下俩函数是存在的,随后的整理将取消这样的条件编译,为了整齐friend Q_CORE_EXPORT QDataStream & operator<<(QDataStream &, QTime  );friend Q_CORE_EXPORT QDataStream & operator>>(QDataStream &, QTime &);
#endifexplicit constexpr QTime(int ms) : mds(ms) {}public://Constructs a null time object.//For a null time, isNull() returns true and isValid() returns false.//If you need a zero time, use QTime(0, 0).//For the start of a day, see QDate::startOfDay().constexpr   QTime () : mds(NullTime) {}QTime (int h, int m, int s = 0, int ms = 0); //计时起点均从 0开始//Constructs a time with hour h, minute m, seconds s and milliseconds ms.//h must be in the range 0 to 23, m and s must be in the range 0 to 59,//and ms must be in the range 0 to 999.bool    setHMS(int h, int m, int s    , int ms = 0);//Sets the time to hour h, minute m, seconds s and milliseconds ms.//Returns true if the set time is valid; otherwise returns false.static  QTime  currentTime();//返回系统时钟报告的当前时间。//请注意,准确性取决于底层操作系统的准确性;并非所有系统都提供1毫秒的准确性。//此外,currentTime()仅在一天内增加;每当午夜过去时,它会减少24小时;//此外,如果发生夏令时转换,其变化可能不对应于经过的时间。//Returns true if the time is null  //总之 null time 也是 invalid time//(i.e., the QTime object was constructed using the default constructor);//otherwise returns false. A null time is also an invalid time.constexpr bool isNull () const { return mds == NullTime; }bool isValid() const; //enum QTime::TimeFlag { NullTime = -1 };//Returns true if the time is valid; otherwise returns false.//For example, the time 23:30:55.746 is valid, but 24:12:30 is invalid.static    bool isValid(int h, int m, int s, int ms = 0); //这是个静态成员函数//Returns true if the specified time is valid; otherwise returns false.//The time is valid if h is in the range 0 to 23,//m and s are in the range 0 to 59, and ms is in the range 0 to 999.int hour  () const; //Returns the hour         part (0 to  23) of the time.int minute() const; //Returns the minute       part (0 to  59) of the time.int second() const; //Returns the second       part (0 to  59) of the time.int msec  () const; //Returns the millisecond  part (0 to 999) of the time.//Returns -1 if the time is invalid. 这四个函数都出错返 -1//返回从当前时间到 t的  秒数。如果t早于当前时间,则返回的秒数是负数。//因为 QTime 在一天内测量时间,而一天有 86400秒,所以结果总是在 -86400和 86400 之间。//secsTo()不考虑任何毫秒。    Returns 0 if either time is invalid.int  secsTo(QTime t) const;int msecsTo(QTime t) const;//返回从当前时间到 t的毫秒数。如果t早于当前时间,则返回的毫秒数为负数。//因为 OTime 在一天内测量时间,而一天有 86400 秒,//所以结果总是在 -86400000 到 86400000 毫秒之间。如果时间无效,则返回 0。//Returns the number of msecs since the start of the day, i.e. since 00:00:00.constexpr inline  int       msecsSinceStartOfDay() const{   return mds == NullTime ? 0 : mds; } //返回值是以毫秒为单位static  constexpr inline  QTime fromMSecsSinceStartOfDay(int msecs){   return QTime(msecs); }  //意思是构造一个 QTime对象,其时间值距离起点是 形参msecs 毫秒//Returns a new QTime instance with the time set to the number of msecs since the//start of the day, i.e. since 00:00:00.//If msecs falls outside the valid range an invalid QTime will be returned.//返回--个 QTime 对象,该对象包含比此对象的时间晚 secs秒的时间(如果 secs为负数,则为更早的时间)//请注意,如果时间超过午夜,时间将重新开始。如果此时间无效,则返回 null 时间。[[nodiscard]] QTime  addSecs(int secs) const; //这俩函数不会改变原对象的时间值[[nodiscard]] QTime addMSecs(int   ms) const;//返回一个 QTime 对象,其中包含比此对象的时间晚 ms 毫秒的时间(如果 ms为负数,则为更早的时间)。//请注意,如果时间超过午夜,时间将重新计算。请参addSecs()示例。如果此时间无效,则返回 null时间。//输出是一样的         "00:38:40"  "00:38:40"   "00:38:40"   "00:38:40.658"//enum Qt::DateFormat { TextDate, ISODate, RFC2822Date = 8, ISODateWithMs };QString toString(  Qt::DateFormat     f = Qt::TextDate) const;QString toString(      QStringView    format) const;//Returns the time as a string.//The format parameter determines the format of the result string.QString toString(const QString      & format) const  //按照自定义格式进行转换为文本{ return toString(qToStringViewIgnoringNull(format)); }//任何包含在单引号中的非空字符序列都会被原样包含在输出字符串中,(去掉引号),即使它包含格式化字符。//在输出中,连续的两个单引号("''")会被一个单引号替换。      //格式字符 hH m s zzz AP//格式字符串中的所有其他字符都会被原样包含在输出字符串。//没有分隔符的格式(例如“ddMM”)是支持的,但必须谨慎使用,因为生成的字符串并不总是可读的//(例如,如果“dM”产生“212”,它可能意味着12月2日或2月21日)//If the time is invalid, an empty string will be returned.//举例:qDebug() << time.toString("时 hh,分 mm,秒 ss,毫秒 zzz");//举例:qDebug() << time.toString("时  h,分  m,秒  s,毫秒   z AP");//举例:QTime::fromString("+++10---6***36???24 PM" , "+++h---m***s???z AP"  );//举例:QTime::fromString("+++10---6***36???024 PM", "+++h---m***s???zzz PM");//得到结果分别为  QTime("22:06:36.240")、  QTime("10:06:36.024")static QTime fromString(const QString      & string, //按自定义格式读取时间值const QString      & format){ return fromString(string, qToStringViewIgnoringNull(format)); }//所有其他输入字符将被视为文本。任何包含在单引号中的非空字符序列也将被视为文本(去掉引号),//而不是被解释为表达式。                                 //未给出的时间域将按 0值处理。//Any field that is not represented in the format will be set to zero.static QTime fromString(const QString      & string, //按公用格式读取数据Qt::DateFormat     format = Qt::TextDate){ return fromString(qToStringViewIgnoringNull(string), format); }//enum Qt::DateFormat { TextDate, ISODate, RFC2822Date = 8, ISODateWithMs };//Returns the time represented in the string as a QTime using the format given,//or an invalid time if this is not possible.        //使用公用格式static QTime fromString(const QString      & string,QStringView    format);static QTime fromString(      QStringView    string,Qt::DateFormat     format = Qt::TextDate);static QTime fromString(      QStringView    string,QStringView    format){ return fromString(string.toString(), format); }}; //完结 class QTime
Q_DECLARE_TYPEINFO(QTime, Q_RELOCATABLE_TYPE);

(6)

谢谢

http://www.dtcms.com/wzjs/801967.html

相关文章:

  • 大连做公司网站的公司做当地门户网站多少钱
  • 百度大数据分析新乡seo推广
  • 山东省建设厅官方网站怎么样男女做某事网站
  • 电子商务网站建设需要哪种语言乐至县建设局网站
  • 搭建公司介绍网站wordpress付费才能看
  • 环球资源网的网站特色app推广接单渠道
  • 汉中做网站的公司c 网站开发平台
  • lamp网站开发 pdf网站后台管理代码
  • asp网站检查公司怎么开网站
  • 网站商城运营模式安装wordpress 403
  • 物流公司 网站模板泉州营销型网站建设
  • 网站建设需要集齐哪5份资料做网站建设公司crm在线的提升服务
  • 中学生做网站的软件深圳企业网站制作公司介绍
  • 一个ip可以做几个网站怎么获取网站的图片
  • 青岛网站建设微信群铁路项目建设 网站
  • 企业网站推广方法有哪些调查网站做调查不容易过
  • 网站源码下载免费东莞网站建设效果
  • 微信小程序开发网站建设网站开发电商项目的成本管理怎么写
  • 有没有做试题的网站山东济宁网站建设设计
  • 网站报价方案 模板厦门百城建设有限公司网站
  • 公司建设网站带来什么湖南省建设信息网
  • 芜湖建设路小学网站为什么说能进中交不进中建
  • php做门户网站电子商务的网站开发
  • 如何避免网站被攻击中文网站建设计划书
  • 网站制作哪些分类北京网站建设w亿玛酷1订制
  • 闵行网站开发定制app软件开发
  • 成都购物网站建设杭州网站建设专家
  • 如何搭建wordpress泉州网络seo
  • 静态网站开发工具有哪些wordpress修改文章阅读量
  • 简单网站设计搜索引擎优化的简写是