当前位置: 首页>>代码示例>>C++>>正文


C++ QChar::lower方法代码示例

本文整理汇总了C++中QChar::lower方法的典型用法代码示例。如果您正苦于以下问题:C++ QChar::lower方法的具体用法?C++ QChar::lower怎么用?C++ QChar::lower使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QChar的用法示例。


在下文中一共展示了QChar::lower方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: if

static QAccelItem *find_key( QAccelList &list, int key, QChar ch )
{
    register QAccelItem *item = list.first();
    while ( item ) {
        int k = item->key;
        int km = k & Qt::MODIFIER_MASK;
        QChar kc = QChar(k & 0xffff);
        if ( k & Qt::UNICODE_ACCEL )
        {
            if ( km ) {
                // Modifiers must match...
                QChar c;
                if ( (key & Qt::CTRL) && (ch < ' ') )
                    c = ch.unicode()+'@'+' '; // Ctrl-A is ASCII 001, etc.
                else
                    c = ch;
                if ( kc.lower() == c.lower()
                        && (key & Qt::MODIFIER_MASK) == km )
                    break;
                else if ( kc.lower() == c.lower()
                          && (key & (Qt::MODIFIER_MASK^Qt::SHIFT)) == km )
                    break;
            } else {
                // No modifiers requested, ignore Shift but require others...
                if ( kc == ch
                        && (key & (Qt::MODIFIER_MASK^Qt::SHIFT)) == km )
                    break;
            }
        } else if ( k == key ) {
            break;
        }
        item = list.next();
    }
    return item;
}
开发者ID:kthxbyte,项目名称:QT2-Linaro,代码行数:35,代码来源:qaccel.cpp

示例2:

QChar
toLower(QChar c)
{
#if QT_VERSION>=0x040000
// QT4 code
    return c.toLower();
#else
// QT3 code
    return c.lower();
#endif   
}
开发者ID:app,项目名称:qdataschema,代码行数:11,代码来源:qdataschemaglobal.cpp

示例3: normalizeString

void AIMLParser::normalizeString(QString &str)
{
    QString newStr;
    for (int i = 0; i < str.length(); i++)
    {
        QChar c = str.at(i);
        if (c.isLetterOrNumber() || (c == '*') || (c == '_') || (c == ' '))
            newStr += c.lower();
    }
    str = newStr;
}
开发者ID:devartis,项目名称:chatbot,代码行数:11,代码来源:aimlparser.cpp

示例4: setKeyStr


//.........这里部分代码省略.........
    case Qt::Key_Dead_Macron:
        keystr += "dead-macron";
        break;
    case Qt::Key_Dead_Breve:
        keystr += "dead-breve";
        break;
    case Qt::Key_Dead_Abovedot:
        keystr += "dead-abovedot";
        break;
    case Qt::Key_Dead_Diaeresis:
        keystr += "dead-diaeresis";
        break;
    case Qt::Key_Dead_Abovering:
        keystr += "dead-abovering";
        break;
    case Qt::Key_Dead_Doubleacute:
        keystr += "dead-doubleacute";
        break;
    case Qt::Key_Dead_Caron:
        keystr += "dead-caron";
        break;
    case Qt::Key_Dead_Cedilla:
        keystr += "dead-cedilla";
        break;
    case Qt::Key_Dead_Ogonek:
        keystr += "dead-ogonek";
        break;
    case Qt::Key_Dead_Iota:
        keystr += "dead-iota";
        break;
    case Qt::Key_Dead_Voiced_Sound:
        keystr += "dead-voiced-sound";
        break;
    case Qt::Key_Dead_Semivoiced_Sound:
        keystr += "dead-semivoiced-sound";
        break;
    case Qt::Key_Dead_Belowdot:
        keystr += "dead-belowdot";
        break;
    case Qt::Key_Dead_Hook:
        keystr += "dead-hook";
        break;
    case Qt::Key_Dead_Horn:
        keystr += "dead-horn";
        break;
#endif /* Def: QT_IMMODULE */
    case Qt::Key_Shift:
        keystr += "Shift_key";
        break;
    case Qt::Key_Control:
        keystr += "Control_key";
        break;
    case Qt::Key_Alt:
        keystr += "Alt_key";
        break;
    case Qt::Key_Meta:
        keystr += "Meta_key";
        break;
    case Qt::Key_Super_L:
    case Qt::Key_Super_R:
        keystr += "Super_key";
        break;
    case Qt::Key_Hyper_L:
    case Qt::Key_Hyper_R:
        keystr += "Hyper_key";
        break;
    case Qt::Key_CapsLock:
        keystr += "caps-lock";
        break;
    case Qt::Key_NumLock:
        keystr += "num-lock";
        break;
    case Qt::Key_ScrollLock:
        keystr += "scroll-lock";
        break;
    case Qt::Key_unknown:
        keystr += unicodeKeyToSymStr ( pressed_unichar );
        break;
    default:
        if( keyval >= Qt::Key_F1 && keyval <= Qt::Key_F35 )
        {
            keystr += "F" + QString::number( keyval - Qt::Key_F1 + 1 );
            break;
        }
        else if( keyval < 256 )
        {
            QChar ch = QChar( keyval );
            
            if( mod & Qt::ShiftButton ) 
                ch = ch.upper();
            else
                ch = ch.lower();

            keystr += ch;
        }
    }

    m_keystr = keystr;
        
}
开发者ID:NgoHuy,项目名称:uim,代码行数:101,代码来源:customwidgets.cpp


注:本文中的QChar::lower方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。