这篇教程C++ writeConfig函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中writeConfig函数的典型用法代码示例。如果您正苦于以下问题:C++ writeConfig函数的具体用法?C++ writeConfig怎么用?C++ writeConfig使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了writeConfig函数的21个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: writeConfigsize_t CLoginDlg::write_data(const char * info) { Json::Reader reader; Json::Value json_object; // info = "{/"result/": [{/"room_id/": /"7/"}]}"; const char* json_document = info; if (!reader.parse(json_document, json_object)) return 0; Json::Value error_info = json_object["errno"]; int errno_s = error_info.asInt();//.asString(); if(errno_s == 0) { Json::Value result = json_object["result"]; Json::Value::iterator it = result.begin(); Json::Value room_id; for(;it!=result.end();it++) { Json::Value allInfo = *it; room_id = allInfo["room_id"]; } string s_room_id = room_id.asString(); m_room_id = s_room_id.c_str(); writeConfig(1,m_room_id,_T(""),_T("")); writeConfig(2,m_room_id,_T(""),_T("")); return 1; } else { return 0; }}
开发者ID:daijingjing,项目名称:bobo_show_video,代码行数:33,
示例2: getCommConfigPtrvoid CommHandler::setParityErrorCheckEnable(bool enable) { getCommConfigPtr()->c_iflag = enable ? (INPCK | (getCommConfigPtr()->c_iflag)) : ((~INPCK) & getCommConfigPtr()->c_iflag); writeConfig();}
开发者ID:morpheby,项目名称:ntc-13.04.5-ui,代码行数:7,
示例3: writeMusicSongsConfigvoid MusicXMLConfigManager::writeMusicSongsConfig(const MusicSongsList &musics){ if( musics.isEmpty() ) { return; } //Open wirte file if( !writeConfig(MUSICPATH_AL) ) { return; } /////////////////////////////////////////////////////// createProcessingInstruction(); QDomElement musicPlayer = createRoot("TTKMusicPlayer"); //Class A QDomElement fileNormalPath = writeDomElement(musicPlayer, "fileNormalPath", "count", musics[0].count()); QDomElement fileLovestPath = writeDomElement(musicPlayer, "fileLovestPath", "count", musics[1].count()); QDomElement netFilePath = writeDomElement(musicPlayer, "netFilePath", "count", musics[2].count()); //extend playlist init here// for(int i=3; i<fileNamesList.count(); ++i)// {// QDomElement extend = m_ddom->createElement("extend" + QString::number(i - 2));// extend.setAttribute("count",fileNamesList[i].count());// TTKMusicPlayer.appendChild(extend);// } //Class B foreach(MusicSong song, musics[0]) { writeDomElementMutilText(fileNormalPath, "value", QStringList() << "name" << "playCount" << "time", QList<QVariant>() << song.getMusicName() << song.getMusicPlayCount() << song.getMusicTime(), song.getMusicPath()); }
开发者ID:AndyQsmart,项目名称:TTKMusicplayer,代码行数:34,
示例4: writeConfigvoid ContactEditorMainWindow::slotQuitApp(){ if (saveCurrentProject(SaveAndCloseTheme)) { writeConfig(); qApp->quit(); }}
开发者ID:KDE,项目名称:kdepim,代码行数:7,
示例5: writeConfigvoid JsonTextWriter::writeToStream( const Text & text, std::ostream & os ) { os << "{/n/tconfig: "; writeConfig( text.getConfig(), os ); os << ",/n/tcontent: '" << text.getContent() << "',/n/tnodes: [/n/t/t"; uint nodesCount = text.getNodes().size(); if ( nodesCount > 0 ) { writeNode( *text.getNodes().at( 0 ), os ); for ( uint i = 1; i < nodesCount; ++ i ) { os << ",/n/t/t"; writeNode( *text.getNodes().at( i ), os ); } } os << "/n/t],/n/tannotations: [/n/t/t"; for ( uint i = 0; i < nodesCount; ++ i ) { const Node & node = *text.getNodes().at( i ); for ( uint j = 0; j < node.getTransitionCount(); ++ j ) { if ( i != 0 || j != 0 ) os << ",/n/t/t"; writeAnnotation( *node.getTransition( j ), os ); } } os << "/n/t]/n}";}
开发者ID:alesapin,项目名称:lspl,代码行数:28,
示例6: wxTvoid Mega8Config::saveConfig(const wxString &profile){ if (profile == wxEmptyString) { _currentProfile = wxT("General"); } else { _currentProfile = profile; } saveKeyboard(_currentProfile); writeString(wxT("LastFolder"), _LastFolder); writeBool(wxT("FullScreen"), _FullScreen); writeBool(wxT("SpeedAuto"), _SpeedAuto); writeBool(wxT("DisplayHUD"), _DisplayHUD); writeBool(wxT("Filtered"), _Filtered); writeBool(wxT("SyncClock"), _SyncClock); writeLong(wxT("ColorTheme"), (int)_ColorTheme); writeBool(wxT("InverseColor"), _InverseColor); writeBool(wxT("Sound"), _Sound); writeBool(wxT("UseSleep"), _UseSleep); for (int i = 0; i <= sizeof(Chip8Types); i++) { writeLong(wxT("FrequencyRatio/") + getMachineTypeStr((Chip8Types)i), _FrequencyRatio[i]); } // Really save config if (_config != NULL) { writeConfig(); }}
开发者ID:Ready4Next,项目名称:Mega8,代码行数:30,
示例7: LOGI//---------------------------------------------------------------------// INITIALIZE//---------------------------------------------------------------------void PuzzleTV::intialize(bool reset){ LOGI("%s(L=%d)", __func__, __LINE__); super::intialize(reset); // Clear data blockSizeW = 0; blockSizeH = 0; blockW = 0; blockH = 0; blockNum = 0; marginW = 0; marginH = 0; phase = 0; movingBlock = 0; spaceBlock = 0; autoSolveTimer = 0; blocks = NULL; // Set default parameters (no clear) if (reset) { if (readConfig() != CONFIG_SUCCESS) { hint = 0; } } else { writeConfig(); }}
开发者ID:Johnta,项目名称:EffecTV_for_Android,代码行数:31,
示例8: QFilebool OidentdConfigGenerator::init(){ _configDir = QDir::homePath(); _configFileName = ".oidentd.conf"; if (Quassel::isOptionSet("oidentd-conffile")) _configPath = Quassel::optionValue("oidentd-conffile"); else _configPath = _configDir.absoluteFilePath(_configFileName); _configTag = " stanza created by Quassel"; _configFile = new QFile(_configPath); // Rx has to match Template in order for cleanup to work. // Template should be enhanced with the "from" parameter as soon as Quassel gains // the ability to bind to an IP on client sockets. _quasselStanzaTemplate = QString("lport %1 { reply /"%2/" } #%3/n"); _quasselStanzaRx = QRegExp(QString("^lport .* //{ .* //} #%1//r?//n").arg(_configTag)); // initially remove all Quassel stanzas that might be present if (parseConfig(false) && writeConfig()) _initialized = true; return _initialized;}
开发者ID:esainane,项目名称:quassel,代码行数:27,
示例9: pathbool KPBinaryIface::checkDir(const QString& possibleDir){ bool ret = false; QString possiblePath = path(possibleDir); kDebug() << "Testing " << possiblePath << "..."; QProcess process; process.setProcessChannelMode(QProcess::MergedChannels); process.start(possiblePath, m_binaryArguments); bool val = process.waitForFinished(); if (val && (process.error() != QProcess::FailedToStart)) { m_isFound = true; QString stdOut(process.readAllStandardOutput()); if (parseHeader(stdOut)) { m_pathDir = possibleDir; writeConfig(); kDebug() << "Found " << path() << " version: " << version(); ret = true; } else { // TODO: do something if the version is not right or not found } } emit signalBinaryValid(); return ret;}
开发者ID:rickysarraf,项目名称:digikam,代码行数:34,
示例10: writeConfigvoid KImportDlg::slotOkClicked(){ // Save the used options. writeConfig(); // leave dialog directly accept();}
开发者ID:KDE,项目名称:kmymoney,代码行数:7,
示例11: readConfigvoid readConfig(void){ if(had_used_config_file == NULL) { had_used_config_file = (char*)malloc(1024); if(loadConfig(HAD_CONFIG_FILE)) { g_message("Using config %s",HAD_CONFIG_FILE); strncpy(had_used_config_file, HAD_CONFIG_FILE,1024); } else { if(loadConfig("had.conf")) { g_message("Using config %s","had.conf"); strncpy(had_used_config_file, "had.conf",1024); } else { g_message("Creating new default config %s","had.conf"); strncpy(had_used_config_file, "had.conf",1024); writeConfig(); } } } else { loadConfig(had_used_config_file); }}
开发者ID:elmo2k3,项目名称:had,代码行数:30,
示例12: applyConfigvoid ConfigDialogImpl::slotOk(){ applyConfig(); writeConfig(); emit(newSettings()); delete ui;}
开发者ID:BackupTheBerlios,项目名称:slicker-svn,代码行数:7,
示例13: myClockvoid myClock() { int loop=1; int h,m,s; int color=1, size=1; char symbol='X'; HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_SCREEN_BUFFER_INFO consoleInfo; WORD saved_attributes; GetConsoleScreenBufferInfo(hConsole, &consoleInfo); saved_attributes = consoleInfo.wAttributes; while(loop) { if(GetAsyncKeyState(VK_ESCAPE)) { break; } if(GetAsyncKeyState('C')) { writeConfig(color, size, symbol, hConsole, saved_attributes); GetAsyncKeyState(VK_SPACE); //Clear GetAsyncKeyState('C');//Clear } readConfig(&color, &size, &symbol); initClock(&h,&m,&s); char f[17]= {}; initText(f,h,m,s,symbol); system("cls"); digitalClock(h,m,s); printClock(f,color,size,hConsole,saved_attributes); sleep(1); }}
开发者ID:spirad14,项目名称:BinaryClock,代码行数:32,
示例14: writeConfigTPV::~TPV(){ applEnding = True;// destroyHelp(); writeConfig(); if( listWindow ) { deskTop->remove( (TView *)listWindow ); destroy( (TObject *)listWindow ); } destroy( (TObject *)formDef ); destroy( (TObject *)aboutDlg ); remove( clock ); destroy( clock ); if( heap ) { remove( heap ); destroy( heap ); }}
开发者ID:jskripsky,项目名称:ancient,代码行数:25,
示例15: writeConfigbool CMMDVMCal::setTXLevel(int incr){ if (incr > 0 && m_txLevel < 99U) { m_txLevel++; ::fprintf(stdout, "TX Level: %u%%" EOL, m_txLevel); return writeConfig(); } if (incr < 0 && m_txLevel > 0U) { m_txLevel--; ::fprintf(stdout, "TX Level: %u%%" EOL, m_txLevel); return writeConfig(); } return true;}
开发者ID:xsystemgr,项目名称:MMDVMCal,代码行数:16,
示例16: ipfwadm_rules/* write the IP address to /etc/config/config so the user can tell what * IP address the NETtel got. * * Secondly, launch dhcpcd-change, but only if it is not a DISKTEL */int ipfwadm_rules(char *ifname, u_int32_t yiaddr){ char buf[32]; FILE *in; pid_t pid; char tmp[MAX_CONFIG_LINE_SIZE]; struct in_addr inp; struct stat st; inp.s_addr = yiaddr; /* No need to write this config to flash because it is dynamic * information. */ sprintf(buf, "ip%s/0", ifname); writeConfig("/etc/config/config", buf, (char *) inet_ntoa(inp));#ifndef CONFIG_DEFAULTS_LINEO_DISKTEL if (stat("/etc/config/dhcpcd-change", &st) == 0) { launch_script("/etc/config/dhcpcd-change"); } else { launch_script("/etc/config/ipfwrules"); }#endif return 0;}
开发者ID:BackupTheBerlios,项目名称:wl530g-svn,代码行数:31,
示例17: writeConfigAbstractScopeWidget::~AbstractScopeWidget(){ writeConfig(); delete m_menu; delete m_aAutoRefresh; delete m_aRealtime;}
开发者ID:JongHong,项目名称:kdenlive,代码行数:8,
示例18: writeConfigAudioSpectrum::~AudioSpectrum(){ writeConfig(); delete m_aResetHz; delete m_aTrackMouse; delete ui;}
开发者ID:eddrog,项目名称:kdenlive,代码行数:8,
示例19: saveSettingsConfigvoid saveSettingsConfig() { // Save settings config file writeConfig("ux0:VitaShell/settings.txt", settings_entries, sizeof(settings_entries) / sizeof(ConfigEntry)); if (sceKernelGetModel() == SCE_KERNEL_MODEL_VITATV) { vitashell_config.select_button = SELECT_BUTTON_MODE_FTP; }}
开发者ID:AbandonedCart,项目名称:VitaShell,代码行数:8,
示例20: QFileConfig::Config(){ const QString FileName = "Config"; confFile = new QFile(FileName); //default settings default_alertTime = 50; default_restTime = 3; default_start_with_system = false; default_playSound = true; default_show_startup = false; default_language = QString("zh_CN"); alertTime = default_alertTime; restTime = default_restTime; // default background color RGB(72, 118, 255)); // Mac蓝色 RGB(61, 108, 239) // Facebook蓝色 RGB(59, 89, 153) // YAHOO!紫色 RGB(63, OA, 6E) default_bg_colorR = 61; default_bg_colorG = 108; default_bg_colorB = 239; //default foreground color RGB(173, 255, 47) default_fg_colorR = 173; default_fg_colorG = 255; default_fg_colorB = 47; //custome configuration bg_colorR = default_bg_colorR; bg_colorG = default_bg_colorG; bg_colorB = default_bg_colorB; fg_colorR = default_fg_colorR; fg_colorG = default_fg_colorG; fg_colorB = default_fg_colorB; start_with_system = default_start_with_system; playSound = default_playSound; show_startup = default_show_startup; language = default_language; version = QString("510"); if (QFileInfo(FileName).exists() == false) { //first create#ifdef DEBUG qDebug() << "not exists";#endif language = QLocale::system().name(); writeConfig(); } else { //read exist config#ifdef DEBUG qDebug() << "exists";#endif readConfig(); }}
开发者ID:admirestator,项目名称:Lemon-s-Health,代码行数:58,
示例21: writeConfigvoid GuiInputConfig::onInput(InputManager::InputButton button, bool keyDown){ if(mDone) { if(InputManager::lastEvent->type == SDL_KEYUP) { writeConfig(); if(mJoystick) SDL_JoystickClose(mJoystick); InputManager::loadConfig(); delete this; GuiGameList::create(); } return; } SDL_Event* event = InputManager::lastEvent; if(event->type == SDL_JOYBUTTONDOWN) { mButtonMap[event->jbutton.button] = (InputManager::InputButton)mInputNum; std::cout << " Mapping " << sInputs[mInputNum] << " to button " << (int)event->jbutton.button << "/n"; mInputNum++; } if(event->type == SDL_JOYAXISMOTION) { //std::cout << "motion on axis " << event->jaxis.axis << " to value " << event->jaxis.value << "/n"; if(event->jaxis.axis == mLastAxis) { if(event->jaxis.value < InputManager::deadzone && event->jaxis.value > -InputManager::deadzone) mLastAxis = -1; return; } if(event->jaxis.value > InputManager::deadzone) { mAxisPosMap[event->jaxis.axis] = (InputManager::InputButton)mInputNum; mInputNum++; mLastAxis = event->jaxis.axis; std::cout << " Mapping " << sInputs[mInputNum - 1] << " to axis+ " << mLastAxis << "/n"; }else if(event->jaxis.value < -InputManager::deadzone) { mAxisNegMap[event->jaxis.axis] = (InputManager::InputButton)mInputNum; mInputNum++; mLastAxis = event->jaxis.axis; std::cout << " Mapping " << sInputs[mInputNum - 1] << " to axis- " << mLastAxis << "/n"; } } if(mInputNum >= sInputCount) { mDone = true; return; }}
开发者ID:batlol,项目名称:EmulationStation,代码行数:57,
注:本文中的writeConfig函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ writeData函数代码示例 C++ writeCommentBeforeValue函数代码示例 |