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


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

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


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

示例1: insertbuf

int BC_GEN::insertbuf(const QChar & bc)
{
	for(int index=0;index<(CODE39_SIZE+1);++index){//include '*'
		if(bc.toUpper().toLatin1()==code39_table[index]){//found char
			global_Xposition+=INTER_GAP_LEN;//char gap
			for(int i=0;i<CODE39_CODE_LEN;++i){
				switch(code39_code_table[index][i]){
					case 'B':
						for(int j=0;j<WIDE_BAR_LEN_R3;++j){
							encode_buf->append(QLine(global_Xposition,global_Yposition,global_Xposition,global_Yposition+global_height));
							global_Xposition+=1;}
						break;
					case 'b':
						for(int j=0;j<NARROW_BAR_LEN;++j){
							encode_buf->append(QLine(global_Xposition,global_Yposition,global_Xposition,global_Yposition+global_height));
							global_Xposition+=1;}
						break;
					case 'W':
						global_Xposition+=WIDE_BAR_LEN_R3;
						break;
					case 'w':
						global_Xposition+=NARROW_BAR_LEN;
						break;
					default:
						return -2;//code error
				}
			}
			chksum+=index;
			return 1;//insert successful
		}
	}
	return -3;//not found char
}
开发者ID:xufooo,项目名称:conference_assistant,代码行数:33,代码来源:bc_generator.cpp

示例2: qt_accHotKey

QString Q_GUI_EXPORT qt_accHotKey(const QString &text)
{
#ifndef QT_NO_SHORTCUT
    if (text.isEmpty())
        return text;

    int fa = 0;
    QChar ac;
    while ((fa = text.indexOf(QLatin1Char('&'), fa)) != -1) {
        ++fa;
        if (fa < text.length()) {
            // ignore "&&"
            if (text.at(fa) == QLatin1Char('&')) {
                ++fa;
                continue;
            } else {
                ac = text.at(fa);
                break;
            }
        }
    }
    if (ac.isNull())
        return QString();
    return (QString)QKeySequence(Qt::ALT) + ac.toUpper();
#else
    Q_UNUSED(text);
    return QString();
#endif
}
开发者ID:Arise,项目名称:Open-DPI-Detector,代码行数:29,代码来源:qaccessiblewidget.cpp

示例3: findPos

int BC_GEN::findPos(const QChar &bc)
{
	for(int index=0;index<(CODE39_SIZE);++index)
		if(bc.toUpper().toLatin1()==code39_table[index])
			return index;
	return -1;
}
开发者ID:xufooo,项目名称:conference_assistant,代码行数:7,代码来源:bc_generator.cpp

示例4: func_proper

// Function: PROPER
Value func_proper(valVector args, ValueCalc *calc, FuncExtra *)
{
    QString str = calc->conv()->asString(args[0]).asString().toLower();

    QChar f;
    bool  first = true;

    for (int i = 0; i < str.length(); ++i) {
        if (first) {
            f = str[i];
            if (f.isNumber())
                continue;

            f = f.toUpper();

            str[i] = f;
            first = false;

            continue;
        }

        if (str[i].isSpace() || str[i].isPunct())
            first = true;
    }

    return Value(str);
}
开发者ID:KDE,项目名称:calligra,代码行数:28,代码来源:text.cpp

示例5: codeIndex

int codeIndex(QChar code) {
    // we are a case insensitive search
    code = code.toUpper();
    for(int idx = 0; _3of9codes[idx].code != '\0'; idx++) {
        if(_3of9codes[idx].code == code.toAscii()) return idx;
    }
    return -1;  // couldn't find it
}
开发者ID:Wushaowei001,项目名称:xtuple,代码行数:8,代码来源:3of9.cpp

示例6: setChar

void CellItem::setChar(QChar c) {
	if (c.isLetter())
	{
		is_empty = false;
		this->c = c.toUpper();
		update();
	}
}
开发者ID:krayushkin,项目名称:qt4balda,代码行数:8,代码来源:cell_item.cpp

示例7: convertToUpper

// special characters are not properly converted by QChar::upper()
// of course still misses a lot.
QChar convertToUpper(const QChar& letter)
{
    const short offset = 32; //offset between upper and lower case letter
    if ( letter >= QChar(0x00e0) && letter <= QChar(0x00fe)) // special chars range
	return QChar(letter.unicode() - offset);
    else if ( letter == QChar(0x00ff) )
	return QChar(0x0179);
    return letter.toUpper();
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:11,代码来源:pkimmatcher.cpp

示例8: codeIndexP

int codeIndexP(QChar code)
{
    // we are a case insensitive search
    const char latin1Code = code.toUpper().toLatin1();
    for (int idx = 0; _3of9codes[idx].code != '\0'; idx++) {
        if (_3of9codes[idx].code == latin1Code) return idx;
    }
    return -1;  // couldn't find it
}
开发者ID:crayonink,项目名称:calligra-2,代码行数:9,代码来源:3of9paint.cpp

示例9: corrections_dB

// Corrections
QRowVector VnaPowerCorrections::corrections_dB(QChar wave, uint port) {
    QString scpi = "SENS%1:CORR:POW:DATA? \'%2%3\'";
    scpi = scpi.arg(_channelIndex);
    scpi = scpi.arg(wave.toUpper());
    scpi = scpi.arg(port);

    // Don't know size a priori!
    return _vna->queryVector(scpi, 10001*8);
}
开发者ID:Terrabits,项目名称:RsaToolbox,代码行数:10,代码来源:VnaPowerCorrections.cpp

示例10: func_toggle

// Function: TOGGLE
Value func_toggle(valVector args, ValueCalc *calc, FuncExtra *)
{
    QString str = calc->conv()->asString(args[0]).asString();
    int i;
    int l = str.length();

    for (i = 0; i < l; ++i) {
        QChar c = str[i];
        QChar lc = c.toLower();
        QChar uc = c.toUpper();

        if (c == lc) // it is in lowercase
            str[i] = c.toUpper();
        else if (c == uc) // it is in uppercase
            str[i] = c.toLower();
    }

    return Value(str);
}
开发者ID:crayonink,项目名称:calligra-2,代码行数:20,代码来源:text.cpp

示例11: setCorrections

void VnaPowerCorrections::setCorrections(QChar wave, uint port, QRowVector values_dB) {
    QString scpi = "SENS%1:CORR:POW:DATA \'%2%3\',";
    scpi = scpi.arg(_channelIndex);
    scpi = scpi.arg(wave.toUpper());
    scpi = scpi.arg(port);

    QByteArray _scpi = scpi.toLocal8Bit();
    _scpi.append(toBlockDataFormat(values_dB));
    _vna->binaryWrite(_scpi);
}
开发者ID:Terrabits,项目名称:RsaToolbox,代码行数:10,代码来源:VnaPowerCorrections.cpp

示例12: setFX

bool NoteEntry::setFX(QChar fx)
{
	if(fx.isLetterOrNumber() || fx == '-')
	{
		// TODO: check if param match, if not reset to 00
		effect=fx.toUpper().toAscii();
		return true;
	}
	return false;
}
开发者ID:pulkomandy,项目名称:lynxtracker,代码行数:10,代码来源:NoteEntry.cpp

示例13: labelAddChar

void Key::labelAddChar()
{
    QChar tmp = m_character;
    if (m_altern) {
        tmp=m_alterncharacter;
    }
    if (m_level == 1) {
        tmp = tmp.toUpper();
    }
    LabelInstance::Instance()->addCharacter(tmp);
}
开发者ID:Pardus-Kurumsal,项目名称:etak,代码行数:11,代码来源:key.cpp

示例14: charFilterRegExp

static QString charFilterRegExp(QString const & filter)
{
	QString re;
	for (int i = 0; i < filter.length(); ++i) {
		QChar c = filter[i];
		if (c.isLower())
			re += ".*[" + QRegExp::escape(c) + QRegExp::escape(c.toUpper()) + "]";
		else
			re += ".*" + QRegExp::escape(c);
	}
	return re;
}
开发者ID:JoaquimBellmunt,项目名称:lyx,代码行数:12,代码来源:LayoutBox.cpp

示例15: ibanToElectronic

QString ibanBic::ibanToElectronic(const QString& iban)
{
  QString canonicalIban;
  const int length = iban.length();
  for (int i = 0; i < length; ++i) {
    const QChar letter = iban.at(i);
    if (letter.isLetterOrNumber())
      canonicalIban.append(letter.toUpper());
  }

  return canonicalIban;
}
开发者ID:CGenie,项目名称:kmymoney,代码行数:12,代码来源:ibanbic.cpp


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