Exemplo n.º 1
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent)
    {
    QString None(tr("Not selected"));

    setupUi(this);
    setWindowTitle(ProgramVersion);
    QPixmap AppIconPixmap(iconpixmap);
    QIcon ApplicationIcon(AppIconPixmap);
    setWindowIcon(ApplicationIcon);
    cbxAI_Im->addItem(None,0);
    cbxAI_Cmd->addItem(None,0);

    cbxAI_Cm_tlg->addItem(None,0);
    cbxAI_Freq_tlg->addItem(None,0);
    cbxAI_Gain_tlg->addItem(None,0);
    cbxAI_Lsw_tlg->addItem(None,0);
    cbxAO_Cmd->addItem(None,0);


    comedi_set_global_oor_behavior(COMEDI_OOR_NUMBER);
    GetComediInfo();

    QObject::connect(btnTest, SIGNAL(clicked()), this, SLOT(RunCalibration()));
    QObject::connect(pbOK, SIGNAL(clicked()), this, SLOT(SaveSelections()));
    QObject::connect(pbReject, SIGNAL(clicked()), this, SLOT(close()));
    WindowUpdateTimer = new QTimer(this);
    connect(WindowUpdateTimer, SIGNAL(timeout()), this, SLOT(UpdateOnTimer()));
    WindowUpdateTimer->start(1000/WindowUpdateFrequencyHz);
    }
Exemplo n.º 2
0
    void CPUUsageThread::run() // override
    {
        RunCalibration();

        while (!m_stopMonitoring)
        {
            Load();

            int sleepTime = m_profile.SleepPeriodMs();
            if (sleepTime > 0) Sleep(sleepTime);
        }
    }