#include "grifoxlrumainwindow.h"
#include <QApplication>

#include "xlruconnectiondialog.h"

#include "bsk_versign.h"

#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#endif

BSK_VERSIGN_STD_DEFINE("XlruMonitor", BSK_VERSIGN_STR_VER3(1, 0, 0), "N/A", "XlruMonitor", "GCC " __VERSION__);

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    //QString appNameVer="Grifo XLRU Monitor";
            //QString("%1 (%2-%3)")
            //    .arg("GrifoScope")
            //    .arg(versign_application_signature_.data.vstr)
            //    .arg(versign_application_ext_signature_.data.buildid);

    QString appNameVer=
            QString("%1 (%2-%3)")
                .arg("GrifoXlruMonitor")
                .arg(versign_application_signature_.data.vstr)
                .arg(versign_application_ext_signature_.data.buildid);

    a.setApplicationDisplayName(appNameVer); //"GrifoScope");

    XLruConnectionDialog dlg;
    int r=dlg.exec();
    if (r==QDialog::Rejected)
        return 0;

    GrifoXLruMainWindow w(dlg.connectionInfo());
    w.show();

    return a.exec();
}
