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


C++ QCString::setNum方法代码示例

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


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

示例1: saveInstance

void Small::saveInstance(){
  QCString store;
  QCString temp;
  store.append("MAX_CID=");
  store.append(w->spinBox2->text());
  store.append("\nMRRU=");
  store.append(w->spinBox3->text());
  store.append("\nLARGE_CID=");
  if(w->checkBox1->isChecked())
    store.append("YES");
  else
    store.append("NO");
  store.append("\nCONNECTION_TYPE=");
//  store.append(w->comboBox1->text(w->comboBox1->currentItem()));
//  temp = new QCString();
//  temp = w->comboBox1->currentItem();
  temp.setNum(w->comboBox1->currentItem());
  store.append(temp);
  store.append("\nFEEDBACK_FREQ=");
  temp.setNum(w->slider2->value());
  store.append(temp);

  store.append("\nROHC_ENABLE=");
  if(w->checkBox2->isChecked())
    store.append("YES\n");
  else
    store.append("NO\n");

//  KMessageBox::information(this, store);
  editMode(false);
  w->pushButton2_2->setOn(false);
  object->writeProc(store);  
}
开发者ID:whoi-acomms,项目名称:umodemd,代码行数:33,代码来源:small.cpp

示例2: writeEntry

void KConfigBase::writeEntry(const char *pKey, const QSize &rSize, bool bPersistent, bool bGlobal, bool bNLS)
{
    QStrList list;
    QCString tempstr;
    list.insert(0, tempstr.setNum(rSize.width()));
    list.insert(1, tempstr.setNum(rSize.height()));

    writeEntry(pKey, list, ',', bPersistent, bGlobal, bNLS);
}
开发者ID:serghei,项目名称:kde3-kdelibs,代码行数:9,代码来源:kconfigbase.cpp

示例3: sslPasswdDlg

QCString KDevSvnd::sslPasswdDlg(QString promptMsg)
{
	QCString passwd;
	int ret = KPasswordDialog::getPassword( passwd,promptMsg );
	if( ret == KPasswordDialog::Accepted ){
		QCString retstr;
		retstr.setNum(1);
		return retstr + passwd;
	} else{
		QCString nullstr;
		nullstr.setNum(-1);
		return nullstr;
	}
}
开发者ID:serghei,项目名称:kde3-kdevelop,代码行数:14,代码来源:kdevsvnd.cpp

示例4: format_warn

static void format_warn(const char *file,int line,const char *text)
{
  QCString fileSubst = file==0 ? "<unknown>" : file;
  QCString lineSubst; lineSubst.setNum(line);
  QCString textSubst = text;
  QCString versionSubst;
  if (file) // get version from file name
  {
    bool ambig;
    FileDef *fd=findFileDef(Doxygen::inputNameDict,file,ambig);
    if (fd)
    {
      versionSubst = fd->getVersion();
    }
  }
  // substitute markers by actual values
  QCString msgText = 
      substitute(
        substitute(
          substitute(
            substitute( 
              outputFormat,
              "$file",fileSubst
            ),
            "$text",textSubst
          ),
          "$line",lineSubst
        ),
        "$version",versionSubst
      )+'\n';

  // print resulting message
  fwrite(msgText.data(),1,msgText.length(),warnFile);
}
开发者ID:AmesianX,项目名称:doxygen,代码行数:34,代码来源:message.cpp

示例5: doFetchArticle

void KNNntpClient::doFetchArticle()
{
    KNRemoteArticle *target = static_cast<KNRemoteArticle *>(job->data());
    QCString cmd;

    sendSignal(TSdownloadArticle);
    errorPrefix = i18n("Article could not be retrieved.\nThe following error occurred:\n");

    progressValue = 100;
    predictedLines = target->lines()->numberOfLines() + 10;

    if(target->collection())
    {
        QString groupName = static_cast<KNGroup *>(target->collection())->groupname();
        if(currentGroup != groupName)
        {
            cmd = "GROUP ";
            cmd += groupName.utf8();
            if(!sendCommandWCheck(cmd, 211))       // 211 n f l s group selected
                return;
            currentGroup = groupName;
        }
    }

    if(target->articleNumber() != -1)
    {
        cmd.setNum(target->articleNumber());
        cmd.prepend("ARTICLE ");
    }
    else
    {
        cmd = "ARTICLE " + target->messageID()->as7BitString(false);
    }

    if(!sendCommandWCheck(cmd, 220))        // 220 n <a> article retrieved - head and body follow
    {
        int code = atoi(getCurrentLine());
        if(code == 430 || code == 423)      // 430 no such article found || 423 no such article number in this group
        {
            QString msgId = target->messageID()->as7BitString(false);
            // strip of '<' and '>'
            msgId = msgId.mid(1, msgId.length() - 2);
            job->setErrorString(errorPrefix + getCurrentLine() +
                                i18n("<br><br>The article you requested is not available on your news server."
                                     "<br>You could try to get it from <a href=\"http://groups.google.com/groups?selm=%1\">groups.google.com</a>.")
                                .arg(msgId));
        }
        return;
    }

    QStrList msg;
    if(!getMsg(msg))
        return;

    progressValue = 1000;
    sendSignal(TSprogressUpdate);

    target->setContent(&msg);
    target->parse();
}
开发者ID:serghei,项目名称:kde3-kdepim,代码行数:60,代码来源:knnntpclient.cpp

示例6: addAttributePt

void KoXmlWriter::addAttributePt( const char* attrName, double value )
{
    QCString str;
    str.setNum( value, 'g', DBL_DIG );
    str += "pt";
    addAttribute( attrName, str.data() );
}
开发者ID:,项目名称:,代码行数:7,代码来源:

示例7: html

void UmlClass::html() {
  QCString s;
  
  UmlCom::message(name());
  
  if (stereotype() == "stereotype")
    start_file("stereotype" + s.setNum((unsigned) getIdentifier()), "Stereotype " + name(), TRUE);
  else if (stereotype() == "metaclass")
    start_file("metaclass" + s.setNum((unsigned) getIdentifier()), "Metaclass " + name(), TRUE);
  else
    start_file("class" + s.setNum((unsigned) getIdentifier()), "Class " + name(), TRUE);
  define();
  gen_html("", 0, 0);
  end_file();
  
  unload(FALSE, FALSE);
}
开发者ID:gregsmirnov,项目名称:bouml,代码行数:17,代码来源:UmlClass.cpp

示例8: warning

void FileIn::warning(QCString s) {
  QCString num;
  QCString warn = QCString("warning in ") + _path + " line " +
    num.setNum(_linenum) + " : " + s + "<br>";
  
  UmlCom::trace(warn);

}
开发者ID:,项目名称:,代码行数:8,代码来源:

示例9: makeKey

QCString ConnectionHandler::makeKey(int _namespace, QCString s1, QCString s2, QCString s3)
{
    QCString res;
    res.setNum(_namespace);
    res += "*";
    res += s1 + "*" + s2 + "*" + s3;
    return res;
}
开发者ID:serghei,项目名称:kde3-kdebase,代码行数:8,代码来源:handler.cpp

示例10: error

void FileIn::error(QCString s) {
  QCString num;
  QCString err = QCString("error in ") + _path + " line " +
    num.setNum(_linenum) + " : " + s + "<br>";
  
  UmlCom::trace(err);
  throw 0;
}
开发者ID:,项目名称:,代码行数:8,代码来源:

示例11: sendExitCode

void ConnectionHandler::sendExitCode()
{
    if(!m_needExitCode)
        return;
    QCString buf;
    buf.setNum(m_exitCode);
    buf.prepend("OK ");
    buf.append("\n");

    send(m_Fd, buf.data(), buf.length(), 0);
}
开发者ID:serghei,项目名称:kde3-kdebase,代码行数:11,代码来源:handler.cpp

示例12: timeUpdate

void KJPitchText::timeUpdate(int)
{
	QCString speed;

	if (!napp->player()->current())
		return;

	Arts::PlayObject playobject = napp->player()->engine()->playObject();
	Arts::PitchablePlayObject pitchable = Arts::DynamicCast(playobject);

	if (pitchable.isNull())
		return;

	speed.setNum ( (int) ((float)pitchable.speed()*(float)100) );
	prepareString ( speed );
}
开发者ID:serghei,项目名称:kde3-kdemultimedia,代码行数:16,代码来源:kjtextdisplay.cpp

示例13: do_warn

static void do_warn(const char *tag, const char *file, int line, const char *fmt, va_list args)
{
  if (!Config_getBool(tag)) return; // warning type disabled
  char text[40960];
  vsprintf(text, fmt, args);
  QCString fileSubst = file==0 ? "<unknown>" : file;
  QCString lineSubst; lineSubst.setNum(line);
  QCString textSubst = text;
  QCString versionSubst;
  if (file) // get version from file name
  {
    bool ambig;
    FileDef *fd=findFileDef(Doxygen::inputNameDict,file,ambig);
    if (fd)
    {
      versionSubst = fd->getVersion();
    }
  }
  // substitute markers by actual values
  QCString msgText = 
    substitute(
      substitute(
        substitute(
          substitute(
            substitute( 
              outputFormat,
              "$file",fileSubst
            ),
            "$text",textSubst
          ),
          "$line",lineSubst
        ),
        "$version",versionSubst
      ),
      "%","%%"
    )+'\n';

  // print resulting message
  fprintf(warnFile,"%s",msgText.data());
}
开发者ID:paulpster,项目名称:sqlDoxygen,代码行数:40,代码来源:message.cpp

示例14: create

bool KateSession::create(const QString &name, bool force)
{
    if(!force && (name.isEmpty() || !m_sessionFileRel.isEmpty()))
        return false;

    delete m_writeConfig;
    m_writeConfig = 0;

    delete m_readConfig;
    m_readConfig = 0;

    m_sessionName = name;

    // get a usable filename
    int s = time(0);
    QCString tname;
    while(true)
    {
        tname.setNum(s++);
        KMD5 md5(tname);
        m_sessionFileRel = QString("%1.katesession").arg(md5.hexDigest().data());

        if(!KGlobal::dirs()->exists(sessionFile()))
            break;
    }

    // create the file, write name to it!
    KSimpleConfig config(sessionFile());
    config.setGroup("General");
    config.writeEntry("Name", m_sessionName);
    config.sync();

    // reinit ourselfs ;)
    init();

    return true;
}
开发者ID:serghei,项目名称:kde3-kdebase,代码行数:37,代码来源:katesession.cpp

示例15: aboutData


//.........这里部分代码省略.........
          kateApp = allClients[i];
          break;
        }
      }
    }

    // found a matching kate client ;)
    if (!kateApp.isEmpty())
    {
      kdDebug () << "kate app: " << kateApp << endl;
      // make kdeinit happy
      client.registerAs( "kate" );

      DCOPRef kRef (kateApp, "KateApplication");

      if (args->isSet ("start"))
        kRef.call( "activateSession", QString (args->getOption("start")) );

      QString enc = args->isSet("encoding") ? args->getOption("encoding") : QCString("");

      bool tempfileSet = KCmdLineArgs::isTempFileSet();

      for (int z=0; z<args->count(); z++)
        kRef.call( "openURL", args->url(z), enc, tempfileSet );

      if( args->isSet( "stdin" ) )
      {
        QTextIStream input(stdin);

        // set chosen codec
        QTextCodec *codec = args->isSet("encoding") ? QTextCodec::codecForName(args->getOption("encoding")) : 0;

        if (codec)
          input.setCodec (codec);

        QString line;
        QString text;

        do
        {
          line = input.readLine();
          text.append( line + "\n" );
        } while( !line.isNull() );

        kRef.call( "openInput", text );
      }

      int line = 0;
      int column = 0;
      bool nav = false;

      if (args->isSet ("line"))
      {
        line = args->getOption ("line").toInt();
        nav = true;
      }

      if (args->isSet ("column"))
      {
        column = args->getOption ("column").toInt();
        nav = true;
      }

      if (nav)
         kRef.call( "setCursor", line, column );

      // since the user tried to open a document, let us assume [s]he
      // wants to see that document.
      // ### what to do about the infamous focus stealing prevention?
      uint mwn = kRef.call("activeMainWindowNumber");
      QCString smwn;
      DCOPRef wRef( kateApp, QCString( "__KateMainWindow#") + smwn.setNum(mwn) );
      if ( wRef.call("minimized") )
      {
        if ( wRef.call( "maximized" ) )
          wRef.call( "maximize" );
        else
          wRef.call("restore");
      }
      wRef.call( "raise" );

      // stop startup notification
      KStartupInfo::appStarted(  );

      return 0;
    }
  }

  // construct the real kate app object ;)
  KateApp app (args);

  // app execution should already end :)
  if (app.shouldExit())
  {
    return 0;
  }

  // execute ourself ;)
  return app.exec();
}
开发者ID:,项目名称:,代码行数:101,代码来源:


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