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


C++ saveData函数代码示例

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


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


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