Exemplo n.º 1
0
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"));
}
Exemplo n.º 2
0
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());
}
Exemplo n.º 3
0
void VHttpProxy::save(VXml xml)
{
  tcpServer.save(xml.gotoChild("tcpServer"));
  xml.setBool("autoOpen", autoOpen);
}
Exemplo n.º 4
0
void VHttpProxy::load(VXml xml)
{
  tcpServer.load(xml.gotoChild("tcpServer"));
  autoOpen = xml.getBool("autoOpen", autoOpen);
}
Exemplo n.º 5
0
void BypassHttpProxy::save(VXml xml)
{
  VHttpProxy::save(xml);
  xml.setStr("blockMsg", blockMsg);
  hostMgr.save(xml.gotoChild("hostMgr"));
}
Exemplo n.º 6
0
void BypassHttpProxy::load(VXml xml)
{
  VHttpProxy::load(xml);
  blockMsg = xml.getStr("blockMsg", blockMsg).toLatin1();
  hostMgr.load(xml.gotoChild("hostMgr"));
}