Пример #1
0
void CMainWindow::connectSignals()
{
    connect(backend,SIGNAL(sigStatus(CCommand::status_t)), this, SLOT(slotReceivedData(CCommand::status_t)));
    connect(ui->pushPower, SIGNAL(toggled(bool)), this, SLOT(powerOn(bool)));
    connect(dbgWin,SIGNAL(sendData(QString&)),this,SLOT(slotSendData(QString&)));
    //connect(cmd,SIGNAL(sendData(QString&)),this,SLOT(slotSendData(QString&)));
    connect(ui->volume1, SIGNAL(valueChanged(double)), this,SLOT(slotVolume1(double)));
    //connect(ui->volume2, SIGNAL(valueChanged(double)), this,SLOT(slotVolume2(double)));
    connect(ui->knobSquelch,SIGNAL(valueChanged(double)), this, SLOT(slotSquelch(double)));
    connect(ui->knobIF,SIGNAL(valueChanged(double)), this, SLOT(slotIF(double)));
    connect(ui->pushNoiseBlanker,SIGNAL(toggled(bool)),this,SLOT(slotNoiseBlanker(bool)));
    connect(ui->pushAGC,SIGNAL(toggled(bool)),this,SLOT(slotAGC(bool)));
    connect(ui->pushVSC,SIGNAL(toggled(bool)),this,SLOT(slotVSC(bool)));


    // Connect filters
    connect(ui->filterGroup, SIGNAL(buttonClicked(int)), this, SLOT(slotFilter(int)));
    // Connect Moudlation mode
    connect(ui->modeGroup,SIGNAL(buttonClicked(int)),this, SLOT(slotModulation(int)));

    // Frequency
    connect( display, SIGNAL(frequencyChanged(QString)), this,SLOT(slotFrequency(QString)));
    connect( myBandScope, SIGNAL(frequencyChanged(QString)), this, SLOT(slotFrequency(QString)));

    // Set threshold
    connect(ui->threshold, SIGNAL(valueChanged(int)), backend->getDecoder(), SLOT(slotThreshold(int)));
    connect(ui->correlationLength,SIGNAL(valueChanged(int)), backend->getDecoder(), SLOT(slotSetCorrelationLength(int)));

    // Connect Decoder
    connect(ui->decoderList, SIGNAL(currentIndexChanged(int)), this, SLOT(slotDecoderChange(int)));

    // Channel change
    connect(ui->channel, SIGNAL(currentIndexChanged(int)), backend->getDecoder(), SLOT(slotSetChannel(int)));

    // Connect Scope type
    connect(ui->cbPlotterType , SIGNAL(currentIndexChanged(int)),this, SLOT(slotScopeChanged(int)));
    connect(ui->refreshRate, SIGNAL(valueChanged(int)), this, SLOT(slotRefreshRate(int)));
    connect(ui->cbWindow, SIGNAL(currentIndexChanged(QString)), this, SLOT(slotWindowFunction(QString)));

    // Band Scope
    connect(ui->pushBandscope,SIGNAL(clicked(bool)),this,SLOT(slotBandScope(bool)));
    connect(ui->cbBandwidth, SIGNAL(currentIndexChanged(int)), this, SLOT(slotBandScopeWidth(int)));
    connect(ui->cbStepsize, SIGNAL(currentIndexChanged(int)), this, SLOT(slotBandScopeStep(int)));

    // Step size change
    connect(ui->pushStepUp,SIGNAL(clicked()), this, SLOT(slotStepUp()));
    connect(ui->pushStepDown,SIGNAL(clicked()), this, SLOT(slotStepDown()));

    // Connect load file
    connect(ui->actionLoad, SIGNAL(triggered()), this, SLOT(slotLoadFile()));
    connect(display, SIGNAL(radioChanged(int)), this, SLOT(slotRadioClicked(int)));
    connect(ui->actionSettings, SIGNAL(triggered()), this, SLOT(slotSettings()));
    // Connect spectrum widget
    connect(backend->getDecoder(),SIGNAL(sigRawSamples(double*,double*,int)),mySpectrum,SLOT(slotRawSamples(double*,double*,int)));

    // Connect Demodulator to debug windows
    connect(backend->getDecoder(),SIGNAL(sendData(QString)),this,SLOT(slotDemodulatorData(QString)));
}
Пример #2
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent)
{
    setupUi(this);

    tabWidget->addTab(&orderForm, trUtf8("Заказы"));
    tabWidget->addTab(&graphForm, trUtf8("График"));
    tabWidget->addTab(&ingrForm,  trUtf8("Продукты"));

    connect(orderForm.pbLoad, SIGNAL(clicked()), SLOT(slotLoadFile()));
    connect(orderForm.pbImit, SIGNAL(clicked()), SLOT(slotImit()));
    connect(graphForm.pbPlot, SIGNAL(clicked()), SLOT(slotPlot()));

    orderForm.table->horizontalHeader()->setResizeMode(QHeaderView::Stretch);

    DishList::getInstance()->init();

}