diff --git a/classes/loggerthread.cpp b/classes/loggerthread.cpp index 3f3c409..473e475 100644 --- a/classes/loggerthread.cpp +++ b/classes/loggerthread.cpp @@ -24,6 +24,7 @@ loggerThread::loggerThread(QObject *parent) : QObject(parent) readChannelSettingsFile(); qDebug()<<" debug LoggerThread 1 "; + initialize_Dir_FileName(); // ---------------------------------------------------------------- // -------- Set Clock @@ -37,7 +38,6 @@ loggerThread::loggerThread(QObject *parent) : QObject(parent) // ---------------------------------------------------------------- - local_logging = false; local_logTime_MS = 0; local_log_sec = 0; local_log_min = 0; @@ -46,7 +46,7 @@ loggerThread::loggerThread(QObject *parent) : QObject(parent) //qDebug()<<" before timer_graph initialize "; timer_graphValue = new QTimer(this); connect(timer_graphValue, SIGNAL(timeout()), SLOT(on_timer_graphValue_elapsed())); - //timer_graphValue->start(100); + timer_graphValue->start(200); //qDebug()<<" debug LoggerThread 3 "; timer_elapser = new QElapsedTimer(); @@ -76,7 +76,7 @@ void loggerThread::on_timer_logger_elapsed() chnlArray[i].Get_RawValue_fromADDRESSAuto(); } } - if(local_logging) + if(logging_isStarted) { // Logging to File logStr = ""; @@ -101,7 +101,9 @@ void loggerThread::on_timer_logger_elapsed() } } // end of FPGA-Counter Matched - if(local_logging) + + /* + if(logging_isStarted) { if(local_logTime_MS >= 1000) { @@ -144,7 +146,7 @@ void loggerThread::on_timer_logger_elapsed() } //qDebug()<<" local_logTime_MS:: "<= 1000) + { + local_logTime_MS -= 1000; + local_log_sec++; + if(local_log_hours<100) + local_LogTime_Str = QString("00"+QString::number(local_log_hours)+ ":"); + else if(local_log_hours<10) + local_LogTime_Str = QString("0"+QString::number(local_log_hours)+ ":"); + else + local_LogTime_Str = QString(QString::number(local_log_hours)+ ":"); + + if(local_log_min<10) + local_LogTime_Str += QString("0"+QString::number(local_log_min)+ ":"); + else + local_LogTime_Str += QString(QString::number(local_log_min)+ ":"); + + if(local_log_sec<10) + local_LogTime_Str += QString("0"+QString::number(local_log_sec)); + else + local_LogTime_Str += QString(QString::number(local_log_sec)); + + emit tx_ramdomOP(1, 1.0, local_LogTime_Str); + } + if(local_log_sec > 59) + { + local_log_sec = 0; + local_log_min++; + } + if(local_log_min > 59) + { + local_log_min = 0; + local_log_hours++; + } + nanoSec += timer_elapser->nsecsElapsed(); + if(nanoSec > 1000000) + { + nanoSec -= 1000000; + local_logTime_MS++; + } + //qDebug()<<" local_logTime_MS:: "<start(100); chnlSettingsWindowIsOpen = false; - *(local_FPGA_ADDRESS + 0x06) = 0x01; +// *(local_FPGA_ADDRESS + 0x06) = 0x01; - *(local_FPGA_ADDRESS + 0x07) = 0x00; - *(local_FPGA_ADDRESS + 0x07) = 0x01; - *(local_FPGA_ADDRESS + 0x07) = 0x00; +// *(local_FPGA_ADDRESS + 0x07) = 0x00; +// *(local_FPGA_ADDRESS + 0x07) = 0x01; +// *(local_FPGA_ADDRESS + 0x07) = 0x00; } else { - timer_graphValue->stop(); - *(local_FPGA_ADDRESS + 0x06) = 0x00; + //timer_graphValue->stop(); + timer_graphValue->start(200); + //*(local_FPGA_ADDRESS + 0x06) = 0x00; } } void loggerThread::rx_ChannelSettingsWindowIsOpen(bool windOpen) @@ -329,6 +400,7 @@ void loggerThread::rx_setChannelNewSettings(int chnl, float fac, CHANNEL_PGA pga { qDebug()<<"\n\n##################################################"; qDebug()<<" New Chanel Settings:: ID:"<stop(); chnlArray[chnl].set_Channel_Factor(fac); chnlArray[chnl].set_Channel_PGA_Type(pgaa, typ); chnlArray[chnl].set_Channel_Reference(ref); @@ -336,6 +408,7 @@ void loggerThread::rx_setChannelNewSettings(int chnl, float fac, CHANNEL_PGA pga chnlArray[chnl].reConfigFPGA_forThisChannel(); rx_saveChannelSettingsToFile(); + timer_graphValue->start(200); } void loggerThread::rx_giveMechannelSettings(int chnl) { @@ -564,11 +637,18 @@ void loggerThread::initialize_User_FileName() if(logFile->open(QIODevice::WriteOnly)) { logging_isStarted = true; + *(local_FPGA_ADDRESS + 0x06) = 0x01; + + *(local_FPGA_ADDRESS + 0x07) = 0x00; + *(local_FPGA_ADDRESS + 0x07) = 0x01; + *(local_FPGA_ADDRESS + 0x07) = 0x00; logFile->write(str.toUtf8()); logFile->close(); } else { + // disable automatic system + *(local_FPGA_ADDRESS + 0x06) = 0x00; qDebug()<<"Error in open File"; } } diff --git a/classes/loggerthread.h b/classes/loggerthread.h index 5730e93..3ad2a99 100644 --- a/classes/loggerthread.h +++ b/classes/loggerthread.h @@ -16,7 +16,7 @@ class loggerThread : public QObject signals: void tx_channel_Value(int chnl,uint32_t raw, float fVal, float facVal); - void tx_loggingStarted(bool started); + void tx_loggingStarted_andFileOpenSuccess(bool started); void tx_graphChnlValue(int chnl, float val); void tx_channelisEnabled(int chnl, bool enableVal); @@ -79,7 +79,6 @@ public slots: int sampleRate_Sec = 2; int sampleRate_MS = 100; int sampleRate_MS_Calculated = 0; - bool local_logging = false; qint64 elapsed_timeNanoSec = 0; int elapsed_timeMS = 0; QString logStr = ""; diff --git a/configchwin.cpp b/configchwin.cpp index 794751a..439fcf0 100644 --- a/configchwin.cpp +++ b/configchwin.cpp @@ -268,7 +268,7 @@ void ConfigChWin::rx_ChannelValue(int chnl, uint32_t raw, float fVal, float FacV { //qDebug()<<" Value Received : Chnnel = "< - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 10 - 20 - - - - - - - - true - - - - 0 - 0 - - - - - 60 - 60 - - - - - 60 - 60 - - - - Settings Window - - - font: 500 16pt "Times New Roman"; + + + true + + + + 0 + 0 + + + + + 60 + 60 + + + + + 16777215 + 16777215 + + + + Settings Window + + + background-color:transparent; +color:red; +border: 2px solid red; +border-radius:8px; + + + +/*font: 500 16pt "Times New Roman"; padding: 5px; background-color: transparent; background-color: white; border: 1px solid black; border-radius:5px; -border-image: url(:/pics/settings.png); - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 10 - 20 - - - - - +border-image: url(:/pics/settings.png);*/ + + + Back + + @@ -309,7 +280,7 @@ border-image: url(:/pics/settings.png); Remove this Graph Channel - font: 500 16pt "Times New Roman"; + font: 500 14pt "Times New Roman"; padding: 5px; color:white; background-color:rgb(40, 110, 255); diff --git a/mainwindow.cpp b/mainwindow.cpp index b729b10..55b8145 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -6,7 +6,8 @@ MainWindow::MainWindow(QWidget *parent) , ui(new Ui::MainWindow) { ui->setupUi(this); - //this->setFixedSize(1024, 768); + this->setFixedSize(1024, 768); + this->setWindowFlags(Qt::FramelessWindowHint); this->setWindowState(Qt::WindowFullScreen); @@ -121,6 +122,15 @@ void MainWindow::rx_ramdomOP(int idx, float val, QString str) } } } +void MainWindow::rx_loggingStarted_andFileOpenSuccess(bool started) +{ + local_loggingStarted = started; + ui->pb_StartLog->setText(QString(local_loggingStarted? "Started":"Stoped")); + ui->pb_StartLog->setStyleSheet(QString(local_loggingStarted? styleLogStart : styleLogStop)); + +} + + // ------------------------ Timers Slots ------------------ void MainWindow::on_timer_singleShot_elapsed() @@ -470,116 +480,116 @@ void MainWindow::connectAllButtonsClickToSingleSlot() void MainWindow::disableLCDNumber(int indx) { switch (indx) { - case 0: {ui->lbl_lcdNumber_0->display(""); ui->lbl_factor_0->setVisible(false); break; } - case 1: { ui->lbl_lcdNumber_1->display(""); ui->lbl_factor_1->setVisible(false); break; } - case 2: { ui->lbl_lcdNumber_2->display(""); ui->lbl_factor_2->setVisible(false); break; } - case 3: { ui->lbl_lcdNumber_3->display(""); ui->lbl_factor_3->setVisible(false); break; } - case 4: { ui->lbl_lcdNumber_4->display(""); ui->lbl_factor_4->setVisible(false); break; } - case 5: { ui->lbl_lcdNumber_5->display(""); ui->lbl_factor_5->setVisible(false); break; } - case 6: { ui->lbl_lcdNumber_6->display(""); ui->lbl_factor_6->setVisible(false); break; } - case 7: { ui->lbl_lcdNumber_7->display(""); ui->lbl_factor_7->setVisible(false); break; } - case 8: { ui->lbl_lcdNumber_8->display(""); ui->lbl_factor_8->setVisible(false); break; } - case 9: { ui->lbl_lcdNumber_9->display(""); ui->lbl_factor_9->setVisible(false); break; } - case 10: { ui->lbl_lcdNumber_10->display(""); ui->lbl_factor_10->setVisible(false); break; } - case 11: { ui->lbl_lcdNumber_11->display(""); ui->lbl_factor_11->setVisible(false); break; } - - case 12: { ui->lbl_lcdNumber_12->display(""); ui->lbl_factor_12->setVisible(false); break; } - case 13: { ui->lbl_lcdNumber_13->display(""); ui->lbl_factor_13->setVisible(false); break; } - case 14: { ui->lbl_lcdNumber_14->display(""); ui->lbl_factor_14->setVisible(false); break; } - case 15: { ui->lbl_lcdNumber_15->display(""); ui->lbl_factor_15->setVisible(false); break; } - case 16: { ui->lbl_lcdNumber_16->display(""); ui->lbl_factor_16->setVisible(false); break; } - case 17: { ui->lbl_lcdNumber_17->display(""); ui->lbl_factor_17->setVisible(false); break; } - case 18: { ui->lbl_lcdNumber_18->display(""); ui->lbl_factor_18->setVisible(false); break; } - case 19: { ui->lbl_lcdNumber_19->display(""); ui->lbl_factor_19->setVisible(false); break; } - case 20: { ui->lbl_lcdNumber_20->display(""); ui->lbl_factor_20->setVisible(false); break; } - case 21: { ui->lbl_lcdNumber_21->display(""); ui->lbl_factor_21->setVisible(false); break; } - - case 22: { ui->lbl_lcdNumber_22->display(""); ui->lbl_factor_22->setVisible(false); break; } - case 23: { ui->lbl_lcdNumber_23->display(""); ui->lbl_factor_23->setVisible(false); break; } - case 24: { ui->lbl_lcdNumber_24->display(""); ui->lbl_factor_24->setVisible(false); break; } - case 25: { ui->lbl_lcdNumber_25->display(""); ui->lbl_factor_25->setVisible(false); break; } - case 26: { ui->lbl_lcdNumber_26->display(""); ui->lbl_factor_26->setVisible(false); break; } - case 27: { ui->lbl_lcdNumber_27->display(""); ui->lbl_factor_27->setVisible(false); break; } - case 28: { ui->lbl_lcdNumber_28->display(""); ui->lbl_factor_28->setVisible(false); break; } - case 29: { ui->lbl_lcdNumber_29->display(""); ui->lbl_factor_29->setVisible(false); break; } - case 30: { ui->lbl_lcdNumber_30->display(""); ui->lbl_factor_30->setVisible(false); break; } - case 31: { ui->lbl_lcdNumber_31->display(""); ui->lbl_factor_31->setVisible(false); break; } - - case 32: { ui->lbl_lcdNumber_32->display(""); ui->lbl_factor_32->setVisible(false); break; } - case 33: { ui->lbl_lcdNumber_33->display(""); ui->lbl_factor_33->setVisible(false); break; } - case 34: { ui->lbl_lcdNumber_34->display(""); ui->lbl_factor_34->setVisible(false); break; } - case 35: { ui->lbl_lcdNumber_35->display(""); ui->lbl_factor_35->setVisible(false); break; } - case 36: { ui->lbl_lcdNumber_36->display(""); ui->lbl_factor_36->setVisible(false); break; } - case 37: { ui->lbl_lcdNumber_37->display(""); ui->lbl_factor_37->setVisible(false); break; } - case 38: { ui->lbl_lcdNumber_38->display(""); ui->lbl_factor_38->setVisible(false); break; } - case 39: { ui->lbl_lcdNumber_39->display(""); ui->lbl_factor_39->setVisible(false); break; } - case 40: { ui->lbl_lcdNumber_40->display(""); ui->lbl_factor_40->setVisible(false); break; } - case 41: { ui->lbl_lcdNumber_41->display(""); ui->lbl_factor_41->setVisible(false); break; } - - case 42: { ui->lbl_lcdNumber_42->display(""); ui->lbl_factor_42->setVisible(false); break; } - case 43: { ui->lbl_lcdNumber_43->display(""); ui->lbl_factor_43->setVisible(false); break; } - case 44: { ui->lbl_lcdNumber_44->display(""); ui->lbl_factor_44->setVisible(false); break; } - case 45: { ui->lbl_lcdNumber_45->display(""); ui->lbl_factor_45->setVisible(false); break; } - case 46: { ui->lbl_lcdNumber_46->display(""); ui->lbl_factor_46->setVisible(false); break; } - case 47: { ui->lbl_lcdNumber_47->display(""); ui->lbl_factor_47->setVisible(false); break; } + case 0: {ui->lbl_lcdNumber_0->display(""); ui->lbl_factor_0->setStyleSheet(lblStyle_transparent); break; } + case 1: { ui->lbl_lcdNumber_1->display(""); ui->lbl_factor_1->setStyleSheet(lblStyle_transparent); break; } + case 2: { ui->lbl_lcdNumber_2->display(""); ui->lbl_factor_2->setStyleSheet(lblStyle_transparent); break; } + case 3: { ui->lbl_lcdNumber_3->display(""); ui->lbl_factor_3->setStyleSheet(lblStyle_transparent); break; } + case 4: { ui->lbl_lcdNumber_4->display(""); ui->lbl_factor_4->setStyleSheet(lblStyle_transparent); break; } + case 5: { ui->lbl_lcdNumber_5->display(""); ui->lbl_factor_5->setStyleSheet(lblStyle_transparent); break; } + case 6: { ui->lbl_lcdNumber_6->display(""); ui->lbl_factor_6->setStyleSheet(lblStyle_transparent); break; } + case 7: { ui->lbl_lcdNumber_7->display(""); ui->lbl_factor_7->setStyleSheet(lblStyle_transparent); break; } + case 8: { ui->lbl_lcdNumber_8->display(""); ui->lbl_factor_8->setStyleSheet(lblStyle_transparent); break; } + case 9: { ui->lbl_lcdNumber_9->display(""); ui->lbl_factor_9->setStyleSheet(lblStyle_transparent); break; } + case 10: { ui->lbl_lcdNumber_10->display(""); ui->lbl_factor_10->setStyleSheet(lblStyle_transparent); break; } + case 11: { ui->lbl_lcdNumber_11->display(""); ui->lbl_factor_11->setStyleSheet(lblStyle_transparent); break; } + + case 12: { ui->lbl_lcdNumber_12->display(""); ui->lbl_factor_12->setStyleSheet(lblStyle_transparent); break; } + case 13: { ui->lbl_lcdNumber_13->display(""); ui->lbl_factor_13->setStyleSheet(lblStyle_transparent); break; } + case 14: { ui->lbl_lcdNumber_14->display(""); ui->lbl_factor_14->setStyleSheet(lblStyle_transparent); break; } + case 15: { ui->lbl_lcdNumber_15->display(""); ui->lbl_factor_15->setStyleSheet(lblStyle_transparent); break; } + case 16: { ui->lbl_lcdNumber_16->display(""); ui->lbl_factor_16->setStyleSheet(lblStyle_transparent); break; } + case 17: { ui->lbl_lcdNumber_17->display(""); ui->lbl_factor_17->setStyleSheet(lblStyle_transparent); break; } + case 18: { ui->lbl_lcdNumber_18->display(""); ui->lbl_factor_18->setStyleSheet(lblStyle_transparent); break; } + case 19: { ui->lbl_lcdNumber_19->display(""); ui->lbl_factor_19->setStyleSheet(lblStyle_transparent); break; } + case 20: { ui->lbl_lcdNumber_20->display(""); ui->lbl_factor_20->setStyleSheet(lblStyle_transparent); break; } + case 21: { ui->lbl_lcdNumber_21->display(""); ui->lbl_factor_21->setStyleSheet(lblStyle_transparent); break; } + + case 22: { ui->lbl_lcdNumber_22->display(""); ui->lbl_factor_22->setStyleSheet(lblStyle_transparent); break; } + case 23: { ui->lbl_lcdNumber_23->display(""); ui->lbl_factor_23->setStyleSheet(lblStyle_transparent); break; } + case 24: { ui->lbl_lcdNumber_24->display(""); ui->lbl_factor_24->setStyleSheet(lblStyle_transparent); break; } + case 25: { ui->lbl_lcdNumber_25->display(""); ui->lbl_factor_25->setStyleSheet(lblStyle_transparent); break; } + case 26: { ui->lbl_lcdNumber_26->display(""); ui->lbl_factor_26->setStyleSheet(lblStyle_transparent); break; } + case 27: { ui->lbl_lcdNumber_27->display(""); ui->lbl_factor_27->setStyleSheet(lblStyle_transparent); break; } + case 28: { ui->lbl_lcdNumber_28->display(""); ui->lbl_factor_28->setStyleSheet(lblStyle_transparent); break; } + case 29: { ui->lbl_lcdNumber_29->display(""); ui->lbl_factor_29->setStyleSheet(lblStyle_transparent); break; } + case 30: { ui->lbl_lcdNumber_30->display(""); ui->lbl_factor_30->setStyleSheet(lblStyle_transparent); break; } + case 31: { ui->lbl_lcdNumber_31->display(""); ui->lbl_factor_31->setStyleSheet(lblStyle_transparent); break; } + + case 32: { ui->lbl_lcdNumber_32->display(""); ui->lbl_factor_32->setStyleSheet(lblStyle_transparent); break; } + case 33: { ui->lbl_lcdNumber_33->display(""); ui->lbl_factor_33->setStyleSheet(lblStyle_transparent); break; } + case 34: { ui->lbl_lcdNumber_34->display(""); ui->lbl_factor_34->setStyleSheet(lblStyle_transparent); break; } + case 35: { ui->lbl_lcdNumber_35->display(""); ui->lbl_factor_35->setStyleSheet(lblStyle_transparent); break; } + case 36: { ui->lbl_lcdNumber_36->display(""); ui->lbl_factor_36->setStyleSheet(lblStyle_transparent); break; } + case 37: { ui->lbl_lcdNumber_37->display(""); ui->lbl_factor_37->setStyleSheet(lblStyle_transparent); break; } + case 38: { ui->lbl_lcdNumber_38->display(""); ui->lbl_factor_38->setStyleSheet(lblStyle_transparent); break; } + case 39: { ui->lbl_lcdNumber_39->display(""); ui->lbl_factor_39->setStyleSheet(lblStyle_transparent); break; } + case 40: { ui->lbl_lcdNumber_40->display(""); ui->lbl_factor_40->setStyleSheet(lblStyle_transparent); break; } + case 41: { ui->lbl_lcdNumber_41->display(""); ui->lbl_factor_41->setStyleSheet(lblStyle_transparent); break; } + + case 42: { ui->lbl_lcdNumber_42->display(""); ui->lbl_factor_42->setStyleSheet(lblStyle_transparent); break; } + case 43: { ui->lbl_lcdNumber_43->display(""); ui->lbl_factor_43->setStyleSheet(lblStyle_transparent); break; } + case 44: { ui->lbl_lcdNumber_44->display(""); ui->lbl_factor_44->setStyleSheet(lblStyle_transparent); break; } + case 45: { ui->lbl_lcdNumber_45->display(""); ui->lbl_factor_45->setStyleSheet(lblStyle_transparent); break; } + case 46: { ui->lbl_lcdNumber_46->display(""); ui->lbl_factor_46->setStyleSheet(lblStyle_transparent); break; } + case 47: { ui->lbl_lcdNumber_47->display(""); ui->lbl_factor_47->setStyleSheet(lblStyle_transparent); break; } } // end of Switch statement } void MainWindow::showFactorLabel(int indx) { switch (indx) { - case 0: {ui->lbl_factor_0->setVisible(true); break; } - case 1: {ui->lbl_factor_1->setVisible(true); break; } - case 2: {ui->lbl_factor_2->setVisible(true); break; } - case 3: {ui->lbl_factor_3->setVisible(true); break; } - case 4: {ui->lbl_factor_4->setVisible(true); break; } - case 5: {ui->lbl_factor_5->setVisible(true); break; } - case 6: {ui->lbl_factor_6->setVisible(true); break; } - case 7: {ui->lbl_factor_7->setVisible(true); break; } - case 8: {ui->lbl_factor_8->setVisible(true); break; } - case 9: {ui->lbl_factor_9->setVisible(true); break; } - case 10: {ui->lbl_factor_10->setVisible(true); break; } - case 11: {ui->lbl_factor_11->setVisible(true); break; } - - case 12: {ui->lbl_factor_12->setVisible(true); break; } - case 13: {ui->lbl_factor_13->setVisible(true); break; } - case 14: {ui->lbl_factor_14->setVisible(true); break; } - case 15: {ui->lbl_factor_15->setVisible(true); break; } - case 16: {ui->lbl_factor_16->setVisible(true); break; } - case 17: {ui->lbl_factor_17->setVisible(true); break; } - case 18: {ui->lbl_factor_18->setVisible(true); break; } - case 19: {ui->lbl_factor_19->setVisible(true); break; } - case 20: {ui->lbl_factor_20->setVisible(true); break; } - case 21: {ui->lbl_factor_21->setVisible(true); break; } - - case 22: {ui->lbl_factor_22->setVisible(true); break; } - case 23: {ui->lbl_factor_23->setVisible(true); break; } - case 24: {ui->lbl_factor_24->setVisible(true); break; } - case 25: {ui->lbl_factor_25->setVisible(true); break; } - case 26: {ui->lbl_factor_26->setVisible(true); break; } - case 27: {ui->lbl_factor_27->setVisible(true); break; } - case 28: {ui->lbl_factor_28->setVisible(true); break; } - case 29: {ui->lbl_factor_29->setVisible(true); break; } - case 30: {ui->lbl_factor_30->setVisible(true); break; } - case 31: {ui->lbl_factor_31->setVisible(true); break; } - - case 32: {ui->lbl_factor_32->setVisible(true); break; } - case 33: {ui->lbl_factor_33->setVisible(true); break; } - case 34: {ui->lbl_factor_34->setVisible(true); break; } - case 35: {ui->lbl_factor_35->setVisible(true); break; } - case 36: {ui->lbl_factor_36->setVisible(true); break; } - case 37: {ui->lbl_factor_37->setVisible(true); break; } - case 38: {ui->lbl_factor_38->setVisible(true); break; } - case 39: {ui->lbl_factor_39->setVisible(true); break; } - case 40: {ui->lbl_factor_40->setVisible(true); break; } - case 41: {ui->lbl_factor_41->setVisible(true); break; } - case 42: {ui->lbl_factor_42->setVisible(true); break; } - - case 43: {ui->lbl_factor_43->setVisible(true); break; } - case 44: {ui->lbl_factor_44->setVisible(true); break; } - case 45: {ui->lbl_factor_45->setVisible(true); break; } - case 46: {ui->lbl_factor_46->setVisible(true); break; } - case 47: {ui->lbl_factor_47->setVisible(true); break; } + case 0: {ui->lbl_factor_0->setStyleSheet(lblStyle_normal); break; } + case 1: {ui->lbl_factor_1->setStyleSheet(lblStyle_normal); break; } + case 2: {ui->lbl_factor_2->setStyleSheet(lblStyle_normal); break; } + case 3: {ui->lbl_factor_3->setStyleSheet(lblStyle_normal); break; } + case 4: {ui->lbl_factor_4->setStyleSheet(lblStyle_normal); break; } + case 5: {ui->lbl_factor_5->setStyleSheet(lblStyle_normal); break; } + case 6: {ui->lbl_factor_6->setStyleSheet(lblStyle_normal); break; } + case 7: {ui->lbl_factor_7->setStyleSheet(lblStyle_normal); break; } + case 8: {ui->lbl_factor_8->setStyleSheet(lblStyle_normal); break; } + case 9: {ui->lbl_factor_9->setStyleSheet(lblStyle_normal); break; } + case 10: {ui->lbl_factor_10->setStyleSheet(lblStyle_normal); break; } + case 11: {ui->lbl_factor_11->setStyleSheet(lblStyle_normal); break; } + + case 12: {ui->lbl_factor_12->setStyleSheet(lblStyle_normal); break; } + case 13: {ui->lbl_factor_13->setStyleSheet(lblStyle_normal); break; } + case 14: {ui->lbl_factor_14->setStyleSheet(lblStyle_normal); break; } + case 15: {ui->lbl_factor_15->setStyleSheet(lblStyle_normal); break; } + case 16: {ui->lbl_factor_16->setStyleSheet(lblStyle_normal); break; } + case 17: {ui->lbl_factor_17->setStyleSheet(lblStyle_normal); break; } + case 18: {ui->lbl_factor_18->setStyleSheet(lblStyle_normal); break; } + case 19: {ui->lbl_factor_19->setStyleSheet(lblStyle_normal); break; } + case 20: {ui->lbl_factor_20->setStyleSheet(lblStyle_normal); break; } + case 21: {ui->lbl_factor_21->setStyleSheet(lblStyle_normal); break; } + + case 22: {ui->lbl_factor_22->setStyleSheet(lblStyle_normal); break; } + case 23: {ui->lbl_factor_23->setStyleSheet(lblStyle_normal); break; } + case 24: {ui->lbl_factor_24->setStyleSheet(lblStyle_normal); break; } + case 25: {ui->lbl_factor_25->setStyleSheet(lblStyle_normal); break; } + case 26: {ui->lbl_factor_26->setStyleSheet(lblStyle_normal); break; } + case 27: {ui->lbl_factor_27->setStyleSheet(lblStyle_normal); break; } + case 28: {ui->lbl_factor_28->setStyleSheet(lblStyle_normal); break; } + case 29: {ui->lbl_factor_29->setStyleSheet(lblStyle_normal); break; } + case 30: {ui->lbl_factor_30->setStyleSheet(lblStyle_normal); break; } + case 31: {ui->lbl_factor_31->setStyleSheet(lblStyle_normal); break; } + + case 32: {ui->lbl_factor_32->setStyleSheet(lblStyle_normal); break; } + case 33: {ui->lbl_factor_33->setStyleSheet(lblStyle_normal); break; } + case 34: {ui->lbl_factor_34->setStyleSheet(lblStyle_normal); break; } + case 35: {ui->lbl_factor_35->setStyleSheet(lblStyle_normal); break; } + case 36: {ui->lbl_factor_36->setStyleSheet(lblStyle_normal); break; } + case 37: {ui->lbl_factor_37->setStyleSheet(lblStyle_normal); break; } + case 38: {ui->lbl_factor_38->setStyleSheet(lblStyle_normal); break; } + case 39: {ui->lbl_factor_39->setStyleSheet(lblStyle_normal); break; } + case 40: {ui->lbl_factor_40->setStyleSheet(lblStyle_normal); break; } + case 41: {ui->lbl_factor_41->setStyleSheet(lblStyle_normal); break; } + case 42: {ui->lbl_factor_42->setStyleSheet(lblStyle_normal); break; } + + case 43: {ui->lbl_factor_43->setStyleSheet(lblStyle_normal); break; } + case 44: {ui->lbl_factor_44->setStyleSheet(lblStyle_normal); break; } + case 45: {ui->lbl_factor_45->setStyleSheet(lblStyle_normal); break; } + case 46: {ui->lbl_factor_46->setStyleSheet(lblStyle_normal); break; } + case 47: {ui->lbl_factor_47->setStyleSheet(lblStyle_normal); break; } } // end of Switch statement } @@ -674,8 +684,10 @@ void MainWindow::on_pb_CloseApp_clicked() } else { + emit tx_generate_ThisGUI(gui_FIRST_WIN); emit tx_ClosingWindow_logConfig(); - QCoreApplication::quit(); +// emit tx_ClosingWindow_logConfig(); +// QCoreApplication::quit(); } } @@ -691,299 +703,298 @@ void MainWindow::on_pb_EnableAll_clicked() { // ---- 0 ui->pb_channel_0->setChecked(true); ui->pb_channel_0->clicked(); - ui->lbl_lcdNumber_0->display(""); ui->lbl_factor_0->setVisible(true); + ui->lbl_lcdNumber_0->display(""); ui->lbl_factor_0->setStyleSheet(lblStyle_normal); // ---- 1 ui->pb_channel_1->setChecked(true); ui->pb_channel_1->clicked(); - ui->lbl_lcdNumber_1->display(""); ui->lbl_factor_1->setVisible(true); + ui->lbl_lcdNumber_1->display(""); ui->lbl_factor_1->setStyleSheet(lblStyle_normal); // ---- 2 ui->pb_channel_2->setChecked(true); ui->pb_channel_2->clicked(); - ui->lbl_lcdNumber_2->display(""); ui->lbl_factor_2->setVisible(true); + ui->lbl_lcdNumber_2->display(""); ui->lbl_factor_2->setStyleSheet(lblStyle_normal); // ---- 3 ui->pb_channel_3->setChecked(true); ui->pb_channel_3->clicked(); - ui->lbl_lcdNumber_3->display(""); ui->lbl_factor_3->setVisible(true); + ui->lbl_lcdNumber_3->display(""); ui->lbl_factor_3->setStyleSheet(lblStyle_normal); // ---- 4 ui->pb_channel_4->setChecked(true); ui->pb_channel_4->clicked(); - ui->lbl_lcdNumber_4->display(""); ui->lbl_factor_4->setVisible(true); + ui->lbl_lcdNumber_4->display(""); ui->lbl_factor_4->setStyleSheet(lblStyle_normal); // ---- 5 ui->pb_channel_5->setChecked(true); ui->pb_channel_5->clicked(); - ui->lbl_lcdNumber_5->display(""); ui->lbl_factor_5->setVisible(true); + ui->lbl_lcdNumber_5->display(""); ui->lbl_factor_5->setStyleSheet(lblStyle_normal); // ---- 6 ui->pb_channel_6->setChecked(true); ui->pb_channel_6->clicked(); - ui->lbl_lcdNumber_6->display(""); ui->lbl_factor_6->setVisible(true); + ui->lbl_lcdNumber_6->display(""); ui->lbl_factor_6->setStyleSheet(lblStyle_normal); // ---- 7 ui->pb_channel_7->setChecked(true); ui->pb_channel_7->clicked(); - ui->lbl_lcdNumber_7->display(""); ui->lbl_factor_7->setVisible(true); + ui->lbl_lcdNumber_7->display(""); ui->lbl_factor_7->setStyleSheet(lblStyle_normal); // ---- 8 ui->pb_channel_8->setChecked(true); ui->pb_channel_8->clicked(); - ui->lbl_lcdNumber_8->display(""); ui->lbl_factor_8->setVisible(true); + ui->lbl_lcdNumber_8->display(""); ui->lbl_factor_8->setStyleSheet(lblStyle_normal); // ---- 9 ui->pb_channel_9->setChecked(true); ui->pb_channel_9->clicked(); - ui->lbl_lcdNumber_9->display(""); ui->lbl_factor_9->setVisible(true); + ui->lbl_lcdNumber_9->display(""); ui->lbl_factor_9->setStyleSheet(lblStyle_normal); // ---- 10 ui->pb_channel_10->setChecked(true); ui->pb_channel_10->clicked(); - ui->lbl_lcdNumber_10->display(""); ui->lbl_factor_10->setVisible(true); + ui->lbl_lcdNumber_10->display(""); ui->lbl_factor_10->setStyleSheet(lblStyle_normal); // ---- 11 ui->pb_channel_11->setChecked(true); ui->pb_channel_11->clicked(); - ui->lbl_lcdNumber_11->display(""); ui->lbl_factor_11->setVisible(true); + ui->lbl_lcdNumber_11->display(""); ui->lbl_factor_11->setStyleSheet(lblStyle_normal); // ---- 12 ui->pb_channel_12->setChecked(true); ui->pb_channel_12->clicked(); - ui->lbl_lcdNumber_12->display(""); ui->lbl_factor_12->setVisible(true); + ui->lbl_lcdNumber_12->display(""); ui->lbl_factor_12->setStyleSheet(lblStyle_normal); // ---- 13 ui->pb_channel_13->setChecked(true); ui->pb_channel_13->clicked(); - ui->lbl_lcdNumber_13->display(""); ui->lbl_factor_13->setVisible(true); + ui->lbl_lcdNumber_13->display(""); ui->lbl_factor_13->setStyleSheet(lblStyle_normal); // ---- 14 ui->pb_channel_14->setChecked(true); ui->pb_channel_14->clicked(); - ui->lbl_lcdNumber_14->display(""); ui->lbl_factor_14->setVisible(true); + ui->lbl_lcdNumber_14->display(""); ui->lbl_factor_14->setStyleSheet(lblStyle_normal); // ---- 15 ui->pb_channel_15->setChecked(true); ui->pb_channel_15->clicked(); - ui->lbl_lcdNumber_15->display(""); ui->lbl_factor_15->setVisible(true); + ui->lbl_lcdNumber_15->display(""); ui->lbl_factor_15->setStyleSheet(lblStyle_normal); // ---- 16 ui->pb_channel_16->setChecked(true); ui->pb_channel_16->clicked(); - ui->lbl_lcdNumber_16->display(""); ui->lbl_factor_16->setVisible(true); + ui->lbl_lcdNumber_16->display(""); ui->lbl_factor_16->setStyleSheet(lblStyle_normal); // ---- 17 ui->pb_channel_17->setChecked(true); ui->pb_channel_17->clicked(); - ui->lbl_lcdNumber_17->display(""); ui->lbl_factor_17->setVisible(true); + ui->lbl_lcdNumber_17->display(""); ui->lbl_factor_17->setStyleSheet(lblStyle_normal); // ---- 18 ui->pb_channel_18->setChecked(true); ui->pb_channel_18->clicked(); - ui->lbl_lcdNumber_18->display(""); ui->lbl_factor_18->setVisible(true); + ui->lbl_lcdNumber_18->display(""); ui->lbl_factor_18->setStyleSheet(lblStyle_normal); // ---- 19 ui->pb_channel_19->setChecked(true); ui->pb_channel_19->clicked(); - ui->lbl_lcdNumber_19->display(""); ui->lbl_factor_19->setVisible(true); + ui->lbl_lcdNumber_19->display(""); ui->lbl_factor_19->setStyleSheet(lblStyle_normal); // ---- 20 ui->pb_channel_20->setChecked(true); ui->pb_channel_20->clicked(); - ui->lbl_lcdNumber_20->display(""); ui->lbl_factor_20->setVisible(true); + ui->lbl_lcdNumber_20->display(""); ui->lbl_factor_20->setStyleSheet(lblStyle_normal); // ---- 21 ui->pb_channel_21->setChecked(true); ui->pb_channel_21->clicked(); - ui->lbl_lcdNumber_21->display(""); ui->lbl_factor_21->setVisible(true); + ui->lbl_lcdNumber_21->display(""); ui->lbl_factor_21->setStyleSheet(lblStyle_normal); // ---- 22 ui->pb_channel_22->setChecked(true); ui->pb_channel_22->clicked(); - ui->lbl_lcdNumber_22->display(""); ui->lbl_factor_22->setVisible(true); + ui->lbl_lcdNumber_22->display(""); ui->lbl_factor_22->setStyleSheet(lblStyle_normal); // ---- 23 ui->pb_channel_23->setChecked(true); ui->pb_channel_23->clicked(); - ui->lbl_lcdNumber_23->display(""); ui->lbl_factor_23->setVisible(true); + ui->lbl_lcdNumber_23->display(""); ui->lbl_factor_23->setStyleSheet(lblStyle_normal); // ---- 24 ui->pb_channel_24->setChecked(true); ui->pb_channel_24->clicked(); - ui->lbl_lcdNumber_24->display(""); ui->lbl_factor_24->setVisible(true); + ui->lbl_lcdNumber_24->display(""); ui->lbl_factor_24->setStyleSheet(lblStyle_normal); // ---- 25 ui->pb_channel_25->setChecked(true); ui->pb_channel_25->clicked(); - ui->lbl_lcdNumber_25->display(""); ui->lbl_factor_25->setVisible(true); + ui->lbl_lcdNumber_25->display(""); ui->lbl_factor_25->setStyleSheet(lblStyle_normal); // ---- 26 ui->pb_channel_26->setChecked(true); ui->pb_channel_26->clicked(); - ui->lbl_lcdNumber_26->display(""); ui->lbl_factor_26->setVisible(true); + ui->lbl_lcdNumber_26->display(""); ui->lbl_factor_26->setStyleSheet(lblStyle_normal); // ---- 27 ui->pb_channel_27->setChecked(true); ui->pb_channel_27->clicked(); - ui->lbl_lcdNumber_27->display(""); ui->lbl_factor_27->setVisible(true); + ui->lbl_lcdNumber_27->display(""); ui->lbl_factor_27->setStyleSheet(lblStyle_normal); // ---- 28 ui->pb_channel_28->setChecked(true); ui->pb_channel_28->clicked(); - ui->lbl_lcdNumber_28->display(""); ui->lbl_factor_28->setVisible(true); + ui->lbl_lcdNumber_28->display(""); ui->lbl_factor_28->setStyleSheet(lblStyle_normal); // ---- 29 ui->pb_channel_29->setChecked(true); ui->pb_channel_29->clicked(); - ui->lbl_lcdNumber_29->display(""); ui->lbl_factor_29->setVisible(true); + ui->lbl_lcdNumber_29->display(""); ui->lbl_factor_29->setStyleSheet(lblStyle_normal); // ---- 30 ui->pb_channel_30->setChecked(true); ui->pb_channel_30->clicked(); - ui->lbl_lcdNumber_30->display(""); ui->lbl_factor_30->setVisible(true); + ui->lbl_lcdNumber_30->display(""); ui->lbl_factor_30->setStyleSheet(lblStyle_normal); // ---- 31 ui->pb_channel_31->setChecked(true); ui->pb_channel_31->clicked(); - ui->lbl_lcdNumber_31->display(""); ui->lbl_factor_31->setVisible(true); + ui->lbl_lcdNumber_31->display(""); ui->lbl_factor_31->setStyleSheet(lblStyle_normal); // ---- 32 ui->pb_channel_32->setChecked(true); ui->pb_channel_32->clicked(); - ui->lbl_lcdNumber_32->display(""); ui->lbl_factor_32->setVisible(true); + ui->lbl_lcdNumber_32->display(""); ui->lbl_factor_32->setStyleSheet(lblStyle_normal); // ---- 33 ui->pb_channel_33->setChecked(true); ui->pb_channel_33->clicked(); - ui->lbl_lcdNumber_33->display(""); ui->lbl_factor_33->setVisible(true); + ui->lbl_lcdNumber_33->display(""); ui->lbl_factor_33->setStyleSheet(lblStyle_normal); // ---- 34 ui->pb_channel_34->setChecked(true); ui->pb_channel_34->clicked(); - ui->lbl_lcdNumber_34->display(""); ui->lbl_factor_34->setVisible(true); + ui->lbl_lcdNumber_34->display(""); ui->lbl_factor_34->setStyleSheet(lblStyle_normal); // ---- 35 ui->pb_channel_35->setChecked(true); ui->pb_channel_35->clicked(); - ui->lbl_lcdNumber_35->display(""); ui->lbl_factor_35->setVisible(true); + ui->lbl_lcdNumber_35->display(""); ui->lbl_factor_35->setStyleSheet(lblStyle_normal); // ---- 36 ui->pb_channel_36->setChecked(true); ui->pb_channel_36->clicked(); - ui->lbl_lcdNumber_36->display(""); ui->lbl_factor_36->setVisible(true); + ui->lbl_lcdNumber_36->display(""); ui->lbl_factor_36->setStyleSheet(lblStyle_normal); // ---- 37 ui->pb_channel_37->setChecked(true); ui->pb_channel_37->clicked(); - ui->lbl_lcdNumber_37->display(""); ui->lbl_factor_37->setVisible(true); + ui->lbl_lcdNumber_37->display(""); ui->lbl_factor_37->setStyleSheet(lblStyle_normal); // ---- 38 ui->pb_channel_38->setChecked(true); ui->pb_channel_38->clicked(); - ui->lbl_lcdNumber_38->display(""); ui->lbl_factor_38->setVisible(true); + ui->lbl_lcdNumber_38->display(""); ui->lbl_factor_38->setStyleSheet(lblStyle_normal); // ---- 39 ui->pb_channel_39->setChecked(true); ui->pb_channel_39->clicked(); - ui->lbl_lcdNumber_39->display(""); ui->lbl_factor_39->setVisible(true); + ui->lbl_lcdNumber_39->display(""); ui->lbl_factor_39->setStyleSheet(lblStyle_normal); // ---- 40 ui->pb_channel_40->setChecked(true); ui->pb_channel_40->clicked(); - ui->lbl_lcdNumber_40->display(""); ui->lbl_factor_40->setVisible(true); + ui->lbl_lcdNumber_40->display(""); ui->lbl_factor_40->setStyleSheet(lblStyle_normal); // ---- 41 ui->pb_channel_41->setChecked(true); ui->pb_channel_41->clicked(); - ui->lbl_lcdNumber_41->display(""); ui->lbl_factor_41->setVisible(true); + ui->lbl_lcdNumber_41->display(""); ui->lbl_factor_41->setStyleSheet(lblStyle_normal); // ---- 42 ui->pb_channel_42->setChecked(true); ui->pb_channel_42->clicked(); - ui->lbl_lcdNumber_42->display(""); ui->lbl_factor_42->setVisible(true); + ui->lbl_lcdNumber_42->display(""); ui->lbl_factor_42->setStyleSheet(lblStyle_normal); // ---- 43 ui->pb_channel_43->setChecked(true); ui->pb_channel_43->clicked(); - ui->lbl_lcdNumber_43->display(""); ui->lbl_factor_43->setVisible(true); + ui->lbl_lcdNumber_43->display(""); ui->lbl_factor_43->setStyleSheet(lblStyle_normal); // ---- 44 ui->pb_channel_44->setChecked(true); ui->pb_channel_44->clicked(); - ui->lbl_lcdNumber_44->display(""); ui->lbl_factor_44->setVisible(true); + ui->lbl_lcdNumber_44->display(""); ui->lbl_factor_44->setStyleSheet(lblStyle_normal); // ---- 45 ui->pb_channel_45->setChecked(true); ui->pb_channel_45->clicked(); - ui->lbl_lcdNumber_45->display(""); ui->lbl_factor_45->setVisible(true); + ui->lbl_lcdNumber_45->display(""); ui->lbl_factor_45->setStyleSheet(lblStyle_normal); // ---- 46 ui->pb_channel_46->setChecked(true); ui->pb_channel_46->clicked(); - ui->lbl_lcdNumber_46->display(""); ui->lbl_factor_46->setVisible(true); + ui->lbl_lcdNumber_46->display(""); ui->lbl_factor_46->setStyleSheet(lblStyle_normal); // ---- 47 ui->pb_channel_47->setChecked(true); ui->pb_channel_47->clicked(); - ui->lbl_lcdNumber_47->display(""); ui->lbl_factor_47->setVisible(true); + ui->lbl_lcdNumber_47->display(""); ui->lbl_factor_47->setStyleSheet(lblStyle_normal); } void MainWindow::on_pb_DisableAll_clicked() { // ---- 0 ui->pb_channel_0->setChecked(false); ui->pb_channel_0->clicked(); - ui->lbl_lcdNumber_0->display(""); ui->lbl_factor_0->setVisible(false); + ui->lbl_lcdNumber_0->display(""); ui->lbl_factor_0->setStyleSheet(lblStyle_transparent); // ---- 1 ui->pb_channel_1->setChecked(false); ui->pb_channel_1->clicked(); - ui->lbl_lcdNumber_1->display(""); ui->lbl_factor_1->setVisible(false); + ui->lbl_lcdNumber_1->display(""); ui->lbl_factor_1->setStyleSheet(lblStyle_transparent); // ---- 2 ui->pb_channel_2->setChecked(false); ui->pb_channel_2->clicked(); - ui->lbl_lcdNumber_2->display(""); ui->lbl_factor_2->setVisible(false); + ui->lbl_lcdNumber_2->display(""); ui->lbl_factor_2->setStyleSheet(lblStyle_transparent); // ---- 3 ui->pb_channel_3->setChecked(false); ui->pb_channel_3->clicked(); - ui->lbl_lcdNumber_3->display(""); ui->lbl_factor_3->setVisible(false); + ui->lbl_lcdNumber_3->display(""); ui->lbl_factor_3->setStyleSheet(lblStyle_transparent); // ---- 4 ui->pb_channel_4->setChecked(false); ui->pb_channel_4->clicked(); - ui->lbl_lcdNumber_4->display(""); ui->lbl_factor_4->setVisible(false); + ui->lbl_lcdNumber_4->display(""); ui->lbl_factor_4->setStyleSheet(lblStyle_transparent); // ---- 5 ui->pb_channel_5->setChecked(false); ui->pb_channel_5->clicked(); - ui->lbl_lcdNumber_5->display(""); ui->lbl_factor_5->setVisible(false); + ui->lbl_lcdNumber_5->display(""); ui->lbl_factor_5->setStyleSheet(lblStyle_transparent); // ---- 6 ui->pb_channel_6->setChecked(false); ui->pb_channel_6->clicked(); - ui->lbl_lcdNumber_6->display(""); ui->lbl_factor_6->setVisible(false); + ui->lbl_lcdNumber_6->display(""); ui->lbl_factor_6->setStyleSheet(lblStyle_transparent); // ---- 7 ui->pb_channel_7->setChecked(false); ui->pb_channel_7->clicked(); - ui->lbl_lcdNumber_7->display(""); ui->lbl_factor_7->setVisible(false); + ui->lbl_lcdNumber_7->display(""); ui->lbl_factor_7->setStyleSheet(lblStyle_transparent); // ---- 8 ui->pb_channel_8->setChecked(false); ui->pb_channel_8->clicked(); - ui->lbl_lcdNumber_8->display(""); ui->lbl_factor_8->setVisible(false); + ui->lbl_lcdNumber_8->display(""); ui->lbl_factor_8->setStyleSheet(lblStyle_transparent); // ---- 9 ui->pb_channel_9->setChecked(false); ui->pb_channel_9->clicked(); - ui->lbl_lcdNumber_9->display(""); ui->lbl_factor_9->setVisible(false); + ui->lbl_lcdNumber_9->display(""); ui->lbl_factor_9->setStyleSheet(lblStyle_transparent); // ---- 10 ui->pb_channel_10->setChecked(false); ui->pb_channel_10->clicked(); - ui->lbl_lcdNumber_10->display(""); ui->lbl_factor_10->setVisible(false); + ui->lbl_lcdNumber_10->display(""); ui->lbl_factor_10->setStyleSheet(lblStyle_transparent); // ---- 11 ui->pb_channel_11->setChecked(false); ui->pb_channel_11->clicked(); - ui->lbl_lcdNumber_11->display(""); ui->lbl_factor_11->setVisible(false); + ui->lbl_lcdNumber_11->display(""); ui->lbl_factor_11->setStyleSheet(lblStyle_transparent); // ---- 12 ui->pb_channel_12->setChecked(false); ui->pb_channel_12->clicked(); - ui->lbl_lcdNumber_12->display(""); ui->lbl_factor_12->setVisible(false); + ui->lbl_lcdNumber_12->display(""); ui->lbl_factor_12->setStyleSheet(lblStyle_transparent); // ---- 13 ui->pb_channel_13->setChecked(false); ui->pb_channel_13->clicked(); - ui->lbl_lcdNumber_13->display(""); ui->lbl_factor_13->setVisible(false); + ui->lbl_lcdNumber_13->display(""); ui->lbl_factor_13->setStyleSheet(lblStyle_transparent); // ---- 14 ui->pb_channel_14->setChecked(false); ui->pb_channel_14->clicked(); - ui->lbl_lcdNumber_14->display(""); ui->lbl_factor_14->setVisible(false); + ui->lbl_lcdNumber_14->display(""); ui->lbl_factor_14->setStyleSheet(lblStyle_transparent); // ---- 15 ui->pb_channel_15->setChecked(false); ui->pb_channel_15->clicked(); - ui->lbl_lcdNumber_15->display(""); ui->lbl_factor_15->setVisible(false); + ui->lbl_lcdNumber_15->display(""); ui->lbl_factor_15->setStyleSheet(lblStyle_transparent); // ---- 16 ui->pb_channel_16->setChecked(false); ui->pb_channel_16->clicked(); - ui->lbl_lcdNumber_16->display(""); ui->lbl_factor_16->setVisible(false); + ui->lbl_lcdNumber_16->display(""); ui->lbl_factor_16->setStyleSheet(lblStyle_transparent); // ---- 17 ui->pb_channel_17->setChecked(false); ui->pb_channel_17->clicked(); - ui->lbl_lcdNumber_17->display(""); ui->lbl_factor_17->setVisible(false); + ui->lbl_lcdNumber_17->display(""); ui->lbl_factor_17->setStyleSheet(lblStyle_transparent); // ---- 18 ui->pb_channel_18->setChecked(false); ui->pb_channel_18->clicked(); - ui->lbl_lcdNumber_18->display(""); ui->lbl_factor_18->setVisible(false); + ui->lbl_lcdNumber_18->display(""); ui->lbl_factor_18->setStyleSheet(lblStyle_transparent); // ---- 19 ui->pb_channel_19->setChecked(false); ui->pb_channel_19->clicked(); - ui->lbl_lcdNumber_19->display(""); ui->lbl_factor_19->setVisible(false); + ui->lbl_lcdNumber_19->display(""); ui->lbl_factor_19->setStyleSheet(lblStyle_transparent); // ---- 20 ui->pb_channel_20->setChecked(false); ui->pb_channel_20->clicked(); - ui->lbl_lcdNumber_20->display(""); ui->lbl_factor_20->setVisible(false); + ui->lbl_lcdNumber_20->display(""); ui->lbl_factor_20->setStyleSheet(lblStyle_transparent); // ---- 21 ui->pb_channel_21->setChecked(false); ui->pb_channel_21->clicked(); - ui->lbl_lcdNumber_21->display(""); ui->lbl_factor_21->setVisible(false); + ui->lbl_lcdNumber_21->display(""); ui->lbl_factor_21->setStyleSheet(lblStyle_transparent); // ---- 22 ui->pb_channel_22->setChecked(false); ui->pb_channel_22->clicked(); - ui->lbl_lcdNumber_22->display(""); ui->lbl_factor_22->setVisible(false); + ui->lbl_lcdNumber_22->display(""); ui->lbl_factor_22->setStyleSheet(lblStyle_transparent); // ---- 23 ui->pb_channel_23->setChecked(false); ui->pb_channel_23->clicked(); - ui->lbl_lcdNumber_23->display(""); ui->lbl_factor_23->setVisible(false); + ui->lbl_lcdNumber_23->display(""); ui->lbl_factor_23->setStyleSheet(lblStyle_transparent); // ---- 24 ui->pb_channel_24->setChecked(false); ui->pb_channel_24->clicked(); - ui->lbl_lcdNumber_24->display(""); ui->lbl_factor_24->setVisible(false); + ui->lbl_lcdNumber_24->display(""); ui->lbl_factor_24->setStyleSheet(lblStyle_transparent); // ---- 25 ui->pb_channel_25->setChecked(false); ui->pb_channel_25->clicked(); - ui->lbl_lcdNumber_25->display(""); ui->lbl_factor_25->setVisible(false); + ui->lbl_lcdNumber_25->display(""); ui->lbl_factor_25->setStyleSheet(lblStyle_transparent); // ---- 26 ui->pb_channel_26->setChecked(false); ui->pb_channel_26->clicked(); - ui->lbl_lcdNumber_26->display(""); ui->lbl_factor_26->setVisible(false); + ui->lbl_lcdNumber_26->display(""); ui->lbl_factor_26->setStyleSheet(lblStyle_transparent); // ---- 27 ui->pb_channel_27->setChecked(false); ui->pb_channel_27->clicked(); - ui->lbl_lcdNumber_27->display(""); ui->lbl_factor_27->setVisible(false); + ui->lbl_lcdNumber_27->display(""); ui->lbl_factor_27->setStyleSheet(lblStyle_transparent); // ---- 28 ui->pb_channel_28->setChecked(false); ui->pb_channel_28->clicked(); - ui->lbl_lcdNumber_28->display(""); ui->lbl_factor_28->setVisible(false); + ui->lbl_lcdNumber_28->display(""); ui->lbl_factor_28->setStyleSheet(lblStyle_transparent); // ---- 29 ui->pb_channel_29->setChecked(false); ui->pb_channel_29->clicked(); - ui->lbl_lcdNumber_29->display(""); ui->lbl_factor_29->setVisible(false); + ui->lbl_lcdNumber_29->display(""); ui->lbl_factor_29->setStyleSheet(lblStyle_transparent); // ---- 30 ui->pb_channel_30->setChecked(false); ui->pb_channel_30->clicked(); - ui->lbl_lcdNumber_30->display(""); ui->lbl_factor_30->setVisible(false); + ui->lbl_lcdNumber_30->display(""); ui->lbl_factor_30->setStyleSheet(lblStyle_transparent); // ---- 31 ui->pb_channel_31->setChecked(false); ui->pb_channel_31->clicked(); - ui->lbl_lcdNumber_31->display(""); ui->lbl_factor_31->setVisible(false); + ui->lbl_lcdNumber_31->display(""); ui->lbl_factor_31->setStyleSheet(lblStyle_transparent); // ---- 32 ui->pb_channel_32->setChecked(false); ui->pb_channel_32->clicked(); - ui->lbl_lcdNumber_32->display(""); ui->lbl_factor_32->setVisible(false); + ui->lbl_lcdNumber_32->display(""); ui->lbl_factor_32->setStyleSheet(lblStyle_transparent); // ---- 33 ui->pb_channel_33->setChecked(false); ui->pb_channel_33->clicked(); - ui->lbl_lcdNumber_33->display(""); ui->lbl_factor_33->setVisible(false); + ui->lbl_lcdNumber_33->display(""); ui->lbl_factor_33->setStyleSheet(lblStyle_transparent); // ---- 34 ui->pb_channel_34->setChecked(false); ui->pb_channel_34->clicked(); - ui->lbl_lcdNumber_34->display(""); ui->lbl_factor_34->setVisible(false); + ui->lbl_lcdNumber_34->display(""); ui->lbl_factor_34->setStyleSheet(lblStyle_transparent); // ---- 35 ui->pb_channel_35->setChecked(false); ui->pb_channel_35->clicked(); - ui->lbl_lcdNumber_35->display(""); ui->lbl_factor_35->setVisible(false); + ui->lbl_lcdNumber_35->display(""); ui->lbl_factor_35->setStyleSheet(lblStyle_transparent); // ---- 36 ui->pb_channel_36->setChecked(false); ui->pb_channel_36->clicked(); - ui->lbl_lcdNumber_36->display(""); ui->lbl_factor_36->setVisible(false); + ui->lbl_lcdNumber_36->display(""); ui->lbl_factor_36->setStyleSheet(lblStyle_transparent); // ---- 37 ui->pb_channel_37->setChecked(false); ui->pb_channel_37->clicked(); - ui->lbl_lcdNumber_37->display(""); ui->lbl_factor_37->setVisible(false); + ui->lbl_lcdNumber_37->display(""); ui->lbl_factor_37->setStyleSheet(lblStyle_transparent); // ---- 38 ui->pb_channel_38->setChecked(false); ui->pb_channel_38->clicked(); - ui->lbl_lcdNumber_38->display(""); ui->lbl_factor_38->setVisible(false); + ui->lbl_lcdNumber_38->display(""); ui->lbl_factor_38->setStyleSheet(lblStyle_transparent); // ---- 39 ui->pb_channel_39->setChecked(false); ui->pb_channel_39->clicked(); - ui->lbl_lcdNumber_39->display(""); ui->lbl_factor_39->setVisible(false); + ui->lbl_lcdNumber_39->display(""); ui->lbl_factor_39->setStyleSheet(lblStyle_transparent); // ---- 40 ui->pb_channel_40->setChecked(false); ui->pb_channel_40->clicked(); - ui->lbl_lcdNumber_40->display(""); ui->lbl_factor_40->setVisible(false); + ui->lbl_lcdNumber_40->display(""); ui->lbl_factor_40->setStyleSheet(lblStyle_transparent); // ---- 41 ui->pb_channel_41->setChecked(false); ui->pb_channel_41->clicked(); - ui->lbl_lcdNumber_41->display(""); ui->lbl_factor_41->setVisible(false); + ui->lbl_lcdNumber_41->display(""); ui->lbl_factor_41->setStyleSheet(lblStyle_transparent); // ---- 42 ui->pb_channel_42->setChecked(false); ui->pb_channel_42->clicked(); - ui->lbl_lcdNumber_42->display(""); ui->lbl_factor_42->setVisible(false); + ui->lbl_lcdNumber_42->display(""); ui->lbl_factor_42->setStyleSheet(lblStyle_transparent); // ---- 43 ui->pb_channel_43->setChecked(false); ui->pb_channel_43->clicked(); - ui->lbl_lcdNumber_43->display(""); ui->lbl_factor_43->setVisible(false); + ui->lbl_lcdNumber_43->display(""); ui->lbl_factor_43->setStyleSheet(lblStyle_transparent); // ---- 44 ui->pb_channel_44->setChecked(false); ui->pb_channel_44->clicked(); - ui->lbl_lcdNumber_44->display(""); ui->lbl_factor_44->setVisible(false); + ui->lbl_lcdNumber_44->display(""); ui->lbl_factor_44->setStyleSheet(lblStyle_transparent); // ---- 45 ui->pb_channel_45->setChecked(false); ui->pb_channel_45->clicked(); - ui->lbl_lcdNumber_45->display(""); ui->lbl_factor_45->setVisible(false); + ui->lbl_lcdNumber_45->display(""); ui->lbl_factor_45->setStyleSheet(lblStyle_transparent); // ---- 46 ui->pb_channel_46->setChecked(false); ui->pb_channel_46->clicked(); - ui->lbl_lcdNumber_46->display(""); ui->lbl_factor_46->setVisible(false); + ui->lbl_lcdNumber_46->display(""); ui->lbl_factor_46->setStyleSheet(lblStyle_transparent); // ---- 47 ui->pb_channel_47->setChecked(false); ui->pb_channel_47->clicked(); - ui->lbl_lcdNumber_47->display(""); ui->lbl_factor_47->setVisible(false); + ui->lbl_lcdNumber_47->display(""); ui->lbl_factor_47->setStyleSheet(lblStyle_transparent); } - void MainWindow::on_pb_Channel_Clicked() { QPushButton *button = (QPushButton *)sender(); @@ -1028,8 +1039,6 @@ void MainWindow::on_pb_StartLog_clicked() local_loggingStarted = !local_loggingStarted; emit tx_loggingStartStop(local_loggingStarted, logUserFilePath); - ui->pb_StartLog->setText(QString(local_loggingStarted? "Started":"Stoped")); - ui->pb_StartLog->setStyleSheet(QString(local_loggingStarted? styleLogStart : styleLogStop)); } void MainWindow::on_pb_ConfigChannelSettings_clicked() diff --git a/mainwindow.h b/mainwindow.h index 0b42699..7fa184d 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -35,7 +35,7 @@ public slots: void rx_sendingFactorsAndPGAs(int chnl, float fac, float pgaa, bool enabled); void rx_ramdomOP(int idx, float val, QString str); - + void rx_loggingStarted_andFileOpenSuccess(bool started); void rx_confirmationBoxClosed(bool yesBTN, int param);