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

    Log log(LOG_FILENAME, APP_NAME, APP_VERSION);
    log.printHeader();

    Vna vna(CONNECTION_TYPE, INSTRUMENT_ADDRESS);
    vna.useLog(&log);
    vna.printInfo();

    Keys keys(KEY_PATH);

    if (isNoConnection(vna) || isUnknownModel(vna))
            return(0);

    SettingsPage page;
    page.setVna(&vna);
    page.setKeys(&keys);
    page.loadKeys();
    page.show();
    int result = app.exec();

    MeasurementSettings settings = page.settings();
    qDebug() << "acceptable?  " << page.hasAcceptableInput();
    qDebug() << "Output Port: " << settings.outputPort();
    qDebug() << "Input Port:  " << settings.inputPort();
    if (page.hasAcceptableInput())
        page.saveKeys();

    return result;
}
Beispiel #2
0
int main(int argc, char **argv)
{
    QApplication app(argc, argv);

    SettingsPage settingsPage;

    settingsPage.show();
    app.exec();
}