void Widget::save(VXml xml) { { VXml coordXml = xml.gotoChild("coord"); QRect rect = geometry(); coordXml.setInt("left", rect.left()); coordXml.setInt("top", rect.top()); coordXml.setInt("width", rect.width()); coordXml.setInt("height", rect.height()); } xml.setInt("showHexa", (int)ui->chkShowHexa->checkState()); xml.setInt("sendHexa", (int)ui->chkSendHexa->checkState()); xml.setInt("echo", (int)ui->chkEcho->checkState()); xml.setInt("echoBroadcast", (int)ui->chkEchoBroadcast->checkState()); xml.setInt("currentIndex", ui->tabOption->currentIndex()); xml.setStr("tcpPort", ui->leTcpPort->text()); xml.setStr("udpPort", ui->leUdpPort->text()); xml.setStr("sslPort", ui->leSslPort->text()); xml.setStr("sendText", ui->pteSend->toPlainText()); { VXml sizesXml = xml.gotoChild("sizes"); QList<int> sizes = ui->splitter->sizes(); QString strList; strList.clear(); foreach (int size, sizes) strList += QString::number(size) + ","; strList = strList.left(strList.count() - 1); sizesXml.setStr("splitter", strList); } tcpServer.save(xml.gotoChilds("netClient/tcpServer")); udpServer.save(xml.gotoChilds("netClient/udpServer")); sslServer.save(xml.gotoChilds("netClient/sslServer")); }
void MainWindow::save(VXml xml) { { VXml coordXml = xml.gotoChild("coord"); QRect rect = geometry(); coordXml.setInt("left", rect.left()); coordXml.setInt("top", rect.top()); coordXml.setInt("width", rect.width()); coordXml.setInt("height", rect.height()); } xml.setBool("showLog", ui->actionShowLog->isChecked()); xml.setBool("alwaysOnTop", ui->actionAlwaysOnTop->isChecked()); xml.setBool("wordWrap", ui->actionWordWrap->isChecked()); }
void VHttpProxy::save(VXml xml) { tcpServer.save(xml.gotoChild("tcpServer")); xml.setBool("autoOpen", autoOpen); }
void VHttpProxy::load(VXml xml) { tcpServer.load(xml.gotoChild("tcpServer")); autoOpen = xml.getBool("autoOpen", autoOpen); }
void BypassHttpProxy::save(VXml xml) { VHttpProxy::save(xml); xml.setStr("blockMsg", blockMsg); hostMgr.save(xml.gotoChild("hostMgr")); }
void BypassHttpProxy::load(VXml xml) { VHttpProxy::load(xml); blockMsg = xml.getStr("blockMsg", blockMsg).toLatin1(); hostMgr.load(xml.gotoChild("hostMgr")); }