本文整理汇总了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
}
示例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
}
示例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;
}
示例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);
}
示例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
}
示例6: setChar
void CellItem::setChar(QChar c) {
if (c.isLetter())
{
is_empty = false;
this->c = c.toUpper();
update();
}
}
示例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();
}
示例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
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}