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


C++ setInfo函数代码示例

本文整理汇总了C++中setInfo函数的典型用法代码示例。如果您正苦于以下问题:C++ setInfo函数的具体用法?C++ setInfo怎么用?C++ setInfo使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: insert

void XMLProc::createNew(){
    xmlItem i;
    xml.setContent(QString("<?xml version = '1.0' encoding = 'UTF-8'?>\n"));
    //setModified( true );

    xml.appendChild( xml.implementation().createDocumentType("Конфигурация",QString::null,""));
    rootnode = xml.createElement( md_root );
    xml.appendChild( rootnode );
    rootnode = xml.documentElement();
    cfginfo = insert( rootnode, md_info, QString::null, -1 );
    iface 	= insert( rootnode, md_interface, QString::null, -1 );
    md 		= insert( rootnode, md_metadata, QString::null, -1 );
    actions	= insert( rootnode, md_actions, QString::null, -1 );
    init();
    setInfo( md_info_name, "Новая конфигурация" );
    setInfo( md_info_lastid, "0" );
    setInfo( md_info_author, "NetWorm" );
    setInfo( md_info_date, QDateTime::currentDateTime().date().toString(Qt::ISODate) );
    //setInfo( md_info_dir, "newConfig" );
    insert( md, md_globals, QString::null, -1 );
    insert( md, md_spravochniki, QString::null, -1 );
    insert( md, md_documents, QString::null, -1 );
    insert( md, md_journals, QString::null, -1 );
    i = insert( md, md_registers, QString::null, -1 );
    insert( i, md_iregisters, QString::null, -1 );
    insert( i, md_aregisters, QString::null, -1 );

    SetModify(true);
}
开发者ID:sergey4475,项目名称:SProject,代码行数:29,代码来源:xmlproc.cpp

示例2: gui_connections

///Connect Signals and Slots only relevant for the graphical interface
void gui_connections(Graphical_UI* gui, GraphManager* graph_mgr, OpenNIListener* listener)
{
  QObject::connect(listener,  SIGNAL(newVisualImage(QImage)), gui, SLOT(setVisualImage(QImage)));
  QObject::connect(listener,  SIGNAL(newFeatureFlowImage(QImage)), gui, SLOT(setFeatureFlowImage(QImage)));
  QObject::connect(listener,  SIGNAL(newDepthImage(QImage)), gui, SLOT(setDepthImage(QImage)));
  QObject::connect(graph_mgr, SIGNAL(sendFinished()), gui, SLOT(sendFinished()));
  QObject::connect(graph_mgr, SIGNAL(iamBusy(int, const char*, int)), gui, SLOT(showBusy(int, const char*, int)));
  QObject::connect(graph_mgr, SIGNAL(progress(int, const char*, int)), gui, SLOT(setBusy(int, const char*, int)));
  QObject::connect(graph_mgr, SIGNAL(setGUIInfo(QString)), gui, SLOT(setInfo(QString)));
  QObject::connect(graph_mgr, SIGNAL(setGUIStatus(QString)), gui, SLOT(setStatus(QString)));
  QObject::connect(gui, SIGNAL(printEdgeErrors(QString)), graph_mgr, SLOT(printEdgeErrors(QString)));
  QObject::connect(gui, SIGNAL(pruneEdgesWithErrorAbove(float)), graph_mgr, SLOT(pruneEdgesWithErrorAbove(float)));
  QObject::connect(gui, SIGNAL(clearClouds()), graph_mgr, SLOT(clearPointClouds()));
  if (ParameterServer::instance()->get<bool>("use_glwidget") && gui->getGLViewer() != NULL) {
    GLViewer* glv = gui->getGLViewer();
    QObject::connect(graph_mgr, SIGNAL(setPointCloud(pointcloud_type *, QMatrix4x4)), glv, SLOT(addPointCloud(pointcloud_type *, QMatrix4x4)), Qt::BlockingQueuedConnection ); //Needs to block, otherwise the opengl list compilation makes the app unresponsive. This effectively throttles the processing rate though
    typedef const std::vector<Eigen::Vector4f, Eigen::aligned_allocator<Eigen::Vector4f> >* cnst_ft_vectors;
    QObject::connect(graph_mgr, SIGNAL(setFeatures(const std::vector<Eigen::Vector4f, Eigen::aligned_allocator<Eigen::Vector4f> >*)), glv, SLOT(addFeatures(const std::vector<Eigen::Vector4f, Eigen::aligned_allocator<Eigen::Vector4f> >*))); //, Qt::DirectConnection);
    QObject::connect(graph_mgr, SIGNAL(setGraphEdges(const QList<QPair<int, int> >*)), glv, SLOT(setEdges(const QList<QPair<int, int> >*)));
    QObject::connect(graph_mgr, SIGNAL(updateTransforms(QList<QMatrix4x4>*)), glv, SLOT(updateTransforms(QList<QMatrix4x4>*)));
    QObject::connect(graph_mgr, SIGNAL(deleteLastNode()), glv, SLOT(deleteLastNode()));
    QObject::connect(graph_mgr, SIGNAL(resetGLViewer()),  glv, SLOT(reset()));
    if(!ParameterServer::instance()->get<bool>("store_pointclouds")) {
        QObject::connect(glv, SIGNAL(cloudRendered(pointcloud_type const *)), graph_mgr, SLOT(clearPointCloud(pointcloud_type const *))); // 
    } else if(ParameterServer::instance()->get<double>("voxelfilter_size") > 0.0) {
        QObject::connect(glv, SIGNAL(cloudRendered(pointcloud_type const *)), graph_mgr, SLOT(reducePointCloud(pointcloud_type const *))); // 
    }
  }
  QObject::connect(listener, SIGNAL(setGUIInfo(QString)), gui, SLOT(setInfo(QString)));
  QObject::connect(listener, SIGNAL(setGUIStatus(QString)), gui, SLOT(setStatus(QString)));
  QObject::connect(graph_mgr, SIGNAL(setGUIInfo2(QString)), gui, SLOT(setInfo2(QString)));
}
开发者ID:CURG,项目名称:rgbdslam,代码行数:33,代码来源:main.cpp

示例3: resetLog

bool LatexLogWidget::loadLogFile(const QString &logname, const QString & compiledFileName){
	resetLog();
	QFileInfo fi(logname);
	if (logname.isEmpty() || !fi.exists()) {
		setInfo(tr("Log file not found."));
		return false;
	}
	if (!fi.isReadable()) {
		setInfo(tr("Log file not readable."));
		return false;
	}

	QFile f(logname);
	if (f.open(QIODevice::ReadOnly)) {
		double fileSizeLimitMB = ConfigManagerInterface::getInstance()->getOption("LogView/WarnIfFileSizeLargerMB").toDouble();
		if (f.size() > fileSizeLimitMB*1024*1024 &&
			!txsConfirmWarning(tr("The logfile is very large (%1 MB) are you sure you want to load it?").arg(double(f.size()) / 1024 / 1024, 0, 'f', 2)))
			return false;

		//QByteArray fullLog = simplifyLineConserving(f.readAll());
		// TODO: if we want to have simplification here it has to be smarter.
		// The above version trims whitespace, which leads to undesired effects due to the 80 char
		// line width of the log. "line\n 1"  would become "\line\n1" and, when rejoining lines for error/warning detection "line1".
		// Do we need this or can we just leave the output as it is?
		QByteArray fullLog = f.readAll();
		f.close();

		int sure;
		QTextCodec * codec = guessEncodingBasic(fullLog, &sure);
		if (!sure || !codec) codec = QTextCodec::codecForLocale();

		log->setPlainText(codec->toUnicode(fullLog));

		logModel->parseLogDocument(log->document(), compiledFileName);

		logpresent=true;

		// workaround to https://sourceforge.net/p/texstudio/feature-requests/622/
		// There seems to be a bug in Qt (4.8.4) that resizeRowsToContents() does not work correctly if
		// horizontalHeader()->setStretchLastSection(true) and the tableView has not yet been shown
		// when iterating through the columns to determine the maximal height, everything is fine
		// until the last column. There the calculated height is too large.
		// As a workaround we will temporarily deactivate column stretching.
		// Note: To reproduce, you can call the viewer via The ViewLog button. When showing the viewer
		// by clicking the ViewTab, the widget is shown before loading (so there the bug did not appear.)
		bool visible = errorTable->isVisible();
		if (!visible) errorTable->horizontalHeader()->setStretchLastSection(false);
		errorTable->resizeColumnsToContents();
		errorTable->resizeRowsToContents();
		if (!visible) errorTable->horizontalHeader()->setStretchLastSection(true);

		selectLogEntry(0);
		emit logLoaded();
		return true;
	}

	setInfo(tr("Log file not readable."));
	return false;
}
开发者ID:Axure,项目名称:TeXstudio,代码行数:59,代码来源:latexlogwidget.cpp

示例4: update

 virtual void update()
 {
   if (m_app->indexer()->isIndexing()) {
     char count[100];
     sprintf(count, "Files: %d", m_app->indexer()->indexCount());
     setInfo(count, "Stop Scan");
   }
   else {
     if (strcmp(m_label, "Scan Media"))
       setInfo("", "Scan Media");
   }
 }
开发者ID:aaleswara,项目名称:tanktv,代码行数:12,代码来源:SettingsMenu.cpp

示例5: setInfo

void Server::setInfo(std::string key, std::string type, std::string value) {
    if (type.compare("int") == 0) {
        setInfo(key, atoi(value.c_str()));
    }
    else if (type.compare("long long") == 0) {
        setInfo(key, atoll(value.c_str()));
    }
    else if (type.compare("double") == 0) {
        setInfo(key, atof(value.c_str()));
    }
    else if (type.compare("string") == 0) {
        setInfo(key, value);
    }
}
开发者ID:GianpaoloR,项目名称:polyphemus,代码行数:14,代码来源:server.cpp

示例6: setInfo

/**
 * Unreal Command Handler for "JOIN" - Constructor.
 *
 * @param mptr Module pointer
 */
UnrealCH_join::UnrealCH_join(UnrealModule* mptr)
{
	setInfo(&mptr->inf);
	
	/* allocate additional contents */
	command_ = new UnrealUserCommand(CMD_JOIN, &UnrealCH_join::exec);
}
开发者ID:dboyz,项目名称:u4-ircd,代码行数:12,代码来源:join.cpp

示例7: setInfo

// =============================
//        Test Funtion
// =============================
void AStarTest::testAStar()
{
    setInfo("testAStar");
    
    m_gridLayer->testAstar();
    
}
开发者ID:shysean,项目名称:Cocos2dxDemo,代码行数:10,代码来源:AStarTest.cpp

示例8: QString

void LocalSong::readList(const QString &fName)
{
    QString fileName = QString("%1.xml").arg(fName);
    QFile file(fileName);
    if (false==file.open(QFile::ReadOnly | QFile::Text)) {
        return;
    }
    QXmlStreamReader reader;
    reader.setDevice(&file);
    songlist.clear();//清空歌曲路径列表
    while (false==reader.atEnd())
    {
        reader.readNext();
        if (reader.isStartElement())
        {
            if (reader.name() == "path")
            {
                QString songPath=reader.readElementText().toUtf8();
                addSongList(songPath);//读取列表
                setInfo(songPath);
            }
        }
    }
    qDebug()<<"本地列表读取完成";
    unsigned long dirLength=songlist.length();
    qDebug()<<"歌曲总数为"<<dirLength;
    emit dirCount(dirLength);
    file.close();
}
开发者ID:yuenar,项目名称:QtMusicPlayer,代码行数:29,代码来源:LocalSong.cpp

示例9: dir

void LocalSong::addDir()
{
    locDir= QFileDialog::getExistingDirectory(this,tr("扫描本地目录"),musicPaths.isEmpty() ? QDir::homePath() : musicPaths.first(),QFileDialog::ShowDirsOnly
                                              | QFileDialog::DontResolveSymlinks);
    QDir dir(locDir);
    if(false==dir.exists())
    {
        return;
    }
    dir.setFilter(QDir::Files | QDir::NoSymLinks);
    QFileInfoList list = dir.entryInfoList();

    int file_count = list.count();
    if(file_count <= 0)
    {
        return;
    }
    for(int i=0; i<file_count;++i)
    {
        QFileInfo file_info = list.at(i);
        QString suffix = file_info.suffix();
        if(QString::compare(suffix, QString("mp3"), Qt::CaseInsensitive) == 0)
        {
            QString absolute_file_path = file_info.absoluteFilePath();
            addSongList(absolute_file_path);
            setInfo(absolute_file_path);
        }
    }
    qDebug()<<"已添加整个目录"<<locDir;
    unsigned long dirLength=songlist.length();
    qDebug()<<"歌曲总数为"<<dirLength;
    emit dirCount(dirLength);
}
开发者ID:yuenar,项目名称:QtMusicPlayer,代码行数:33,代码来源:LocalSong.cpp

示例10: setInfo

/**
 * Unreal Command Handler for "KICK" - Constructor.
 *
 * @param mptr Module pointer
 */
UnrealCH_kick::UnrealCH_kick(UnrealModule* mptr)
{
	setInfo(&mptr->inf);
	
	/* allocate additional contents */
	command_ = new UnrealUserCommand(CMD_KICK, &UnrealCH_kick::exec);
}
开发者ID:dboyz,项目名称:u4-ircd,代码行数:12,代码来源:kick.cpp

示例11: setCmd

CmdProtocol::CmdProtocol()
{
   setCmd("IP");
   setArgsCount(1);
   setInfo("Force protocol.");
   setHelp("IP [4|6] Force protocol to use to connect to server. Server name may be solved with several protocols.");
}
开发者ID:Spudster3,项目名称:cgru,代码行数:7,代码来源:cmd_arguments.cpp

示例12: QDialog

nftdialog::nftdialog(QWidget* parent, QString lang, QString templateDir) : QDialog(parent)
{
	setupUi(this);
	setModal(true);

	settings = new nftsettings(lang, templateDir);

	setWindowIcon(loadIcon("AppIcon.png"));
	
	// context menu
	removeAction = new QAction(tr("&Remove"), tnailGrid);
	openAction = new QAction(tr("&Open"), tnailGrid);
	tnailGrid->addAction(removeAction);
	tnailGrid->addAction(openAction);

	setupAbout();
	
	toolBox->setItemIcon(0, loadIcon("16/information.png"));
	toolBox->setItemIcon(1, loadIcon("16/image-x-generic.png"));
	toolBox->setItemIcon(2, loadIcon("16/help-browser.png"));
	tnailGrid->setIconSize(QSize(60, 60));
	
	// Signals and Slots Connections
	connect(categoryList, SIGNAL(itemSelectionChanged()), this, SLOT(setTNails()));
	connect(tnailGrid, SIGNAL(itemSelectionChanged()), this, SLOT(setInfo()));
	connect(tnailGrid, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(accept()));
	connect(removeAction, SIGNAL(triggered()), this, SLOT(removeTemplate()));
	connect(openAction, SIGNAL(triggered()), this, SLOT(accept()));
	
	setupListItems();
	setupCategories();
}
开发者ID:AlterScribus,项目名称:ece15,代码行数:32,代码来源:nftdialog.cpp

示例13: restoreValue

Word
restoreValue(Fragment *F, Word *vals, IRRef ref)
{
  IRIns *ir = IR(ref);
  HeapInfo *hp;
  Closure *cl;
  int j;

  // We only need to treat allocations specially.
  if (ir->o != IR_NEW)
    return vals[ref];

  hp = &F->heap[ir->op2];
  // Store has *not* been sunken, i.e., allocation occurred on-trace
  if (!ir_issunken(ir))
    return vals[ref];

  // Otherwise we need to do the allocation now, possibly recursively
  //
  // TODO: Can we have mutually recursive sunken refs?
  recordEvent(EV_ALLOC, 1 + hp->nfields);
  cl = allocClosure(wordsof(ClosureHeader) + hp->nfields);
  setInfo(cl, (InfoTable*)vals[ir->op1]);
  DBG_PR("(alloc[%lu])", wordsof(ClosureHeader) + hp->nfields);

  for (j = 0; j < hp->nfields; j++)
    cl->payload[j] = restoreValue(F, vals, getHeapInfoField(F, hp, j));

  return (Word)cl;
}
开发者ID:dmpots,项目名称:lambdachine,代码行数:30,代码来源:InterpIR.c

示例14: setInfo

/**
 * Unreal Command Handler for "QUIT" - Constructor.
 *
 * @param mptr Module pointer
 */
UnrealCH_quit::UnrealCH_quit(UnrealModule* mptr)
{
	setInfo(&mptr->inf);
	
	/* allocate additional contents */
	command_ = new UnrealUserCommand(CMD_QUIT, &UnrealCH_quit::exec);
}
开发者ID:dboyz,项目名称:u4-ircd,代码行数:12,代码来源:quit.cpp

示例15: addObject

void StageManager::loadPlayer( Point setPosition )
{
	addObject( OT_PLAYER , setPosition );
	auto player = getWorldScene()->getGameLayer()->getPlayer();
	_ASSERT( player != nullptr );
	player->setInfo( m_PlayerInfo );
}
开发者ID:jwvg0425,项目名称:Robotopia,代码行数:7,代码来源:StageManager.cpp


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