예제 #1
0
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    qDebug() << "QApplication started";
    QStringList args = app.arguments();
    QUrl url;

    if (args.count() != 2)
    {
        qDebug() << "No URL provided on command line.";
        qDebug() << "Using default location: " << DEFAULT_URL;
        url = QUrl(DEFAULT_URL);
    }
    else
    {
        qDebug() << "Using URL " << args[1];
        url = QUrl(args[1]);
    }

    LWebViewDialog *dlg  = new LWebViewDialog();
    dlg->setUrl(url);
    dlg->show();

    return app.exec();
}
예제 #2
0
void LClsStartupWizard::showHelp()
{
    QUrl url;

    switch (currentId()) {
        case Page_PowerHardwareOn:
            url = QUrl(BASE_URL "/PowerHardwareOn");
            break;
        case Page_WarmUpCls:
            url = QUrl(BASE_URL "/WarmedUp");
            break;
        case Page_TurnInjectorOn:
            url = QUrl(BASE_URL "/StoreEbeam/GetReadyForEbeamInjection/TurnInjectorOn");
            break;
        case Page_BringEbeamToFirstScreen:
            url = QUrl(BASE_URL "/StoreEbeam/GetReadyForEbeamInjection/BringEbeamTo1stScreen");
            break;
        case Page_BringEbeamToThirdScreen:
            url = QUrl(BASE_URL "/StoreEbeam/GetReadyForEbeamInjection/BringEbeamTo3rdScreen");
            break;
        case Page_StoreEbeam:
             url = QUrl(BASE_URL "/StoreEbeam/StoreEbeam");
             break;
        default:
        url = QUrl();

    }
    if (url.isEmpty()) {
        QString message = tr("This help is likely not to be of any help.");
        QMessageBox::information(this, tr("Startup Wizard Help"), message);
    } else {
        LWebViewDialog *dlg = new LWebViewDialog();
        dlg->load(url);
        dlg->show();
    }
}