• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ saveData函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: uip

PreferencesWindow::PreferencesWindow(QWidget *parent, map *pointer)
    :QWidget(parent), uip(new Ui::PreferencesWindow)
{
    uip->setupUi(this);
    connect(uip->pushButton, SIGNAL(released()), this, SLOT(saveData()));
    connect(uip->checkBox, SIGNAL(stateChanged(int)), this, SLOT(ticked()));

    this->pointer = pointer;

}
开发者ID:wair,项目名称:random_map_generator,代码行数:10,代码来源:preferenceswindow.cpp


示例2: letDisturb

void Disp2DPropLoadEngine::action()
{
	if(LOG) cerr << "debut applyCondi !!" << endl;
	leftbox = Body::byId(id_boxleft);
	rightbox = Body::byId(id_boxright);
	frontbox = Body::byId(id_boxfront);
	backbox = Body::byId(id_boxback);
	topbox = Body::byId(id_topbox);
	boxbas = Body::byId(id_boxbas);

	if(firstIt)
	{
		it_begin=scene->iter;
		H0=topbox->state->pos.y();
		X0=topbox->state->pos.x();
		Vector3r F_sup=scene->forces.getForce(id_topbox);
		Fn0=F_sup.y();
		Ft0=F_sup.x();

		Real	OnlySsInt=0	// the half number of real sphere-sphere (only) interactions, at the beginning of the perturbation
			,TotInt=0	// the half number of all the real interactions, at the beginning of the perturbation
			;

		InteractionContainer::iterator ii    = scene->interactions->begin();
		InteractionContainer::iterator iiEnd = scene->interactions->end();
        	for(  ; ii!=iiEnd ; ++ii ) 
        	{
        		if ((*ii)->isReal())
                	{
				TotInt++;
				const shared_ptr<Body>& b1 = Body::byId( (*ii)->getId1() );
				const shared_ptr<Body>& b2 = Body::byId( (*ii)->getId2() );
				if ( (b1->isDynamic()) && (b2->isDynamic()) )
					OnlySsInt++;
			}
		}
	
		coordSs0 = OnlySsInt/8590;	// 8590 is the number of spheres in the CURRENT case
		coordTot0 = TotInt / 8596;	// 8596 is the number of bodies in the CURRENT case

		firstIt=false;
	}


	if ( (scene->iter-it_begin) < nbre_iter)
	{	letDisturb();
	}
	else if ( (scene->iter-it_begin) == nbre_iter)
	{
		stopMovement();
		string fileName=Key + "DR"+boost::lexical_cast<string> (nbre_iter)+"ItAtV_"+boost::lexical_cast<string> (v)+"done.xml";
// 		Omega::instance().saveSimulation ( fileName );
		saveData();
	}
}
开发者ID:DEMANY,项目名称:trunk,代码行数:55,代码来源:Disp2DPropLoadEngine.cpp


示例3: QDialog

MetaEditor::MetaEditor(QWidget *parent)
  : QDialog(parent),
    m_mainWindow(qobject_cast<MainWindow *>(parent)),
    m_Relator(MarcRelators::instance())
{
    setupUi(this);

    m_book = m_mainWindow->GetCurrentBook();
    m_version = m_book->GetConstOPF()->GetEpubVersion();
    m_opfdata = m_book->GetOPF()->GetText();

    QStringList headers;
    headers << tr("Name") << tr("Value");

    QString data = GetOPFMetadata();

    TreeModel *model = new TreeModel(headers, data);
    view->setModel(model);
    for (int column = 0; column < model->columnCount(); ++column)
        view->resizeColumnToContents(column);

    if (!isVisible()) {
        ReadSettings();
    }

    if (m_version.startsWith('3')) { 
        loadMetadataElements();
        loadMetadataProperties();
    } else {
        loadE2MetadataElements();
        loadE2MetadataProperties();
    }

    connect(view->selectionModel(),
            SIGNAL(selectionChanged(const QItemSelection &,
                                    const QItemSelection &)),
            this, SLOT(updateActions()));

    connect(delButton, SIGNAL(clicked()), this, SLOT(removeRow()));
    connect(tbMoveUp, SIGNAL(clicked()), this, SLOT(moveRowUp()));
    connect(tbMoveDown, SIGNAL(clicked()), this, SLOT(moveRowDown()));

    if (m_version.startsWith('3')) {
        connect(addMetaButton, SIGNAL(clicked()), this, SLOT(selectElement()));
        connect(addPropButton, SIGNAL(clicked()), this, SLOT(selectProperty()));
    } else {
        connect(addMetaButton, SIGNAL(clicked()), this, SLOT(selectE2Element()));
        connect(addPropButton, SIGNAL(clicked()), this, SLOT(selectE2Property()));
    }

    connect(buttonBox, SIGNAL(accepted()), this, SLOT(saveData()));
    connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));

    updateActions();
}
开发者ID:anukat2015,项目名称:Sigil,代码行数:55,代码来源:MetaEditor.cpp


示例4: saveAsActionPressed

// ------------------------------------------------------------------------
void MainWindow::saveActionPressed()
{
	if(okToSave())
	{
		if(!data->hasSaveName())
			return saveAsActionPressed();

		std::string filename = data->getSaveName();
		saveData(filename);
	}
}
开发者ID:zhuangfangwang,项目名称:PhDProject,代码行数:12,代码来源:main_window.cpp


示例5: luaSaveChips

int luaSaveChips(lua_State *L)
{
	char *fn=(char *)lua_tostring(L, 1);
	char str[512];
	lstrcpy(str,CurrDataDir);
	lstrcat(str,TEXT("\\"));
	lstrcat(str,fn);
	int e=saveData(str);
	lua_pushnumber(L,e);
	return 1;
}
开发者ID:siruhu,项目名称:Rigidchips15C,代码行数:11,代码来源:luaSystem.cpp


示例6: saveData

BOOL CPluginStream::EndNode()
{
	if(!m_nodes.GetCount())
	{
		return FALSE;
	}
	DWORD nodeIndex = m_nodes[m_nodes.GetCount() - 1];
	saveData(m_data[nodeIndex].id, SDT_ENDNODE, (LPBYTE) &nodeIndex, sizeof(nodeIndex));
	m_nodes.Delete(m_nodes.GetCount() - 1);
	return TRUE;
}
开发者ID:truelaunchbar,项目名称:tlb-pdk-public,代码行数:11,代码来源:PluginStream.cpp


示例7: qDebug

void MainWindow::closeEvent(QCloseEvent* close)
{
    qDebug() << "closeEvent";
    if (saveData())
        close->accept();

    if (dlg_)
    {
        dlg_->close();
        dlg_.reset();
    }
}
开发者ID:ensisoft,项目名称:pinyin-translator,代码行数:12,代码来源:mainwindow.cpp


示例8: getYear

void getYear() {
  int iYear,iMonth,iDay;
  printf("\nPlease input data as [yyyy mm dd] :\n");
  fgets(buf, BUFFER_SIZE, stdin);
  sscanf(buf, "%d %d %d", &iYear, &iMonth, &iDay);

  if (!checkDate(iYear,iMonth,iDay)) {
    printf("Input date is invalid!\n\n");
    return;
  }
  saveData(DATE, iYear, iMonth, iDay);
}
开发者ID:quanta2015,项目名称:CLanguage,代码行数:12,代码来源:ex13-file-io.c


示例9: s

void RcFile::saveSplitterSize (Parm name, QSplitter *sp, const QString &n)
{
  QStringList stringList;
  QValueList<int> sizeList = sp->sizes();
  
  int loop;
  for (loop = 0; loop < (int) sizeList.count(); loop++)
    stringList.append(QString::number(sizeList[loop]));
  
  QString s(stringList.join(","));
  saveData(name, s, n);
}
开发者ID:botvs,项目名称:FinancialAnalytics,代码行数:12,代码来源:RcFile.cpp


示例10: getKey

void ManageCrossPlayerData::collectCrossPlayerDataFinish(const string & line_id, const string & platform, uint64 player_guid)
{
	string key = getKey(line_id, platform, player_guid);

	CrossPlayerDataInfoMap_t::iterator it = m_cross_player_data_info_map.find(key);
	if (it != m_cross_player_data_info_map.end())
	{
		CrossPlayerDataInfo * cross_pd_info = it->second;
		m_cross_player_guid_data_info_map[player_guid] = cross_pd_info;
		saveData(cross_pd_info);
	}
}
开发者ID:BianJian,项目名称:steppingstone,代码行数:12,代码来源:ManageCrossPlayerData.cpp


示例11: catch

void ProfilerThread::run()
{
	//------------------------------------------------------------------------
	//load up the debug info for it
	//
	//there's a potential problem here - if a module is unloaded after this,
	//we won't know about it. likewise, modules could be loaded at the same
	//address at different points in time. perhaps ideally we may need to
	//hook LoadLibrary/FreeLibrary calls? I suspect it's not much of a problem
	//in practice though. (bear in mind we can't load symbols once the process
	//has exited, so we have to do it up front...)
	//------------------------------------------------------------------------
	try
	{
		sym_info.loadSymbols(target_process);
	} catch(SymbolInfoExcep& e) {
		error("SymbolInfoExcep: " + e.what());
		return;
	}	

	DWORD startTick = GetTickCount();

	try
	{
		sampleLoop();
	} catch(ProfilerExcep& e) {
		// see if it's an actual error, or did the thread just finish naturally
		for(std::vector<Profiler>::const_iterator it = profilers.begin(); it != profilers.end(); ++it)
		{
			const Profiler& profiler(*it);
			if (!profiler.targetExited())
			{
				error("ProfilerExcep: " + e.what());
				return;
			}
		}

		numThreadsRunning = 0;
	}

	DWORD endTick = GetTickCount();
	int diff = endTick - startTick;
	duration = diff / 1000.0;

	saveData();

	symbolsPercent = 100;

	std::cout << "Profiling successfully completed." << std::endl;
	//::MessageBox(NULL, "Profiling successfully completed.", "Profiler", MB_OK);
}
开发者ID:mhoffesommer,项目名称:Very-Sleepy,代码行数:51,代码来源:profilerthread.cpp


示例12: calNewPack

int showdatawindow::routinedrawgroup(void)
{
    int i;

    if(newdata&&(!ui->CheckPauseShow->isChecked()))  //show the data when get new package
    {
        calNewPack();
        saveData();
        for( i= 0;i< NUMPOINTSAMPLE; i++)
        {
            if(!ui->checkReverse->isChecked())
                adc_new_data[i]=(float)adc_new_data[i]*zoomrate;
            else
                adc_new_data[i]=(float)adc_new_data[i]*zoomrate*-1;
        }
        //after save new data to array we write the new data on the scene
        //from here
        if(ui->checkTemp->isChecked())
        {
            drawData(ui->drawTemp,sceneTemp ,MAX_TEMP,MIN_TEMP,saveTemp,counttemp,NUMPATHTEMP,NUMPOINTSAMPLE_TEMP,0,false);  //no use countguileline and firsttimesample
        }
        if(ui->checkAccx->isChecked())
        {
            drawData(ui->drawAccx,sceneX ,MAX_MIN_X,-1*MAX_MIN_X,saveX,countx,NUMPATHX,NUMPOINTSAMPLE_X,0,false); //no use countguileline and firsttimesample
        }
        if(ui->checkAccy->isChecked())
        {
            drawData(ui->drawAccy,sceneY ,MAX_MIN_Y,-1*MAX_MIN_Y,saveY,county,NUMPATHY,NUMPOINTSAMPLE_Y,0,false); //no use countguileline and firsttimesample
        }
        if(ui->checkAccz->isChecked())
        {
            drawData(ui->drawAccz,sceneZ ,MAX_MIN_Z,-1*MAX_MIN_Z,saveZ,countz,NUMPATHZ,NUMPOINTSAMPLE_Z,&countguidelinez,first_Time_Samplez); //use countguileline and firsttimesample
        }
        if(ui->checkADC->isChecked())
        {
            drawData(ui->drawADC,sceneADC ,MAX_MIN_ADC,-1*MAX_MIN_ADC,adc_new_data,countadc,numScaleADC,NUMPOINTSAMPLE,&countguidelineadc,first_Time_Sampleadc);// use countguileline and firsttimesample
        }
        if(ui->checkSpectrogram->isChecked())
        {
//            QTime nowtime = QTime::currentTime();
            drawFFT();
//            QTime newtime = QTime::currentTime();
//            qDebug()<< "Spectrogram" <<nowtime.toString("hhmmsszzz")<<newtime.toString("hhmmsszzz");
        }
        //end
        showDataControl();
        newdata=false;
        return 1;
    }
    return 0;
}
开发者ID:OPInnovations,项目名称:opiconsole,代码行数:51,代码来源:showdatawindow.cpp


示例13: LoadWindowFromXML

bool ScreenSetup::Create()
{
    bool foundtheme = false;

    // Load the theme for this screen
    foundtheme = LoadWindowFromXML("weather-ui.xml", "screen-setup", this);

    if (!foundtheme)
        return false;

    m_helpText = dynamic_cast<MythUIText *> (GetChild("helptxt"));

    m_activeList = dynamic_cast<MythUIButtonList *> (GetChild("activelist"));
    m_inactiveList = dynamic_cast<MythUIButtonList *> (GetChild("inactivelist"));

    m_finishButton = dynamic_cast<MythUIButton *> (GetChild("finishbutton"));

    MythUIText *activeheader = dynamic_cast<MythUIText *> (GetChild("activehdr"));
    if (activeheader)
        activeheader->SetText(tr("Active Screens"));

    MythUIText *inactiveheader = dynamic_cast<MythUIText *> (GetChild("inactivehdr"));
    if (inactiveheader)
        inactiveheader->SetText(tr("Inactive Screens"));

    if (!m_activeList || !m_inactiveList || !m_finishButton || !m_helpText)
    {
        LOG(VB_GENERAL, LOG_ERR, "Theme is missing required elements.");
        return false;
    }

    BuildFocusList();

    connect(m_activeList, SIGNAL(itemSelected(MythUIButtonListItem *)),
            this, SLOT(updateHelpText()));
    connect(m_activeList, SIGNAL(itemClicked(MythUIButtonListItem *)),
            this, SLOT(doListSelect(MythUIButtonListItem *)));
    connect(m_inactiveList, SIGNAL(itemSelected(MythUIButtonListItem *)),
            this, SLOT(updateHelpText()));
    connect(m_inactiveList, SIGNAL(itemClicked(MythUIButtonListItem *)),
            this, SLOT(doListSelect(MythUIButtonListItem *)));

    SetFocusWidget(m_inactiveList);

    m_finishButton->SetText(tr("Finish"));
    connect(m_finishButton, SIGNAL(Clicked()), this, SLOT(saveData()));

    loadData();

    return true;
}
开发者ID:DaveDaCoda,项目名称:mythtv,代码行数:51,代码来源:weatherSetup.cpp


示例14: saveData

void qtractorInstrumentList::saveDataList ( QTextStream& ts,
	const qtractorInstrumentDataList& list ) const
{
    ts << endl;
	qtractorInstrumentDataList::ConstIterator it = list.constBegin(); 
	const qtractorInstrumentDataList::ConstIterator& it_end = list.constEnd();
	for ( ; it != it_end; ++it) {
		const QString& sName = it.value().name();
		if (!sName.isEmpty()) {
			ts << "[" << sName << "]" << endl;
			saveData(ts, it.value());
		}
	}
}
开发者ID:EQ4,项目名称:qtractor,代码行数:14,代码来源:qtractorInstrument.cpp


示例15: sprintf_s

	// -----------------------------------------------
	// export JSON
	// -----------------------------------------------
	bool DataFile::save() {
		char buffer[64];
		sprintf_s(buffer, 64, "content\\%s", getFileName());
		LOG << "exporting simplified json file: " << buffer;
		// FIXME: check if directory exists
		JSONWriter jw;
		if (jw.open(buffer)) {
			return saveData(jw);
		}
		else {
			LOG << "Cannot open file";
			return false;
		}
	}
开发者ID:amecky,项目名称:diesel2D,代码行数:17,代码来源:DataFile.cpp


示例16: usrConfig

/*!
    Saves any changes to the profile and character sets it contains.

    Note that any changes to the character sets are stored separately
    to the system character sets.  This allows the user to revert
    back to a system character using the handwriting settings application.
*/
void QIMPenProfile::save() const
{
    QSettings usrConfig("Trolltech",userConfig());
    usrConfig.beginGroup("Settings");
    usrConfig.setValue("MultiTimeout", msTimeout);

    if (tstyle)
        usrConfig.setValue("Style", pstyle == BothCases ? "BothCases" : "ToggleCases" );
    if (istyle)
        usrConfig.setValue("IgnoreTimeout", isTimeout);

    // each set knows if its modified.
    if (!sets.isEmpty())
        saveData();
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:22,代码来源:profile.cpp


示例17: profileFunction

Environment::Environment(void)
{
  profile = profileFunction();

  // Create a table of NB_HOSTS hosts
  hosts = new Host[DefVal::NB_HOSTS];
  hosts_parent = new int[DefVal::NB_HOSTS];
  for (int i = 0; i < DefVal::NB_HOSTS ; i++)
  {
    hosts[i] = Host(1);
    hosts_parent[i] = -1;
  }

  saveData(); // For the statistics !
}
开发者ID:lvulliard,项目名称:git_3BIM,代码行数:15,代码来源:Environment.cpp


示例18: saveData

/**
 * \brief Convert all capabilities info to XML.
 */
void CapsRegistry::save()
{
	// Generate XML
	QDomDocument doc;
	QDomElement capabilities = doc.createElement("capabilities");
	doc.appendChild(capabilities);
	QHash<QString,CapsInfo>::ConstIterator i = capsInfo_.constBegin();
	for( ; i != capsInfo_.end(); i++) {
		QDomElement info = i.value().toXml(&doc);
		info.setAttribute("node",i.key());
		capabilities.appendChild(info);
	}

	saveData(doc.toString().toUtf8());
}
开发者ID:eta-im-dev,项目名称:eta-im-snapshots,代码行数:18,代码来源:xmpp_caps.cpp


示例19: ns__putData

////////////////////////////////////////////////////////////////////////////////
//
//	Server methods
//
////////////////////////////////////////////////////////////////////////////////
int ns__putData(struct soap *soap, std::vector<std::string> *nameList, arrayOfData *data, arrayOfName *names)
{
	DBG("\n");

	// gSOAP switches to SOAP_IO_STORE when SOAP_IO_CHUNK (HTTP chunking) is not supported by the client
	// Since it is undesirable to use SOAP_IO_STORE with streaming, we reset it to SOAP_IO_BUFFER
	if ((soap->omode & SOAP_IO) == SOAP_IO_STORE)
		soap->omode = (soap->omode & ~SOAP_IO) | SOAP_IO_BUFFER;
	// return name (key) for each data item
	names->resize(data->size());


	//	for(int j = 0; j < nameList->size(); j++){
	//		DBG("file name server: %s\n", nameList->at(j).c_str());
	//	}

	for (int i = 0; i < data->size(); i++)
	{
		char *s, *name;
		// the id field is set when DIME was used so the dime_write callbacks already saved the file
		if ((*data)[i].id)
		{
			assert((*data)[i].__ptr);
			name = ((struct dime_write_handle*)(*data)[i].__ptr)->name;


		}
		else
		{
			name = tempnam(TMPDIR, "data");

			saveData((*data)[i], name);
		}
		s = strrchr(name, '/');
		if (!s)
			s = strrchr(name, '\\');
		if (!s)
			s = name;
		else
			s++;
		(*names)[i] = soap_strdup(soap, s);
		if (!(*data)[i].id)
		{ // free data alloced with tempnam()
			free(name);
		}
	}
	return SOAP_OK;
}
开发者ID:eslinux,项目名称:Windows,代码行数:53,代码来源:CenticFirewallApp.cpp


示例20: getData

static void getData(struct soap *soap, int argc, char **argv)
{ arrayOfData data;
  arrayOfName names;
  names.resize(argc - 2);
  for (int i = 2; i < argc; i++)
    names[i - 2] = argv[i];
  soap->user = (void*)names.__ptr;
  if (soap_call_ns__getData(soap, endpoint, NULL, &names, &data))
    soap_print_fault(soap, stderr);
  else
  { for (int j = 0; j < data.size(); j++)
      if (!data[j].id)
        saveData(data[j], argv[j + 2]);
    printf("Data retrieved\n");
  }
}
开发者ID:xin3liang,项目名称:platform_external_gsoap,代码行数:16,代码来源:dimeclient.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ saveFETDialogGeometry函数代码示例发布时间:2022-05-30
下一篇:
C++ saveConfiguration函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap