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


C++ handle::GetASCII方法代码示例

本文整理汇总了C++中parametergrp::handle::GetASCII方法的典型用法代码示例。如果您正苦于以下问题:C++ handle::GetASCII方法的具体用法?C++ handle::GetASCII怎么用?C++ handle::GetASCII使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在parametergrp::handle的用法示例。


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

示例1: updateDefaultMethodParameters

void TaskSketcherSolverAdvanced::updateDefaultMethodParameters(void)
{
    ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher/SolverAdvanced");

    switch(ui->comboBoxDefaultSolver->currentIndex())
    {
    case 0: // BFGS
        ui->labelSolverParam1->setText(QString::fromLatin1(""));
        ui->labelSolverParam2->setText(QString::fromLatin1(""));
        ui->labelSolverParam3->setText(QString::fromLatin1(""));
        ui->lineEditSolverParam1->clear();
        ui->lineEditSolverParam2->clear();
        ui->lineEditSolverParam3->clear();
        ui->lineEditSolverParam1->setDisabled(true);
        ui->lineEditSolverParam2->setDisabled(true);
        ui->lineEditSolverParam3->setDisabled(true);
        break;
    case 1: // LM
    {
        ui->labelSolverParam1->setText(QString::fromLatin1("Eps"));
        ui->labelSolverParam2->setText(QString::fromLatin1("Eps1"));
        ui->labelSolverParam3->setText(QString::fromLatin1("Tau"));
        ui->lineEditSolverParam1->setEnabled(true);
        ui->lineEditSolverParam2->setEnabled(true);
        ui->lineEditSolverParam3->setEnabled(true);
        double eps = ::atof(hGrp->GetASCII("LM_eps",QString::number(LM_EPS).toUtf8()).c_str());
        double eps1 = ::atof(hGrp->GetASCII("LM_eps1",QString::number(LM_EPS1).toUtf8()).c_str());
        double tau = ::atof(hGrp->GetASCII("LM_tau",QString::number(LM_TAU).toUtf8()).c_str());
        ui->lineEditSolverParam1->setText(QString::number(eps).remove(QString::fromLatin1("+").replace(QString::fromLatin1("e0"),QString::fromLatin1("E")).toUpper()));
        ui->lineEditSolverParam2->setText(QString::number(eps1).remove(QString::fromLatin1("+").replace(QString::fromLatin1("e0"),QString::fromLatin1("E")).toUpper()));
        ui->lineEditSolverParam3->setText(QString::number(tau).remove(QString::fromLatin1("+").replace(QString::fromLatin1("e0"),QString::fromLatin1("E")).toUpper()));
        sketchView->getSketchObject()->getSolvedSketch().setLM_eps(eps);
        sketchView->getSketchObject()->getSolvedSketch().setLM_eps1(eps1);
        sketchView->getSketchObject()->getSolvedSketch().setLM_tau(tau);
        break;
    }
    case 2: // DogLeg
    {
        ui->labelSolverParam1->setText(QString::fromLatin1("Tolg"));
        ui->labelSolverParam2->setText(QString::fromLatin1("Tolx"));
        ui->labelSolverParam3->setText(QString::fromLatin1("Tolf"));
        ui->lineEditSolverParam1->setEnabled(true);
        ui->lineEditSolverParam2->setEnabled(true);
        ui->lineEditSolverParam3->setEnabled(true);
        double tolg = ::atof(hGrp->GetASCII("DL_tolg",QString::number(DL_TOLG).toUtf8()).c_str());
        double tolx = ::atof(hGrp->GetASCII("DL_tolx",QString::number(DL_TOLX).toUtf8()).c_str());
        double tolf = ::atof(hGrp->GetASCII("DL_tolf",QString::number(DL_TOLF).toUtf8()).c_str());
        ui->lineEditSolverParam1->setText(QString::number(tolg).remove(QString::fromLatin1("+").replace(QString::fromLatin1("e0"),QString::fromLatin1("E")).toUpper()));
        ui->lineEditSolverParam2->setText(QString::number(tolx).remove(QString::fromLatin1("+").replace(QString::fromLatin1("e0"),QString::fromLatin1("E")).toUpper()));
        ui->lineEditSolverParam3->setText(QString::number(tolf).remove(QString::fromLatin1("+").replace(QString::fromLatin1("e0"),QString::fromLatin1("E")).toUpper()));
        sketchView->getSketchObject()->getSolvedSketch().setDL_tolg(tolg);
        sketchView->getSketchObject()->getSolvedSketch().setDL_tolf(tolf);
        sketchView->getSketchObject()->getSolvedSketch().setDL_tolx(tolx);
        break;
    }
    }
}
开发者ID:needtogettomit,项目名称:FreeCAD,代码行数:57,代码来源:TaskSketcherSolverAdvanced.cpp

示例2: activated

void StdCmdFreeCADFAQ::activated(int iMsg)
{
    ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Websites");
    std::string url = hURLGrp->GetASCII("FAQ", "http://www.freecadweb.org/wiki/index.php?title=FAQ");
    hURLGrp->SetASCII("FAQ", url.c_str());
    OpenURLInBrowser(url.c_str());
}
开发者ID:MarcusWolschon,项目名称:FreeCAD_sf_master,代码行数:7,代码来源:CommandStd.cpp

示例3: saveSettings

void DlgGeneralImp::saveSettings()
{
    int index = AutoloadModuleCombo->currentIndex();
    QVariant data = AutoloadModuleCombo->itemData(index);
    QString startWbName = data.toString();
    App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/General")->
                          SetASCII("AutoloadModule", startWbName.toAscii());
    
    AutoloadTabCombo->onSave();
    RecentFiles->onSave();
    SplashScreen->onSave();

    // set new user defined style
    (void)QApplication::setStyle(WindowStyle->currentText());

    setRecentFileSize();
    ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("General");
    QString lang = QLocale::languageToString(QLocale::system().language());
    QByteArray language = hGrp->GetASCII("Language", (const char*)lang.toAscii()).c_str();
    QByteArray current = Languages->itemData(Languages->currentIndex()).toByteArray();
    if (current != language)
    {
        hGrp->SetASCII("Language", current.constData());
        Translator::instance()->activateLanguage(current.constData());
    }

    QVariant size = this->toolbarIconSize->itemData(this->toolbarIconSize->currentIndex());
    int pixel = size.toInt();
    hGrp->SetInt("ToolbarIconSize", pixel);
    getMainWindow()->setIconSize(QSize(pixel,pixel));
}
开发者ID:Daedalus12,项目名称:FreeCAD_sf_master,代码行数:31,代码来源:DlgGeneralImp.cpp

示例4:

void DlgSettings3DViewImp::loadSettings()
{
    checkBoxZoomAtCursor->onRestore();
    checkBoxInvertZoom->onRestore();
    spinBoxZoomStep->onRestore();
    checkBoxAntiAliasing->onRestore();
    CheckBox_CornerCoordSystem->onRestore();
    CheckBox_ShowFPS->onRestore();
    CheckBox_UseAutoRotation->onRestore();
    FloatSpinBox_EyeDistance->onRestore();
    checkBoxBacklight->onRestore();
    backlightColor->onRestore();
    sliderIntensity->onRestore();
    radioPerspective->onRestore();
    radioOrthographic->onRestore();

    ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath
                                ("User parameter:BaseApp/Preferences/View");
    std::string model = hGrp->GetASCII("NavigationStyle",CADNavigationStyle::getClassTypeId().getName());
    int index = comboNavigationStyle->findData(QByteArray(model.c_str()));
    if (index > -1) comboNavigationStyle->setCurrentIndex(index);

    index = comboOrbitStyle->currentIndex();
    index = hGrp->GetInt("OrbitStyle", index);
    index = Base::clamp(index, 0, comboOrbitStyle->count()-1);
    comboOrbitStyle->setCurrentIndex(index);
}
开发者ID:archri,项目名称:freecad,代码行数:27,代码来源:DlgSettings3DViewImp.cpp

示例5: loadSettings

void DlgGeneralImp::loadSettings()
{
    std::string start = App::Application::Config()["StartWorkbench"];
    start = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/General")->
                                  GetASCII("AutoloadModule", start.c_str());
    QString startWbName = QLatin1String(start.c_str());
    AutoloadModuleCombo->setCurrentIndex(AutoloadModuleCombo->findData(startWbName));

    AutoloadTabCombo->onRestore();
    RecentFiles->onRestore();
    SplashScreen->onRestore();

    // fill up styles
    //
    QStringList styles = QStyleFactory::keys();
    WindowStyle->addItems(styles);
    QString style = QApplication::style()->objectName().toLower();
    int i=0;
    for (QStringList::ConstIterator it = styles.begin(); it != styles.end(); ++it, i++) {
        if (style == (*it).toLower()) {
            WindowStyle->setCurrentIndex( i );
            break;
        }
    }

    // search for the language files
    ParameterGrp::handle hGrp = WindowParameter::getDefaultParameter()->GetGroup("General");
    QString lang = QLocale::languageToString(QLocale::system().language());
    QByteArray language = hGrp->GetASCII("Language", (const char*)lang.toAscii()).c_str();
    int index = 1;
    Languages->addItem(QString::fromAscii("English"), QByteArray("English"));
    TStringMap list = Translator::instance()->supportedLocales();
    for (TStringMap::iterator it = list.begin(); it != list.end(); ++it, index++) {
        QLocale locale(QString::fromAscii(it->second.c_str()));
        QByteArray lang = it->first.c_str();
        QString langname = QString::fromAscii(lang.constData());
#if QT_VERSION >= 0x040800
        QString native = locale.nativeLanguageName();
        if (!native.isEmpty()) {
            if (native[0].isLetter())
                native[0] = native[0].toUpper();
            langname = native;
        }
#endif
        Languages->addItem(langname, lang);
        if (language == lang) {
            Languages->setCurrentIndex(index);
        }
    }

    int size = QApplication::style()->pixelMetric(QStyle::PM_ToolBarIconSize);
    int current = getMainWindow()->iconSize().width();
    this->toolbarIconSize->addItem(tr("Default (%1 x %1)").arg(size), QVariant((int)size));
    this->toolbarIconSize->addItem(tr("Small (%1 x %1)").arg(16), QVariant((int)16));
    this->toolbarIconSize->addItem(tr("Large (%1 x %1)").arg(32), QVariant((int)32));
    this->toolbarIconSize->addItem(tr("Extra large (%1 x %1)").arg(48), QVariant((int)48));
    index = this->toolbarIconSize->findData(QVariant(current));
    if (index > -1) this->toolbarIconSize->setCurrentIndex(index);
}
开发者ID:Daedalus12,项目名称:FreeCAD_sf_master,代码行数:59,代码来源:DlgGeneralImp.cpp

示例6: activated

void StdCmdFreeCADFAQ::activated(int iMsg)
{
    std::string defaulturl = QCoreApplication::translate(this->className(),"http://www.freecadweb.org/wiki/index.php?title=FAQ").toStdString();
    ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Websites");
    std::string url = hURLGrp->GetASCII("FAQ", defaulturl.c_str());
    hURLGrp->SetASCII("FAQ", url.c_str());
    OpenURLInBrowser(url.c_str());
}
开发者ID:DeepSOIC,项目名称:FreeCAD-ellipse,代码行数:8,代码来源:CommandStd.cpp

示例7: QAbstractTableModel

SheetModel::SheetModel(Sheet *_sheet, QObject *parent)
    : QAbstractTableModel(parent)
    , sheet(_sheet)
{
    cellUpdatedConnection = sheet->cellUpdated.connect(bind(&SheetModel::cellUpdated, this, _1));

    ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Spreadsheet");
    aliasBgColor = QColor(Base::Tools::fromStdString(hGrp->GetASCII("AliasedCellBackgroundColor", "#feff9e")));
}
开发者ID:Jonham,项目名称:FreeCAD,代码行数:9,代码来源:SheetModel.cpp

示例8: activated

void StdCmdFreeCADForum::activated(int iMsg)
{
    Q_UNUSED(iMsg); 
    std::string defaulturl = QCoreApplication::translate(this->className(),"http://forum.freecadweb.org").toStdString();
    ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Websites");
    std::string url = hURLGrp->GetASCII("UserForum", defaulturl.c_str());
    hURLGrp->SetASCII("UserForum", url.c_str());
    OpenURLInBrowser(url.c_str());
}
开发者ID:zhangli1049,项目名称:FreeCAD,代码行数:9,代码来源:CommandStd.cpp

示例9: load_disabled_workbenches

QStringList DlgWorkbenchesImp::load_disabled_workbenches()
{
    QString disabled_wbs;
    QStringList disabled_wbs_list;
    ParameterGrp::handle hGrp;

    hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Workbenches");
    disabled_wbs = QString::fromStdString(hGrp->GetASCII("Disabled", ""));
    disabled_wbs_list = disabled_wbs.split(QLatin1String(","), QString::SkipEmptyParts);

    return disabled_wbs_list;
}
开发者ID:AjinkyaDahale,项目名称:FreeCAD,代码行数:12,代码来源:DlgWorkbenchesImp.cpp

示例10: int

void DlgSettings3DViewImp::loadSettings()
{
    checkBoxZoomAtCursor->onRestore();
    checkBoxInvertZoom->onRestore();
    spinBoxZoomStep->onRestore();
    checkBoxDragAtCursor->onRestore();
    CheckBox_CornerCoordSystem->onRestore();
    CheckBox_ShowFPS->onRestore();
    CheckBox_useVBO->onRestore();
    CheckBox_NaviCube->onRestore();
    CheckBox_UseAutoRotation->onRestore();
    FloatSpinBox_EyeDistance->onRestore();
    checkBoxBacklight->onRestore();
    backlightColor->onRestore();
    sliderIntensity->onRestore();
    radioPerspective->onRestore();
    radioOrthographic->onRestore();

    ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath
        ("User parameter:BaseApp/Preferences/View");
    std::string model = hGrp->GetASCII("NavigationStyle",CADNavigationStyle::getClassTypeId().getName());
    int index = comboNavigationStyle->findData(QByteArray(model.c_str()));
    if (index > -1) comboNavigationStyle->setCurrentIndex(index);

    index = hGrp->GetInt("OrbitStyle", int(NavigationStyle::Trackball));
    index = Base::clamp(index, 0, comboOrbitStyle->count()-1);
    comboOrbitStyle->setCurrentIndex(index);
    
    index = hGrp->GetInt("AntiAliasing", int(Gui::View3DInventorViewer::None));
    index = Base::clamp(index, 0, comboAliasing->count()-1);
    comboAliasing->setCurrentIndex(index);
    // connect after setting current item of the combo box
    connect(comboAliasing, SIGNAL(currentIndexChanged(int)),
            this, SLOT(onAliasingChanged(int)));

    index = hGrp->GetInt("CornerNaviCube", 1);
    naviCubeCorner->setCurrentIndex(index);

    int const current = hGrp->GetInt("MarkerSize", 9L);
    this->boxMarkerSize->addItem(tr("5px"), QVariant(5));
    this->boxMarkerSize->addItem(tr("7px"), QVariant(7));
    this->boxMarkerSize->addItem(tr("9px"), QVariant(9));
    this->boxMarkerSize->addItem(tr("11px"), QVariant(11));
    this->boxMarkerSize->addItem(tr("13px"), QVariant(13));
    this->boxMarkerSize->addItem(tr("15px"), QVariant(15));
    index = this->boxMarkerSize->findData(QVariant(current));
    if (index < 0) index = 2;
    this->boxMarkerSize->setCurrentIndex(index);
}
开发者ID:DevJohan,项目名称:FreeCAD_sf_master,代码行数:49,代码来源:DlgSettings3DViewImp.cpp

示例11: showEvent

void DlgParameterImp::showEvent(QShowEvent* )
{
    ParameterGrp::handle hGrp = App::GetApplication().GetUserParameter()
        .GetGroup("BaseApp")->GetGroup("Preferences");
    hGrp = hGrp->GetGroup("ParameterEditor");
    std::string buf = hGrp->GetASCII("Geometry", "");
    if (!buf.empty()) {
        int x1, y1, x2, y2;
        char sep;
        std::stringstream str(buf);
        str >> sep >> x1
            >> sep >> y1
            >> sep >> x2
            >> sep >> y2;
        QRect rect;
        rect.setCoords(x1, y1, x2, y2);
        this->setGeometry(rect);
    }
开发者ID:frankhardy,项目名称:FreeCAD,代码行数:18,代码来源:DlgParameterImp.cpp

示例12: load_enabled_workbenches

QStringList DlgWorkbenchesImp::load_enabled_workbenches()
{
    QString enabled_wbs;
    QStringList enabled_wbs_list;
    ParameterGrp::handle hGrp;

    hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Workbenches");
    enabled_wbs = QString::fromStdString(hGrp->GetASCII("Enabled", all_workbenches.toStdString().c_str()).c_str());
    enabled_wbs_list = enabled_wbs.split(QLatin1String(","), QString::SkipEmptyParts);

    if (enabled_wbs_list.at(0) == all_workbenches) {
        enabled_wbs_list.removeFirst();
        QStringList workbenches = Application::Instance->workbenches();
        for (QStringList::Iterator it = workbenches.begin(); it != workbenches.end(); ++it) {
            enabled_wbs_list.append(*it);
        }
        enabled_wbs_list.sort();
    }
    return enabled_wbs_list;
}
开发者ID:AjinkyaDahale,项目名称:FreeCAD,代码行数:20,代码来源:DlgWorkbenchesImp.cpp

示例13: activated

void StdCmdOnlineHelpWebsite::activated(int iMsg)
{
    ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/OnlineHelp");
    std::string url = hURLGrp->GetASCII("DownloadURL", "http://www.freecadweb.org/wiki/index.php?title=Online_Help_Toc");
    OpenURLInBrowser(url.c_str());
}
开发者ID:asosarma,项目名称:FreeCAD_sf_master,代码行数:6,代码来源:CommandStd.cpp

示例14: activated

void StdCmdExportGraphviz::activated(int iMsg)
{
    App::Document* doc = App::GetApplication().getActiveDocument();
    std::stringstream str;
    doc->exportGraphviz(str);

    ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Paths");
    QProcess proc;
    QStringList args;
    args << QLatin1String("-Tpng");
#ifdef FC_OS_LINUX
    QString path = QString::fromUtf8(hGrp->GetASCII("Graphviz", "/usr/bin").c_str());
#else
    QString path = QString::fromUtf8(hGrp->GetASCII("Graphviz").c_str());
#endif
    bool pathChanged = false;
#ifdef FC_OS_WIN32
    QString exe = QString::fromAscii("\"%1/dot\"").arg(path);
#else
    QString exe = QString::fromAscii("%1/dot").arg(path);
#endif
    proc.setEnvironment(QProcess::systemEnvironment());
    do {
        proc.start(exe, args);
        if (!proc.waitForStarted()) {
            int ret = QMessageBox::warning(getMainWindow(),
                                           qApp->translate("Std_ExportGraphviz","Graphviz not found"),
                                           qApp->translate("Std_ExportGraphviz","Graphviz couldn't be found on your system.\n"
                                                   "Do you want to specify its installation path if it's already installed?"),
                                           QMessageBox::Yes, QMessageBox::No);
            if (ret == QMessageBox::No)
                return;
            path = QFileDialog::getExistingDirectory(Gui::getMainWindow(),
                    qApp->translate("Std_ExportGraphviz","Graphviz installation path"));
            if (path.isEmpty())
                return;
            pathChanged = true;
#ifdef FC_OS_WIN32
            exe = QString::fromAscii("\"%1/dot\"").arg(path);
#else
            exe = QString::fromAscii("%1/dot").arg(path);
#endif
        }
        else {
            if (pathChanged)
                hGrp->SetASCII("Graphviz", (const char*)path.toUtf8());
            break;
        }
    }
    while(true);

    proc.write(str.str().c_str(), str.str().size());
    proc.closeWriteChannel();
    if (!proc.waitForFinished())
        return;

    QPixmap px;
    if (px.loadFromData(proc.readAll(), "PNG")) {
        Gui::ImageView* view = new Gui::ImageView(px);
        view->setWindowTitle(qApp->translate("Std_ExportGraphviz","Dependency graph"));
        getMainWindow()->addWindow(view);
    }
    else {
        QMessageBox::warning(getMainWindow(),
                             qApp->translate("Std_ExportGraphviz","Graphviz failed"),
                             qApp->translate("Std_ExportGraphviz","Graphviz failed to create an image file"));
    }
}
开发者ID:pedrocalderon,项目名称:FreeCAD_sf_master,代码行数:68,代码来源:CommandDoc.cpp

示例15: activated

void StdCmdDownloadOnlineHelp::activated(int iMsg)
{
    if (!wget->isDownloading()) {
        ParameterGrp::handle hGrp = App::GetApplication().GetUserParameter().GetGroup("BaseApp");
        hGrp = hGrp->GetGroup("Preferences")->GetGroup("OnlineHelp");
        std::string url = hGrp->GetASCII("DownloadURL", "www.freecadweb.org/wiki/");
        std::string prx = hGrp->GetASCII("ProxyText", "");
        bool bUseProxy  = hGrp->GetBool ("UseProxy", false);
        bool bAuthor    = hGrp->GetBool ("Authorize", false);

        if (bUseProxy) {
            QString username = QString::null;
            QString password = QString::null;

            if (bAuthor) {
                QDialog dlg(getMainWindow());
                dlg.setModal(true);
                Ui_DlgAuthorization ui;
                ui.setupUi(&dlg);

                if (dlg.exec() == QDialog::Accepted) {
                    username = ui.username->text();
                    password = ui.password->text();
                }
            }

            wget->setProxy(QString::fromAscii(prx.c_str()), username, password);
        }

        int loop=3;
        bool canStart = false;

        // set output directory
        QString path = QString::fromUtf8(App::GetApplication().GetHomePath());
        path += QString::fromAscii("/doc/");
        ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/OnlineHelp");
        path = QString::fromUtf8(hURLGrp->GetASCII( "DownloadLocation", path.toAscii() ).c_str());

        while (loop > 0) {
            loop--;
            QFileInfo fi( path);
            if (!fi.exists()) {
                if (QMessageBox::critical(getMainWindow(), tr("Non-existing directory"), 
                     tr("The directory '%1' does not exist.\n\n"
                        "Do you want to specify an existing directory?").arg(fi.filePath()), 
                     QMessageBox::Yes|QMessageBox::Default, QMessageBox::No|QMessageBox::Escape) != 
                     QMessageBox::Yes)
                {
                    // exit the command
                    return;
                }
                else 
                {
                    path = FileDialog::getExistingDirectory();
                    if ( path.isEmpty() )
                        return;
                }
            }

            if (!fi.permission( QFile::WriteUser)) {
                if (QMessageBox::critical(getMainWindow(), tr("Missing permission"), 
                     tr("You don't have write permission to '%1'\n\n"
                        "Do you want to specify another directory?").arg(fi.filePath()), 
                     QMessageBox::Yes|QMessageBox::Default, QMessageBox::No|QMessageBox::Escape) != 
                     QMessageBox::Yes)
                {
                    // exit the command
                    return;
                }
                else {
                    path = FileDialog::getExistingDirectory();
                    if ( path.isEmpty() )
                        return;
                }
            }
            else {
                wget->setOutputDirectory( path );
                canStart = true;
                break;
            }
        }

        if (canStart) {
            bool ok = wget->startDownload(QString::fromAscii(url.c_str()));
            if ( ok == false )
                Base::Console().Error("The tool 'wget' couldn't be found. Please check your installation.");
            else if ( wget->isDownloading() && _pcAction )
                _pcAction->setText(tr("Stop downloading"));
        }
    }
    else // kill the process now
    {
        wget->abort();
    }
}
开发者ID:Barleyman,项目名称:FreeCAD_sf_master,代码行数:95,代码来源:NetworkRetriever.cpp


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