void MainWindow::on_pbMedStat_clicked() { LaunchProgs("Медицинский статистик",NULL,NULL,NULL); }
Options::Options(QWidget *parent) : QWidget(parent) { ui.setupUi(this); SetupPluginList(); channelsChanged(0); ui.sbPaTxDelayValue->setVisible(false); ui.sbVoiceRepeatTime->setVisible(false); ui.tbSDR->setCurrentIndex(0); ui.SwMain->setCurrentIndex(0); #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) QString DocumentsLocation = QStandardPaths::writableLocation(QStandardPaths::HomeLocation); #else QString DocumentsLocation = QDesktopServices::storageLocation(QDesktopServices:: HomeLocation); #endif QDir dir; if(dir.exists(DocumentsLocation)) { if(!dir.exists(DocumentsLocation + "/ExpertSDR")) dir.mkdir(DocumentsLocation + "/ExpertSDR"); pathDefaultWaveIQ = DocumentsLocation + "/ExpertSDR/"; } else { if(dir.mkdir(QDir::homePath() + "/ExpertSDR")) pathDefaultWaveIQ = QDir::homePath() + "/ExpertSDR/"; else { QMessageBox msgBox; msgBox.setText("Choose a directory where wave files will be located."); msgBox.exec(); // QString path = QDir::homePath(); if(path.isEmpty()) { msgBox.setText("Wave file location:\n" + QDir::homePath()); msgBox.exec(); pathDefaultWaveIQ = QDir::homePath() + "/"; } else pathDefaultWaveIQ = path + "/"; } } pathDefaultWaveIQDefault = pathDefaultWaveIQ; ui.lbWavePathIQ->setText(pathDefaultWaveIQ); pProg0 = new QProcess(this); pProg1 = new QProcess(this); pProg2 = new QProcess(this); pProg3 = new QProcess(this); pProg4 = new QProcess(this); //prepare to pupulate list in combobox with serial ports ui.cbPttPortName->clear(); ui.cbAddKeyPortName->clear(); ui.cbKeyPortName->clear(); QList<QextPortInfo> ports = QextSerialEnumerator::getPorts(); if (ports.size()!=0) { for (int i = 0; i < ports.size(); i++) { ui.cbPttPortName->addItem(ports.at(i).portName.toLocal8Bit().constData(),0); ui.cbAddKeyPortName->addItem(ports.at(i).portName.toLocal8Bit().constData(),0); ui.cbKeyPortName->addItem(ports.at(i).portName.toLocal8Bit().constData(),0); } } #ifdef Q_OS_LINUX pPttPort = new QextSerialPort("/dev/ttyS0", QextSerialPort::EventDriven); pKeyPort = new QextSerialPort("/dev/ttyS0", QextSerialPort::EventDriven); pAddKeyPort = new QextSerialPort("/dev/ttyS0", QextSerialPort::EventDriven); #else pPttPort = new QextSerialPort("COM1", QextSerialPort::EventDriven); pKeyPort = new QextSerialPort("COM1", QextSerialPort::EventDriven); pAddKeyPort = new QextSerialPort("COM1", QextSerialPort::EventDriven); #endif /*Q_OS_LINUX*/ connect(pPttPort, SIGNAL(dsrChanged(bool)), this, SLOT(OnPttDsr(bool))); connect(pPttPort, SIGNAL(ctsChanged(bool)), this, SLOT(OnPttCts(bool))); connect(pKeyPort, SIGNAL(dsrChanged(bool)), this, SLOT(OnKeyDsr(bool))); connect(pKeyPort, SIGNAL(ctsChanged(bool)), this, SLOT(OnKeyCts(bool))); connect(pAddKeyPort, SIGNAL(dsrChanged(bool)), this, SLOT(OnAddKeyDsr(bool))); connect(pAddKeyPort, SIGNAL(ctsChanged(bool)), this, SLOT(OnAddKeyCts(bool))); connect(ui.LwOptions, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, SLOT(ChangePage(QListWidgetItem*, QListWidgetItem*))); connect(ui.pbOK, SIGNAL(clicked()), this, SLOT(OnOK())); connect(ui.pbCancel, SIGNAL(clicked()), this, SLOT(OnCancel())); connect(ui.slTxImRejMag, SIGNAL(valueChanged(int)), this, SLOT(OnTxGainChange(int))); connect(ui.slTxImRejPhase, SIGNAL(valueChanged(int)), this, SLOT(OnTxPhaseChange(int))); connect(ui.slTxImRejMagCw, SIGNAL(valueChanged(int)), this, SLOT(OnTxGainChangeCw(int))); connect(ui.sbTxImRejMagCw, SIGNAL(valueChanged(int)), this, SLOT(OnTxGainChangeCw(int))); connect(ui.slTxImRejPhaseCw, SIGNAL(valueChanged(int)), this, SLOT(OnTxPhaseChangeCw(int))); connect(ui.sbTxImRejPhaseCw, SIGNAL(valueChanged(int)), this, SLOT(OnTxPhaseChangeCw(int))); connect(ui.slTxImRejMagAmFm, SIGNAL(valueChanged(int)), this, SLOT(OnTxGainChangeAmFm(int))); connect(ui.sbTxImRejMagAmFm, SIGNAL(valueChanged(int)), this, SLOT(OnTxGainChangeAmFm(int))); connect(ui.slTxImRejPhaseAmFm, SIGNAL(valueChanged(int)), this, SLOT(OnTxPhaseChangeAmFm(int))); connect(ui.sbTxImRejPhaseAmFm, SIGNAL(valueChanged(int)), this, SLOT(OnTxPhaseChangeAmFm(int))); connect(ui.pbProg0, SIGNAL(clicked()), this, SLOT(OnProg0())); connect(ui.pbProg1, SIGNAL(clicked()), this, SLOT(OnProg1())); connect(ui.pbProg2, SIGNAL(clicked()), this, SLOT(OnProg2())); connect(ui.pbProg3, SIGNAL(clicked()), this, SLOT(OnProg3())); connect(ui.pbProg4, SIGNAL(clicked()), this, SLOT(OnProg4())); connect(ui.pbApply, SIGNAL(clicked()), this, SLOT(LaunchProgs())); connect(ui.pbOK, SIGNAL(clicked()), this, SLOT(LaunchProgs())); if(ui.chbExtCtrl->isChecked()) OnEnableExControl(1); else OnEnableExControl(0); connect(ui.chbExtCtrl, SIGNAL(stateChanged(int)), this, SLOT(OnEnableExControl(int))); connect(ui.spinBox_0, SIGNAL(valueChanged(int)), this, SLOT(PowerCorrect160(int))); connect(ui.spinBox_1, SIGNAL(valueChanged(int)), this, SLOT(PowerCorrect80(int))); connect(ui.spinBox_2, SIGNAL(valueChanged(int)), this, SLOT(PowerCorrect60(int))); connect(ui.spinBox_3, SIGNAL(valueChanged(int)), this, SLOT(PowerCorrect40(int))); connect(ui.spinBox_4, SIGNAL(valueChanged(int)), this, SLOT(PowerCorrect30(int))); connect(ui.spinBox_5, SIGNAL(valueChanged(int)), this, SLOT(PowerCorrect20(int))); connect(ui.spinBox_6, SIGNAL(valueChanged(int)), this, SLOT(PowerCorrect17(int))); connect(ui.spinBox_7, SIGNAL(valueChanged(int)), this, SLOT(PowerCorrect15(int))); connect(ui.spinBox_8, SIGNAL(valueChanged(int)), this, SLOT(PowerCorrect12(int))); connect(ui.spinBox_9, SIGNAL(valueChanged(int)), this, SLOT(PowerCorrect10(int))); connect(ui.spinBox_10, SIGNAL(valueChanged(int)), this, SLOT(PowerCorrect6(int))); connect(ui.spinBox_11, SIGNAL(valueChanged(int)), this, SLOT(PowerCorrect2(int))); connect(ui.spinBox_12, SIGNAL(valueChanged(int)), this, SLOT(PowerCorrect07(int))); connect(ui.chbPttEnable, SIGNAL(clicked(bool)), this, SLOT(pttOpen(bool))); ui.chbPttDtr->setVisible(false); ui.chbPttRts->setVisible(false); connect(ui.chbKeyEnable, SIGNAL(clicked(bool)), this, SLOT(keyOpen(bool))); connect(ui.chbAddKeyEnable, SIGNAL(clicked(bool)), this, SLOT(addKeyOpen(bool))); connect(ui.cbPaDriver, SIGNAL(currentIndexChanged(int)), this, SLOT(soundDrvChanged(int))); connect(ui.cbPaIn, SIGNAL(currentIndexChanged(int)), this, SLOT(soundChanged(int))); connect(ui.cbPaOut, SIGNAL(currentIndexChanged(int)), this, SLOT(soundChanged(int))); connect(ui.cbPaBufferSize, SIGNAL(currentIndexChanged(int)), this, SLOT(soundChanged(int))); connect(ui.cbPaSampleRate, SIGNAL(currentIndexChanged(int)), this, SLOT(soundChanged(int))); connect(ui.cbPaChannels, SIGNAL(currentIndexChanged(int)), this, SLOT(soundChanged(int))); connect(ui.cbPaChannels, SIGNAL(currentIndexChanged(int)), this, SLOT(channelsChanged(int))); connect(ui.sbPaLattency, SIGNAL(valueChanged(int)), this, SLOT(soundChanged(int))); connect(ui.cbPaVacDriver, SIGNAL(currentIndexChanged(int)), this, SLOT(soundVacDrvChanged(int))); connect(ui.cbPaVacIn, SIGNAL(currentIndexChanged(int)), this, SLOT(soundVacChanged(int))); connect(ui.cbPaVacOut, SIGNAL(currentIndexChanged(int)), this, SLOT(soundVacChanged(int))); connect(ui.cbPaVacBufferSize, SIGNAL(currentIndexChanged(int)), this, SLOT(soundVacChanged(int))); connect(ui.cbPaVacSampleRate, SIGNAL(currentIndexChanged(int)), this, SLOT(soundVacChanged(int))); connect(ui.sbPaVacLattency, SIGNAL(valueChanged(int)), this, SLOT(soundVacChanged(int))); connect(ui.chbVacEnable, SIGNAL(stateChanged(int)), this, SLOT(soundChanged(int))); connect(ui.cbSdrType, SIGNAL(currentIndexChanged(int)), this, SLOT(OnSdrType(int))); connect(ui.cbSdrType, SIGNAL(currentIndexChanged(int)), this, SLOT(onSdrTypeChanged(int))); onEnableXvtrx(false); connect(ui.chbXvtrxEnable, SIGNAL(clicked(bool)), this, SLOT(onEnableXvtrx(bool))); connect(ui.pbWavePath, SIGNAL(clicked()), this, SLOT(openWaveDir())); connect(ui.pbLog, SIGNAL(clicked()), this, SLOT(viewLocationLogFile())); }
void MainWindow::on_pbLAdmin_clicked() { LaunchProgs("Админ льгота",NULL,NULL,NULL); }
void MainWindow::on_pbPrPokoy_clicked() { LaunchProgs("Приемный покой",NULL,NULL,NULL); }
void MainWindow::on_pbLgota_clicked() { LaunchProgs("Льгота",NULL,NULL,NULL); }
void MainWindow::on_pbTalon_clicked() { LaunchProgs("Талон",NULL,NULL,NULL); }
void MainWindow::on_pbAdmin_clicked() { LaunchProgs("Администратор",NULL,NULL,NULL); }
void MainWindow::on_pbStMed_clicked() { LaunchProgs("Старшая медсестра",NULL,NULL,NULL); }
void MainWindow::on_pbEcon_clicked() { LaunchProgs("Экономист",NULL,NULL,NULL); }