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

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

?? qextdatetimespinbox.cpp

?? Linux/Windows 環境下的跨平臺開發程序
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
    QStringList days;
    QStringList months;
    days+="Monday";
    days+="Tuesday";
    days+="Wednesday";
    days+="Thursday";
    days+="Friday";
    days+="Saturday";
    days+="Sunday";
    months+="January";
    months+="February";
    months+="March";
    months+="April";
    months+="May";
    months+="June";
    months+="July";
    months+="August";
    months+="September";
    months+="October";
    months+="November";
    months+="December";
    setStrings(days, months);
}

/*!
\fn int QextDateTimeSpinBox::setFormat(QString& format)
Sets the format of the displayed date and/or time, using the format specifiers described in the
documentation for 
QextDateTimeSpinBox::QextDateTimeSpinBox(const QString*, const QDate*, const QTime*, 
                                         const QStringList*, const QStringList*).
*/
void QextDateTimeSpinBox::setFormat(const QString& format) {
    Validator->setFormat(format);
    refresh();
}

/*!
\fn void QextDateTimeSpinBox::setStrings(const QStringList* days, const QStringList* months)
Sets the strings used to represent the daysof the week and the months of the year.  By 
default these strings are English.
*/
void QextDateTimeSpinBox::setStrings(const QStringList& days, const QStringList& months) {
    setLongMonthNames(months);
    setLongDayNames(days);
}

/*!
\fn void QextDateTimeSpinBox::setTime(const QTime& time)
Sets the time used by the control to the one specified by the time argument.
*/
void QextDateTimeSpinBox::setTime(const QTime& time) {
    Time=time;
}

/*!
\fn void QextDateTimeSpinBox::stepDown()
[public slot]
responds to the down arrow of the spin box control
*/
void QextDateTimeSpinBox::stepDown() {
    QDate TempDate;
    int hour=Time.hour();
    int minute=Time.minute();
    int second=Time.second();
    int year=Date.year();
    int month=Date.month();
    int day=Date.day();
    int cursor=editor()->cursorPosition();
    CursorPos=cursor;

    //find which field the cursor is currently in
    QextDateTimeValidator::Token const *Field=fieldFromIndex(cursor);
    
    //if cursor is at end of string, do nothing
    if (!Field) {
        return;
    }
    switch(Field->FType) {
        case QextDateTimeValidator::FIELD_LITERAL:
            break;

        case QextDateTimeValidator::FIELD_AMPM:
            hour+=12;
            hour%=24;
            Time.setHMS(hour, minute, second);
            break;

        case QextDateTimeValidator::FIELD_DAY:
        case QextDateTimeValidator::FIELD_DAY_STRING:
            day--;

            //edge case
            if (day<1) {
                TempDate.setYMD(year, month, 1);
                day=TempDate.daysInMonth();
#ifdef QTVER_PRE_30
                editor()->cursorRight(FALSE);
#else
                editor()->cursorForward(FALSE);
#endif
            }
            Date.setYMD(year, month, day);

            //cursor tracks beginning of field
            if (day==9) {
#ifdef QTVER_PRE_30
                editor()->cursorLeft(FALSE);
#else
                editor()->cursorBackward(FALSE);
#endif
            }
            break;
        
        case QextDateTimeValidator::FIELD_HOUR_12:
        case QextDateTimeValidator::FIELD_HOUR_24:
            hour--;
            if (hour<0) {
                hour=23;
            }
            Time.setHMS(hour, minute, second);
            break;

        case QextDateTimeValidator::FIELD_MINUTE:
            minute--;
            if (minute<0) {
                minute=59;
            }
            Time.setHMS(hour, minute, second);
            break;

        case QextDateTimeValidator::FIELD_MONTH:
        case QextDateTimeValidator::FIELD_MONTH_STRING:
            month--;
            if (month<1) {
                month=12;
            }
            TempDate.setYMD(year, month, 1);
            if (day>TempDate.daysInMonth()) {
                day=TempDate.daysInMonth();
            }
            Date.setYMD(year, month, day);
            break;

        case QextDateTimeValidator::FIELD_SECOND:
            second--;
            if (second<0) {
                second=59;
            }
            Time.setHMS(hour, minute, second);
            break;

        case QextDateTimeValidator::FIELD_YEAR_2:
        case QextDateTimeValidator::FIELD_YEAR_4:
            year--;

            //QDate edge case
            if (year<1753) {
                year=1753;
            }

            //special case for February in leap-years
            if (month==2 && day==29) {
                day=28;
            }
            Date.setYMD(year, month, day);
            break;
    }

    //update display in the editor
    refresh();

    //move cursor to beginning of current field for use with variable-sized fields
    CursorPos=indexFromField(Field);
    editor()->setCursorPosition(CursorPos);
}

/*!
\fn void QextDateTimeSpinBox::stepUp()
[public slot]
responds to the up arrow of the spin box control
*/
void QextDateTimeSpinBox::stepUp() {
    QDate TempDate;
    int hour=Time.hour();
    int minute=Time.minute();
    int second=Time.second();
    int year=Date.year();
    int month=Date.month();
    int day=Date.day();
    int cursor=editor()->cursorPosition();
    CursorPos=cursor;

    //find which field the cursor is currently in
    QextDateTimeValidator::Token const *Field=fieldFromIndex(cursor);
    
    //if cursor is at end of string, do nothing
     if (!Field) {
        return;
    }
    
    //update the field if necessary
    switch(Field->FType) {
        case QextDateTimeValidator::FIELD_LITERAL:
            break;

        case QextDateTimeValidator::FIELD_AMPM:
            hour+=12;
            hour%=24;
            Time.setHMS(hour, minute, second);
            break;

        case QextDateTimeValidator::FIELD_DAY:
        case QextDateTimeValidator::FIELD_DAY_STRING:
            day++;

            //edge case
            if (day>Date.daysInMonth()) {
                day=1;
#ifdef QTVER_PRE_30
                editor()->cursorLeft(FALSE);
#else
                editor()->cursorBackward(FALSE);
#endif
            }
            Date.setYMD(year, month, day);
            if (day==10) {
#ifdef QTVER_PRE_30
                editor()->cursorRight(FALSE);
#else
                editor()->cursorForward(FALSE);
#endif
            }
            break;
        
        case QextDateTimeValidator::FIELD_HOUR_12:
        case QextDateTimeValidator::FIELD_HOUR_24:
            hour++;
            hour%=24;
            Time.setHMS(hour, minute, second);
            break;

        case QextDateTimeValidator::FIELD_MINUTE:
            minute++;
            if (minute>59) {
                minute=0;
            }
            Time.setHMS(hour, minute, second);
            break;

        case QextDateTimeValidator::FIELD_MONTH:
        case QextDateTimeValidator::FIELD_MONTH_STRING:
            month++;
            if (month>12) {
                month=1;
            }
            TempDate.setYMD(year, month, 1);
            if (day>TempDate.daysInMonth()) {
                day=TempDate.daysInMonth();
            }
            Date.setYMD(year, month, day);
            break;

        case QextDateTimeValidator::FIELD_SECOND:
            second++;
            if (second>59) {
                second=0;
            }
            Time.setHMS(hour, minute, second);
            break;

        case QextDateTimeValidator::FIELD_YEAR_2:
        case QextDateTimeValidator::FIELD_YEAR_4:
            year++;

            //QDate edge case
            if (year>8000) {
                year=8000;
            }

            //special case for February in leap-years
            if (month==2 && day==29) {
                day=28;
            }
            Date.setYMD(year, month, day);
            break;
    }

    //update display in the editor
    refresh();

    //move cursor to beginning of current field for use with variable-sized fields
    CursorPos=indexFromField(Field);
    editor()->setCursorPosition(CursorPos);
}

/*!
\fn QTime QextDateTimeSpinBox::time(void) const
Returns the most recent valid time entered into the control.  
*/
QTime QextDateTimeSpinBox::time(void) const {
    return Time;
}

/*!
\fn void QextDateTimeSpinBox::updateDisplay()
override QSpinBox::updateDisplay() to keep the cursor from moving all around the edit box
on mouseover events
*/
void QextDateTimeSpinBox::updateDisplay() {
    CursorPos=editor()->cursorPosition();
    QSpinBox::updateDisplay();
    editor()->setCursorPosition(CursorPos);
}

/*!
\fn QextDateTimeValidator* QextDateTimeSpinBox::validator(void) const
returns date validator pointer
*/
QextDateTimeValidator* QextDateTimeSpinBox::validator(void) const {
    return Validator;
}


/*!
\fn QString QextDateTimeSpinBox::longMonthName(int monthNum) const
returns the month name for the month specified.  By default, longMonthName(1) will return 
"January", etc.
*/
QString QextDateTimeSpinBox::longMonthName(int monthNum) const {
    return monthNames[monthNum-1];    
}

/*!
\fn QString QextDateTimeSpinBox::longDayName(int dayNum) const
returns the day name for the day of the week specified.  By default longDayName(1) will return 
"Monday", etc.  Note that this is different from the American week which starts with Sunday.  This
is to maintain consistency with the QT 3.0 function QDate::longDayName().
*/
QString QextDateTimeSpinBox::longDayName(int dayNum) const {
    return dayNames[dayNum-1];    
}

/*!
\fn void QextDateTimeSpinBox::setLongMonthNames(const QStringList&)
Sets the names of the months.  The QStringList reference passed in is assumed to have at least 12
QStrings in it; any after the first 12 will be ignored.
*/
void QextDateTimeSpinBox::setLongMonthNames(const QStringList& names) {
    QStringList::ConstIterator i=names.begin();
    int j;
    for (j=0; j<12; j++) {
        monthNames[j]=*i;
        i++;
    }
}

/*!
\fn void QextDateTimeSpinBox::setLongDayNames(const QStringList&)
Sets the names of days of the week.  Note that Monday is assumed to map to the first element, and 
Sunday to the last.  This is for consistency with the behavior of QDate.  The QStringList passed 
in is assumed to have at least 7 elements.  Any elements beyond the first 7 are ignored.
*/
void QextDateTimeSpinBox::setLongDayNames(const QStringList& names) {
    QStringList::ConstIterator i=names.begin();
    int j;
    for (j=0; j<7; j++) {
        dayNames[j]=*i;
        i++;
    }
}
    

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区日韩| 精品伦理精品一区| 精品精品国产高清a毛片牛牛 | 国产精品女上位| 亚洲电影第三页| 成人网在线免费视频| 国产日本欧洲亚洲| 日本中文一区二区三区| 91久久线看在观草草青青| 国产午夜亚洲精品羞羞网站| 日韩电影一二三区| 欧美亚日韩国产aⅴ精品中极品| 久久久久久久国产精品影院| 日韩不卡一区二区| 欧美色网站导航| 亚洲视频 欧洲视频| 国产91高潮流白浆在线麻豆 | 成人免费av资源| 日韩欧美国产一区二区在线播放| 一区二区三区小说| 波多野洁衣一区| 欧美激情中文字幕一区二区| 精品一区二区三区欧美| 欧美一区二区三区四区在线观看| 亚洲午夜三级在线| 欧亚一区二区三区| 亚洲自拍偷拍图区| 欧美自拍丝袜亚洲| 亚洲大片精品永久免费| 欧美午夜影院一区| 亚洲精品国产无天堂网2021| 99精品一区二区三区| 亚洲同性同志一二三专区| jvid福利写真一区二区三区| 国产精品毛片久久久久久| 国产91色综合久久免费分享| 国产三级精品在线| 国产成人av一区二区三区在线| 久久免费视频一区| 91久久线看在观草草青青| 亚洲一区二区三区小说| 欧美色成人综合| 午夜激情一区二区三区| 91精品国产一区二区三区| 全国精品久久少妇| 精品国产乱码久久久久久久| 国产福利精品一区二区| 亚洲欧美一区二区在线观看| 91丨porny丨在线| 午夜成人免费电影| 亚洲精品在线一区二区| 成人免费视频网站在线观看| 亚洲免费观看高清完整版在线 | 亚洲视频图片小说| 欧美日韩一区小说| 久久99精品久久久久婷婷| 国产亚洲自拍一区| 91浏览器在线视频| 丝袜美腿亚洲一区| 国产日韩精品一区二区三区在线| 97精品超碰一区二区三区| 亚洲成人7777| 国产性做久久久久久| 色老头久久综合| 久久成人羞羞网站| 亚洲欧美日韩国产综合| 欧美一区二区三区色| 成人午夜又粗又硬又大| 午夜视频在线观看一区| 久久久综合九色合综国产精品| 99久久久久久99| 奇米一区二区三区av| 国产精品丝袜91| 91精品啪在线观看国产60岁| 成人高清在线视频| 日韩中文字幕av电影| 中文字幕亚洲精品在线观看| 日韩一区二区三区三四区视频在线观看 | 日韩三级伦理片妻子的秘密按摩| 国产成人亚洲综合a∨婷婷图片| 一区二区三区资源| 国产欧美综合在线观看第十页| 欧美色综合天天久久综合精品| 成人午夜视频在线| 精品在线一区二区| 午夜私人影院久久久久| 成人欧美一区二区三区| 337p粉嫩大胆噜噜噜噜噜91av| 欧美中文字幕一区| 94-欧美-setu| 国产福利精品一区| 精品在线播放午夜| 首页国产欧美久久| 亚洲一区二区三区在线播放| 中文字幕一区免费在线观看| 久久久美女艺术照精彩视频福利播放| 欧美亚洲国产一卡| 色婷婷激情综合| 成人avav影音| 国产成人免费视频| 国产一区二区剧情av在线| 偷窥国产亚洲免费视频| 亚洲一区中文日韩| 亚洲三级理论片| 国产精品麻豆网站| 国产精品视频你懂的| 久久精品夜色噜噜亚洲aⅴ| 欧美变态tickling挠脚心| 7777精品伊人久久久大香线蕉超级流畅 | 精品福利av导航| 欧美一区二区免费| 91精品国模一区二区三区| 欧美日韩一区二区电影| 欧美综合天天夜夜久久| 欧美性感一类影片在线播放| 在线免费观看日本一区| 欧美性色黄大片| 欧美日韩国产综合一区二区| 欧美人成免费网站| 欧美电影在哪看比较好| 日韩欧美一级二级| 久久免费美女视频| 中文字幕中文字幕一区二区| 国产精品每日更新| 一区二区三区在线观看动漫| 亚洲午夜精品网| 日本网站在线观看一区二区三区| 日韩电影免费在线看| 极品少妇一区二区三区精品视频| 国产在线不卡一区| aaa亚洲精品一二三区| 色偷偷88欧美精品久久久| 欧美日韩你懂的| 欧美一级日韩一级| 国产无遮挡一区二区三区毛片日本| 日本一区二区在线不卡| 亚洲美女在线一区| 日韩福利电影在线| 国产很黄免费观看久久| 91毛片在线观看| 欧美老女人在线| 欧美精品一区二区高清在线观看| 欧美国产精品一区二区三区| 一区二区三区在线免费播放| 日本不卡不码高清免费观看| 国产精品18久久久久| 色综合久久久久网| 欧美成人伊人久久综合网| 国产精品入口麻豆原神| 亚洲成人手机在线| 国产成人h网站| 欧美日韩国产一级片| 久久精子c满五个校花| 夜夜揉揉日日人人青青一国产精品| 老司机精品视频导航| 97超碰欧美中文字幕| 精品剧情v国产在线观看在线| 欧美国产日本韩| 青椒成人免费视频| 97久久人人超碰| 亚洲午夜av在线| 国产精品一二三四区| 欧美日韩在线播放三区四区| 国产性天天综合网| 蜜桃91丨九色丨蝌蚪91桃色| 91久久久免费一区二区| 国产亚洲综合色| 青草国产精品久久久久久| 日本韩国一区二区三区视频| 国产亚洲精品中文字幕| 日韩电影在线一区二区三区| 91免费观看国产| 国产无遮挡一区二区三区毛片日本| 丝袜亚洲另类欧美| 欧美综合一区二区三区| 国产精品久久久久久福利一牛影视 | 亚洲免费伊人电影| 国产成人精品一区二| 日韩精品中文字幕一区二区三区| 亚洲精品免费一二三区| 粉嫩13p一区二区三区| 精品国产百合女同互慰| 日韩极品在线观看| 欧美三级电影精品| 亚洲激情欧美激情| 91亚洲资源网| 日韩一区欧美小说| 99国产精品久久久| 中文字幕在线播放不卡一区| 国产成人精品影院| 国产欧美精品国产国产专区| 狠狠久久亚洲欧美| 久久日韩精品一区二区五区| 蜜桃精品视频在线观看| 555夜色666亚洲国产免| 亚洲综合在线第一页| 91啦中文在线观看| 国产成a人无v码亚洲福利| 久久亚洲精华国产精华液| 精品写真视频在线观看|