4938 lines
193 KiB
C++
4938 lines
193 KiB
C++
/* MSHV Main Ms UI
|
||
* Copyright 2015 Hrisimir Hristov, LZ2HV
|
||
* (Edited by Harper Innes, VK1TTY - to remove Gendered Language and Replace with Non-Gendered language) NOTE:May be used under the terms of the GNU General Public License (GPL)
|
||
*/
|
||
|
||
#undef _MOUNTH_H_
|
||
#define _SHKY_H_
|
||
#define _BANDS_H_
|
||
#include "main_ms.h"
|
||
|
||
#include <QScreen>
|
||
#include <QWindow>
|
||
#include <QDesktopWidget>
|
||
#include <QDesktopServices>
|
||
#include <QMimeData> // For QT5
|
||
|
||
#define _CONT_NAME_
|
||
#include "config_str_con.h"
|
||
|
||
//#include <QtGui>
|
||
|
||
//// Translation ////
|
||
#include <QTranslator>
|
||
QTranslator _translator_;
|
||
static int lid = 0;
|
||
static int styid = 0;
|
||
void _ReadSSAndSet_()
|
||
{
|
||
QString app_p = (QCoreApplication::applicationDirPath());
|
||
QFile file(app_p+"/settings/ms_start");
|
||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) return;
|
||
QString langid = "0";
|
||
QString styleid = "0";
|
||
QTextStream in(&file);
|
||
while (!in.atEnd())
|
||
{
|
||
QString line = in.readLine();
|
||
QRegExp rx;
|
||
rx.setPattern("def_lang=\"?([^\"]*)\"?");
|
||
if (rx.indexIn(line) != -1) langid = rx.cap(1);
|
||
rx.setPattern("def_style=\"?([^\"]*)\"?");
|
||
if (rx.indexIn(line) != -1) styleid = rx.cap(1);
|
||
}
|
||
file.close();
|
||
lid = langid.toInt();
|
||
styid = styleid.toInt();
|
||
|
||
if (lid>0 && lid<COUNT_LANGS)
|
||
{
|
||
/*QString istr = "";
|
||
if (lid == 1 ) istr = ":HvTranslations/mshv_bg.qm";
|
||
else if (lid == 2 ) istr = ":HvTranslations/mshv_ru.qm";
|
||
else if (lid == 3 ) istr = ":HvTranslations/mshv_zh.qm";
|
||
else if (lid == 4 ) istr = ":HvTranslations/mshv_zhhk.qm";
|
||
else if (lid == 5 ) istr = ":HvTranslations/mshv_eses.qm";
|
||
else if (lid == 6 ) istr = ":HvTranslations/mshv_caes.qm";
|
||
else if (lid == 7 ) istr = ":HvTranslations/mshv_ptpt.qm";
|
||
else if (lid == 8 ) istr = ":HvTranslations/mshv_roro.qm";
|
||
else if (lid == 9 ) istr = ":HvTranslations/mshv_dadk.qm";
|
||
else if (lid == 10) istr = ":HvTranslations/mshv_plpl.qm";
|
||
else if (lid == 11) istr = ":HvTranslations/mshv_frfr.qm";
|
||
else if (lid == 12) istr = ":HvTranslations/mshv_ptbr.qm";
|
||
else if (lid == 13) istr = ":HvTranslations/mshv_nbno.qm";
|
||
else if (lid == 14) istr = ":HvTranslations/mshv_itit.qm";
|
||
if (_translator_.load(istr))
|
||
{
|
||
QApplication::installTranslator(&_translator_);
|
||
}
|
||
else lid = 0;*/
|
||
|
||
QString istr = ""; //2.67 -0.5 KB
|
||
const QString str_qm[COUNT_LANGS-1] =
|
||
{
|
||
"bg.qm","ru.qm","zh.qm","zhhk.qm","eses.qm","caes.qm",
|
||
"ptpt.qm","roro.qm","dadk.qm","plpl.qm","frfr.qm",
|
||
"ptbr.qm","nbno.qm","itit.qm"
|
||
};
|
||
for (int i = 0; i < COUNT_LANGS-1; ++i)
|
||
{
|
||
if (lid == i+1)
|
||
{
|
||
istr = ":HvTranslations/mshv_"+str_qm[i];
|
||
break;
|
||
}
|
||
}
|
||
if (_translator_.load(istr))
|
||
{
|
||
QApplication::installTranslator(&_translator_);
|
||
}
|
||
else lid = 0;
|
||
|
||
/*QString istr = "";
|
||
QString App_Path = (QCoreApplication::applicationDirPath());
|
||
if (lid == 1 ) istr = "mshv_bg.qm";
|
||
else if (lid == 2 ) istr = "mshv_ru.qm";
|
||
else if (lid == 3 ) istr = "mshv_zh.qm";
|
||
else if (lid == 4 ) istr = "mshv_zhhk.qm";
|
||
else if (lid == 5 ) istr = "mshv_eses.qm";
|
||
else if (lid == 6 ) istr = "mshv_caes.qm";
|
||
else if (lid == 7 ) istr = "mshv_ptpt.qm";
|
||
else if (lid == 8 ) istr = "mshv_roro.qm";
|
||
else if (lid == 9 ) istr = "mshv_dadk.qm";
|
||
else if (lid == 10) istr = "mshv_plpl.qm";
|
||
else if (lid == 11) istr = "mshv_frfr.qm";
|
||
else if (lid == 12) istr = "mshv_ptbr.qm";
|
||
else if (lid == 13) istr = "mshv_nbno.qm";
|
||
else if (lid == 14) istr = "mshv_itit.qm";
|
||
if (_translator_.load(istr,App_Path+"/settings/resources/translations"))
|
||
{
|
||
QApplication::installTranslator(&_translator_);
|
||
}
|
||
else lid = 0;*/
|
||
}
|
||
}
|
||
//// end Translation ////
|
||
Main_Ms::Main_Ms( QWidget * parent)
|
||
: QWidget(parent)
|
||
{
|
||
//printf("--");
|
||
s_id_set_to_rig = 0;//0<-from App 1<-from Rig
|
||
f_is_d1_data_todec65 = false;
|
||
f_is_d2_data_todec65 = false;
|
||
is_active_astro_w = false;
|
||
g_block_from_close_app_is_active_astro_w = false;
|
||
f_disp_v_h = false;
|
||
last_f_disp_v_h = f_disp_v_h;
|
||
f_onse50 = false;
|
||
s_f_dec50 = false;
|
||
fi_se_changed = -1;
|
||
s_contest_name = "None";
|
||
s_trmN = "Run 1";
|
||
_stcq_ = "";
|
||
|
||
for (int i = 0; i < COUNT_MODE; ++i) auto_decode_all[i] = true;
|
||
auto_decode_all[0] = false; //MSK144 and MSK40
|
||
auto_decode_all[12] = false; //MSK144ms
|
||
|
||
//s_sh_opt = false;
|
||
block_save = true;
|
||
global_start_moni = false;
|
||
f_auto_on = false;
|
||
f_once0s = true;
|
||
f_once_pt_15_to_30 = 0;// 0<-no 1<-30s 2<-15s
|
||
f_rx_only_fi_se = false;
|
||
f_fast_rfresh_only_fi_se = false;
|
||
|
||
//+ 100ms za da spre signala kam PA sigurno
|
||
stop_tx_befor_end = (370);//(370 + 100); 4096*1000/11025 stop tx 370ms bifor rx period tx buffer is 4096=370ms
|
||
f_tx_to_rx = false;
|
||
count_tx_to_rx = 0;
|
||
f_rx_glob_ = false;
|
||
|
||
setWindowTitle(APP_NAME);
|
||
App_Path = (QCoreApplication::applicationDirPath());
|
||
|
||
dsty = false;
|
||
if (styid==1) dsty = true;
|
||
|
||
HvStylePlastique *THvStylePlastique = new HvStylePlastique(dsty);
|
||
QApplication::setStyle(THvStylePlastique);
|
||
//QApplication::setStyle("windowsvista");
|
||
QPixmap icon = QPixmap(":pic/ms_ico.png");
|
||
setWindowIcon(icon);
|
||
|
||
//setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowTitleHint);
|
||
//setStyleSheet("QWidget:titl{background-color: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffa02f, stop: 1 #ca0619);}");
|
||
//setWindowFlags(Qt::FramelessWindowHint | windowFlags());
|
||
|
||
//// Translation ////
|
||
QMenu *lang_m = new QMenu("Language");
|
||
QActionGroup *ac_gr_lang = new QActionGroup(this);
|
||
const QString str_ln[COUNT_LANGS]=
|
||
{
|
||
"English","Български","Русский","中文简体","中文繁體","Español","Català","Português","Română",
|
||
"Dansk","Polski","Français","Português BR","Norsk","Italiano"
|
||
};
|
||
const QString str_lmt[COUNT_LANGS]=
|
||
{
|
||
"Language","Език","Язык","语言","語言","Idioma","Idioma","Idioma","Limba",
|
||
"Sprog","Język","Langue","Idioma","Språk","Lingua"
|
||
};
|
||
for (int i = 0; i < COUNT_LANGS; ++i)
|
||
{
|
||
QAction *ac_tt = new QAction(str_ln[i],this);
|
||
ac_tt->setCheckable(true);
|
||
ac_gr_lang->addAction(ac_tt);
|
||
ac_l[i]=ac_tt;
|
||
}
|
||
//ac_l[14]->setEnabled(false); //itit
|
||
|
||
/*lang_m->addAction(ac_l[ 0]); //en
|
||
lang_m->addAction(ac_l[ 1]); //bg
|
||
lang_m->addAction(ac_l[ 2]); //ru
|
||
lang_m->addAction(ac_l[ 3]); //zh Simplified Chinese
|
||
lang_m->addAction(ac_l[ 4]); //zhhk Traditional Chinese
|
||
lang_m->addAction(ac_l[ 5]); //eses
|
||
lang_m->addAction(ac_l[ 6]); //caes
|
||
lang_m->addAction(ac_l[ 7]); //ptpt
|
||
lang_m->addAction(ac_l[12]); //ptbr
|
||
lang_m->addAction(ac_l[ 8]); //roro
|
||
lang_m->addAction(ac_l[ 9]); //dadk
|
||
lang_m->addAction(ac_l[10]); //plpl
|
||
lang_m->addAction(ac_l[11]); //frfr
|
||
lang_m->addAction(ac_l[13]); //nbno
|
||
lang_m->addAction(ac_l[14]); //itit*/
|
||
for (int i = 0; i < COUNT_LANGS; ++i)
|
||
{
|
||
int pos = i;
|
||
if (i>12) pos = i;
|
||
else if (i> 8) pos = i-1;
|
||
else if (i==8) pos = 12;
|
||
lang_m->addAction(ac_l[pos]); //qDebug()<<i<<pos;
|
||
}
|
||
|
||
ac_l[0]->setChecked(true);
|
||
for (int i = 1; i < COUNT_LANGS; ++i)
|
||
{
|
||
if (lid == i)
|
||
{
|
||
ac_l[i]->setChecked(true);
|
||
lang_m->setTitle(str_lmt[i]);
|
||
break;
|
||
}
|
||
}
|
||
for (int i = 0; i < COUNT_LANGS; ++i) connect(ac_l[i],SIGNAL(toggled(bool)),this,SLOT(LangChanged(bool)));
|
||
|
||
//ru ru4ng@mail.ru Igor Yuferev RU4NG
|
||
//zh 871684856@qq.com SZE-TO Wing VR2UPU Simplified Chinese
|
||
//zhhk 871684856@qq.com SZE-TO Wing VR2UPU Traditional Chinese
|
||
//eses necktoni@hotmail.com Toni Olmo EA3KE
|
||
//caes necktoni@hotmail.com Toni Olmo EA3KE
|
||
//ptpt cu3ak@sapo.pt Jaime Eloy CU3AK
|
||
//roro fenyo3jw@yahoo.com Pit Stefan Fenyo YO3JW
|
||
//dadk 5p1kzx@gmail.com Michael 5P1KZX
|
||
//plpl sp5qwb@gmail.com Bartek SP5QWB
|
||
//frfr on6dp@on6dp.be Paul ON6DP /or/ f1rvc.patrice@gmail.com Patrice F1RVC
|
||
//ptbr crezivando@gmail.com Crezivando Junior PP7CJ
|
||
//nbno kai.gunter.brandt@gmail.com Kai Günter Brandt LA3QMA
|
||
//itit iw4ard@aririmini.it Gianni Matteini IW4ARD Italian
|
||
|
||
/*ru4ng@mail.ru,871684856@qq.com,necktoni@hotmail.com,cu3ak@sapo.pt,fenyo3jw@yahoo.com,
|
||
5p1kzx@gmail.com,sp5qwb@gmail.com,on6dp@on6dp.be,crezivando@gmail.com,
|
||
kai.gunter.brandt@gmail.com,iw4ard@aririmini.it*/
|
||
|
||
//// end Translation ////
|
||
|
||
TMsCore = new MsCore();
|
||
if (!TMsCore->is_select_sound_device)// v1.46
|
||
QMessageBox::critical(nullptr, "MSHV",
|
||
("Sound Card Error\nPrimary Sound Driver Problem\nApplication Might Stop Working Properly"),
|
||
QMessageBox::Close);
|
||
|
||
THvRigControl = new HvRigControl(this);
|
||
|
||
TSettingsMs = new SettingsMs(this);
|
||
connect(TSettingsMs, SIGNAL(InDevChanged(QString,int,int,int,int,int)),
|
||
this, SLOT(InDevChanged(QString,int,int,int,int,int)));
|
||
connect(TSettingsMs, SIGNAL(rejected()), this, SLOT(SaveSettings()));
|
||
connect(TSettingsMs, SIGNAL(EmitTciSelect(int)), THvRigControl, SLOT(SetTciSelect(int)));//2.59
|
||
//connect(TSettingsMs, SIGNAL(StndInLevel(int)), TMsCore, SLOT(SetInLevel(int)));
|
||
//connect(TSettingsMs, SIGNAL(SendSettingsTime(QStringList)), this, SLOT(SetTimeOffset(QStringList)));
|
||
|
||
QPixmap p0 = QPixmap(":pic/sld_track_v_si.png");
|
||
QPixmap p1 = QPixmap(":pic/sld_up_v_si.png");
|
||
QPixmap p2 = QPixmap(":pic/sld_down_v_si.png");
|
||
QPixmap p7 = QPixmap(":pic/tumb_v_si_pc.png");
|
||
QPixmap p8 = QPixmap(":pic/tumb_over_v_si_pc.png");
|
||
Slider_Tune_Disp = new HvSlider_V_Identif(0,100,0,0,p1,p0,p2,p7,p8);
|
||
Slider_Tune_Disp->SetValue(50);
|
||
Slider_Cont_Disp = new HvSlider_V_Identif(0,24,0,0,p1,p0,p2,p7,p8);
|
||
Slider_Cont_Disp->SetValue(12);
|
||
|
||
//QFont tx_font = font();
|
||
//tx_font.setPointSize(10);
|
||
//tx_font.setBold(true);
|
||
l_tx_text = new QLabel("Txing:");
|
||
l_tx_text->setFixedHeight(20);
|
||
//l_tx_text->setFont(tx_font);
|
||
l_tx_text->setFrameStyle(QFrame::Panel | QFrame::Sunken);
|
||
l_tx_text->setMinimumWidth(202);//215 1.30 from 215 240 zaradi nai dalgia texta na iskat
|
||
|
||
MainDisplay = new DisplayMs(0,dsty);
|
||
connect(TMsCore, SIGNAL(Set_Raw(short*,int,bool)), MainDisplay, SLOT(SetRaw(short*,int,bool))); //1.27 psk rep fopen bool true false no file open
|
||
connect(TMsCore, SIGNAL(Set_Graph(double*,int)), MainDisplay, SLOT(SetValue(double*,int)));
|
||
|
||
connect(MainDisplay, SIGNAL(EmitFileNameChenged()), this, SLOT(FileNameChengedD1()));
|
||
connect(MainDisplay, SIGNAL(EmitResetToBegin()), TMsCore, SLOT(FastResetSoundCardIn()));
|
||
|
||
SecondDisplay = new DisplayMs(1,dsty);
|
||
|
||
connect(MainDisplay, SIGNAL(SentData(QList<int*>,QPoint*,int,short*,QString,QString,bool,QLine*,int*,QString*,int*,int,int*,int,bool,QLine*,int,int,bool)),
|
||
SecondDisplay, SLOT(ReciveData(QList<int*>,QPoint*,int,short*,QString,QString,bool,QLine*,int*,QString*,int*,int,int*,int,bool,QLine*,int,int,bool)));
|
||
|
||
connect(Slider_Tune_Disp, SIGNAL(SendValue(int,int)), this, SLOT(setTuneDsp(int,int)));//1.55=
|
||
connect(Slider_Cont_Disp, SIGNAL(SendValue(int,int)), this, SLOT(setTuneDsp(int,int)));//1.55=
|
||
|
||
connect(SecondDisplay, SIGNAL(EmitFileNameChenged()), this, SLOT(FileNameChengedD2()));
|
||
connect(SecondDisplay, SIGNAL(EmitRriorityDisp(bool)), MainDisplay, SLOT(SetRriorityDisp(bool)));
|
||
|
||
TDecodeList1 = new DecodeList(1,dsty);
|
||
TDecodeList2 = new DecodeList(2,dsty);
|
||
FilterDialog = new HvFilterDialog(dsty,this);//(0) and open() no modal
|
||
connect(FilterDialog, SIGNAL(EmitSetFilter(QStringList,bool*,QStringList,QStringList,QStringList,QStringList,QStringList,QStringList)),
|
||
TDecodeList1, SLOT(SetFilter(QStringList,bool*,QStringList,QStringList,QStringList,QStringList,QStringList,QStringList)));
|
||
FilterDialog->SetCountries(TDecodeList1->GetCountries());
|
||
|
||
FontDialog = new HvFontDialog(App_Path,this);
|
||
connect(FontDialog, SIGNAL(EmitFontList(QFont)), TDecodeList1, SLOT(SetFontList(QFont)));
|
||
connect(FontDialog, SIGNAL(EmitFontList(QFont)), TDecodeList2, SLOT(SetFontList(QFont)));
|
||
|
||
TDecoderMs = new DecoderMs();
|
||
connect(MainDisplay, SIGNAL(EmitDataToDecode(short*,int,QString,int,int,bool,bool,bool)), TDecoderMs, SLOT(SetDecode(short*,int,QString,int,int,bool,bool,bool)));//1.27 psk rep fopen bool true false no file open
|
||
connect(SecondDisplay, SIGNAL(EmitDataToDecode(short*,int,QString,int,int,bool,bool,bool)), TDecoderMs, SLOT(SetDecode(short*,int,QString,int,int,bool,bool,bool)));//1.27 psk rep fopen bool true false no file open
|
||
|
||
connect(TDecoderMs, SIGNAL(EmitBackColor(bool)), TDecodeList1, SLOT(SetBackColor(bool)));
|
||
connect(TDecoderMs, SIGNAL(EmitDecodetText(QStringList,bool,bool)), TDecodeList1, SLOT(InsertItem_hv(QStringList,bool,bool))); //1.27 psk rep fopen bool true false no file open
|
||
connect(TDecodeList1, SIGNAL(EmitLstNexColor(bool)), TDecoderMs, SLOT(SetNexColor(bool)));
|
||
connect(TDecoderMs, SIGNAL(EmitTimeElapsed(float)), TDecodeList1, SLOT(SetTimeElapsed(float)));//2.33
|
||
|
||
connect(TDecoderMs, SIGNAL(EmitDecodetTextRxFreq(QStringList,bool,bool)), TDecodeList2, SLOT(InsertItem_hv(QStringList,bool,bool)));
|
||
TDecodeList2->SetBackColor(true);
|
||
|
||
connect(MainDisplay, SIGNAL(EmitZapData(short*,int)), TDecoderMs, SLOT(SetZapData(short*,int)));
|
||
connect(SecondDisplay, SIGNAL(EmitZapData(short*,int)), TDecoderMs, SLOT(SetZapData(short*,int)));
|
||
connect(TDecoderMs, SIGNAL(EmitDecLinesPosToDisplay(int,double,double,QString)), MainDisplay, SLOT(SetDecLinesPosToDisplay(int,double,double,QString)));//1.28 QString p_time for identif perood
|
||
connect(MainDisplay, SIGNAL(EmitDecLinesPosToSecondDisp(int,double,double,QString)), SecondDisplay, SLOT(SetDecLinesPosToDisplay(int,double,double,QString))); //1.28 p_time is not from this period sent to second display
|
||
connect(MainDisplay, SIGNAL(EmitVDMouseDecodeSecondDisp(int)), SecondDisplay, SLOT(SetVDMouseDecodeSecondDisp(int)));
|
||
|
||
TMsPlayerHV = new MsPlayerHV(App_Path);
|
||
connect(TMsPlayerHV, SIGNAL(SentFileClarDisplay()), this, SLOT(SetFileToDisplay()));
|
||
connect(TMsPlayerHV, SIGNAL(SentData(short*, int, bool)), TMsCore, SLOT(ReciveData(short*, int, bool))); //1.27 psk rep fopen bool true
|
||
connect(TSettingsMs, SIGNAL(OutDevChanged(QString,int)), TMsPlayerHV, SLOT(SetSoundDevice(QString,int)));
|
||
connect(MainDisplay, SIGNAL(EmitDataToSaveInFile(short*,int,QString)), TMsPlayerHV, SLOT(SaveFile(short*,int,QString)));
|
||
connect(SecondDisplay, SIGNAL(EmitDataToSaveInFile(short*,int,QString)), TMsPlayerHV, SLOT(SaveFile(short*,int,QString)));
|
||
connect(TMsPlayerHV, SIGNAL(SendTxMsgLabTx(QString)), this, SLOT(SetTxMsgLabTx(QString)));
|
||
connect(TMsPlayerHV, SIGNAL(SendTxMsgAllTxt(QString,double)), this, SLOT(SetTxMsgAllTxt(QString,double)));
|
||
|
||
TPicW = new LabW(dsty);
|
||
connect(TDecoderMs, SIGNAL(EmitDecode(bool,int)), this, SLOT(SetDecodeBusy(bool,int)));
|
||
connect(TDecoderMs, SIGNAL(EmitDecode(bool,int)), MainDisplay, SLOT(SetDecBusy(bool,int)));
|
||
connect(TDecoderMs, SIGNAL(EmitDecode(bool,int)), SecondDisplay, SLOT(SetDecBusy(bool,int)));
|
||
|
||
TPicW->SetRxMon(false);
|
||
TPicW->SetDecode(false);
|
||
|
||
THvSMeter_H = new HvSMeter_H(0,0, QPixmap(":pic/on.png"),QPixmap(":pic/clip.png"),QPixmap(":pic/back.png"),this);
|
||
connect(TMsCore, SIGNAL(Sed_SMeter(int)), THvSMeter_H, SLOT(setValue(int)));
|
||
|
||
//2.63
|
||
desktopw = QApplication::desktop();
|
||
screenWidth = desktopw->screenGeometry(this).width(); // Primary Screen width
|
||
screenHeight = desktopw->screenGeometry(this).height(); // Primary Screen height
|
||
//DesktopPriSize = QSize(screenWidth,screenHeight); // Primary Screen size
|
||
//DesktopAllSize = QSize(desktop->width(),desktop->height()); // Primary + Secondary Screen
|
||
QSize windowSize = size();
|
||
int width = windowSize.width();
|
||
int height = windowSize.height();
|
||
int x = (screenWidth - width ) / 2;
|
||
int y = (screenHeight - height) / 2;
|
||
//y -= 50;//linux
|
||
y -= 34; //34
|
||
x -= 4; //4
|
||
if (screenWidth<=800) x -= 25; //25 // testvano
|
||
// end 2.63
|
||
//qDebug()<<"MinDisply="<<screenWidth<<screenHeight<<"Full="<<desktop->width()<<desktop->height();
|
||
|
||
THvTxW = new HvTxW(App_Path,lid,dsty,x,y);
|
||
|
||
QMenuBar *Min_Menu = new QMenuBar();
|
||
|
||
#if defined _WIN32_
|
||
Start_Cmd = new QProcess;
|
||
#endif
|
||
|
||
QAction *Test_tones_m = new QAction(QPixmap(":pic/sine.png"),tr("Generate Messages For Test Tones"),this);
|
||
|
||
#if defined _WIN32_
|
||
QAction *SyncTime_m = new QAction(QPixmap(":pic/sync_st.png"),tr("Time Synchronization"),this);
|
||
connect(SyncTime_m, SIGNAL(triggered()), this, SLOT(SyncTime()));
|
||
#endif
|
||
|
||
QAction *OCheckTime_m = new QAction(QPixmap(":pic/sync_ot.png"),tr("Online Time Check"),this);
|
||
connect(OCheckTime_m, SIGNAL(triggered()), this, SLOT(OnlineTimeCheck()));
|
||
|
||
QAction *Font_m = new QAction(QPixmap(":pic/fonts.png"),tr("Font Settings"),this);
|
||
connect(Font_m, SIGNAL(triggered()), FontDialog, SLOT(exec()));
|
||
|
||
THvTxtColor = new HvTxtColor(dsty,this);
|
||
QAction *Txt_colors_m = new QAction(QPixmap(":pic/txt_color.png"),tr("Text Highlight"),this);
|
||
connect(Txt_colors_m, SIGNAL(triggered()), THvTxtColor, SLOT(exec()));
|
||
|
||
QMenu *Option_m = new QMenu(tr("Options"));
|
||
Option_m->addAction(QPixmap(":pic/settings.png"),ShKey[lid][4][1], TSettingsMs, SLOT(exec()),QKeySequence(tr(ShKey[lid][4][0],ShKey[lid][4][1])));
|
||
Option_m->addAction(QPixmap(":pic/com_p.png"),ShKey[lid][5][1], THvRigControl, SLOT(exec()),QKeySequence(tr(ShKey[lid][5][0],ShKey[lid][5][1])));
|
||
Option_m->addAction(QPixmap(":pic/macro.png"),ShKey[lid][6][1], THvTxW, SLOT(Macros_exec()),QKeySequence(tr(ShKey[lid][6][0],ShKey[lid][6][1])));
|
||
|
||
#if defined _WIN32_
|
||
Option_m->addAction(QPixmap(":pic/mixer_play.png"),ShKey[lid][7][1], this, SLOT(WMixPlay()),QKeySequence(tr(ShKey[lid][7][0],ShKey[lid][7][1])));
|
||
Option_m->addAction(QPixmap(":pic/mixer_rec.png"),ShKey[lid][8][1], this, SLOT(WMixRec()),QKeySequence(tr(ShKey[lid][8][0],ShKey[lid][8][1])));
|
||
#endif
|
||
#if defined _LINUX_
|
||
THvMixerMain = new HvMixerMain();
|
||
Option_m->addAction(QPixmap(":pic/mixer_play.png"),ShKey[lid][7][1], THvMixerMain, SLOT(Start()),QKeySequence(tr(ShKey[lid][7][0],ShKey[lid][7][1])));
|
||
Option_m->addAction(QPixmap(":pic/mixer_rec.png"),ShKey[lid][8][1], THvMixerMain, SLOT(Start()),QKeySequence(tr(ShKey[lid][8][0],ShKey[lid][8][1])));
|
||
#endif
|
||
|
||
QAction *NetW = new QAction(QPixmap(":pic/radionet.png"),tr("Network Configuration"),this);
|
||
QAction *RadFreqW = new QAction(QPixmap(":pic/rad_freq.png"),tr("Radio And Frequencies Configuration"),this);
|
||
Option_m->addAction(NetW);
|
||
Option_m->addAction(RadFreqW);
|
||
Option_m->addAction(Font_m);
|
||
Option_m->addAction(Txt_colors_m);
|
||
Option_m->addAction(Test_tones_m);
|
||
|
||
#if defined _WIN32_
|
||
Option_m->addAction(SyncTime_m);
|
||
#endif
|
||
|
||
//Option_m->addSeparator();
|
||
QMenu *Dlf_m = new QMenu(tr("Decode Lists Options"));
|
||
Dlf_m->setIcon(QPixmap(":pic/smenu.png"));
|
||
Option_m->addMenu(Dlf_m);
|
||
/*two_dec_list_all[0] = false; //MSK144 and MSK40
|
||
two_dec_list_all[1] = false; //no JTMS
|
||
two_dec_list_all[2] = false; //no FSK441
|
||
two_dec_list_all[3] = false; //no FSK314
|
||
two_dec_list_all[4] = false; //no ISCAT-A
|
||
two_dec_list_all[5] = false; //no ISCAT-B
|
||
two_dec_list_all[6] = false; //no JT6M
|
||
two_dec_list_all[7] = false; //no jt56a
|
||
two_dec_list_all[8] = false; //no jt56b
|
||
two_dec_list_all[9] = false; //no jt56c
|
||
two_dec_list_all[10] = false; //no pi4
|
||
two_dec_list_all[11] = true; //ft8 2.51 true
|
||
two_dec_list_all[12] = false; //MSK144ms
|
||
two_dec_list_all[13] = true; //ft4 2.51 true
|
||
two_dec_list_all[14] = true; //q65a
|
||
two_dec_list_all[15] = true; //q65b
|
||
two_dec_list_all[16] = true; //q65c
|
||
two_dec_list_all[17] = true; //q65d*/
|
||
for (int i = 0; i < COUNT_MODE; ++i) two_dec_list_all[i] = false;
|
||
two_dec_list_all[11] = true; //ft8
|
||
two_dec_list_all[13] = true; //ft4
|
||
two_dec_list_all[14] = true; //q65a
|
||
two_dec_list_all[15] = true; //q65b
|
||
two_dec_list_all[16] = true; //q65c
|
||
two_dec_list_all[17] = true; //q65d
|
||
|
||
|
||
ac_two_dec_list = new QAction(tr("Use Two Decode Lists")+" MSK FT JT65 Q65",this);// Q65 2.55
|
||
ac_two_dec_list->setCheckable(true);
|
||
Dlf_m->addAction(ac_two_dec_list);
|
||
connect(ac_two_dec_list, SIGNAL(toggled(bool)), this, SLOT(SetTwoDecList(bool)));
|
||
|
||
ac_2click_list_autu_on = new QAction(tr("Double Click On Call Sets Auto Is On")+" MSK FT JT65 Q65",this);// Q65 2.55
|
||
ac_2click_list_autu_on->setCheckable(true);
|
||
Dlf_m->addAction(ac_2click_list_autu_on);
|
||
|
||
ac_new_dec_clr_msg_list = new QAction(tr("New decode period to clear Message List")+" FT",this);
|
||
ac_new_dec_clr_msg_list->setCheckable(true);
|
||
Dlf_m->addAction(ac_new_dec_clr_msg_list);
|
||
|
||
ac_click_on_call_show_cty = new QAction(tr("Single Click On Call Shows Country Info")+" MSK FT Q65",this);// Q65 2.55
|
||
ac_click_on_call_show_cty->setCheckable(true);
|
||
Dlf_m->addAction(ac_click_on_call_show_cty);
|
||
|
||
ac_filter_list = new QAction(QPixmap(":pic/filters.png"),tr("Decode List Filters")+" FT",this);
|
||
Dlf_m->addAction(ac_filter_list);
|
||
connect(ac_filter_list, SIGNAL(triggered()), FilterDialog, SLOT(exec()));
|
||
connect(TDecodeList1, SIGNAL(EmitHeaderDoubleClicked()), FilterDialog, SLOT(exec()));
|
||
|
||
connect(ac_click_on_call_show_cty, SIGNAL(toggled(bool)), TDecodeList1, SLOT(SetStaticClickOnCallShowCty(bool)));//2.66
|
||
//connect(ac_click_on_call_show_cty, SIGNAL(toggled(bool)), TDecodeList2, SLOT(SetClickOnCallShowCty(bool)));
|
||
ac_click_on_call_show_cty->setChecked(true);//2.15
|
||
|
||
//Option_m->addSeparator();
|
||
QMenu *Logf_m = new QMenu(tr("Log Options"));
|
||
Logf_m->setIcon(QPixmap(":pic/smenu.png"));
|
||
Option_m->addMenu(Logf_m);
|
||
Direct_log_qso = new QAction(tr("Log Automatically QSO")+" MSK FT Q65",this);// Q65 2.55
|
||
Direct_log_qso->setCheckable(true);
|
||
//Option_m->addAction(Direct_log_qso);
|
||
Logf_m->addAction(Direct_log_qso);
|
||
Prompt_log_qso = new QAction(tr("Prompt Me To Log QSO")+" MSK FT Q65",this);// Q65 2.55
|
||
Prompt_log_qso->setCheckable(true);
|
||
//Option_m->addAction(Prompt_log_qso);
|
||
Logf_m->addAction(Prompt_log_qso);
|
||
|
||
Info_dupe_qso = new QAction(tr("Warn Me If QSO Before"),this);
|
||
Info_dupe_qso->setCheckable(true);
|
||
Logf_m->addAction(Info_dupe_qso);
|
||
|
||
Log_qso_startdt_eq_enddt = new QAction(tr("Log QSO Start Date,Time = End Date,Time"),this);
|
||
Log_qso_startdt_eq_enddt->setCheckable(true);
|
||
//Option_m->addAction(Log_qso_startdt_eq_enddt);
|
||
Logf_m->addAction(Log_qso_startdt_eq_enddt);
|
||
|
||
Log_auto_comm = new QAction(tr("Turn Auto Comments Off"),this);
|
||
Log_auto_comm->setCheckable(true);
|
||
Logf_m->addAction(Log_auto_comm);
|
||
|
||
QMenu *Other_m = new QMenu(tr("Other Options"));
|
||
Other_m->setIcon(QPixmap(":pic/smenu.png"));
|
||
Option_m->addMenu(Other_m);
|
||
ac_start_qso_from_tx2_or_tx1 = new QAction(tr("Skip Tx1")+" MSK FT Q65 ("+tr("Uncheck for DXpedition")+")",this);//+" FT)"
|
||
//ac_start_qso_from_tx2_or_tx1 = new QAction(tr("Skip Tx1")+" MSK FT Q65 ("+tr("Uncheck for DXpedition and No STD Call")+" FT)",this);//2.61
|
||
ac_start_qso_from_tx2_or_tx1->setCheckable(true); // Skip TX1 <- g4hgi Uncheck for DX Expedition
|
||
Other_m->addAction(ac_start_qso_from_tx2_or_tx1);//2.49
|
||
|
||
ac_use_queue_cont = new QAction(tr("Use Queue (For Contest Activitiеs Only)")+" MSK FT Q65",this);//Use Queue Call (For Contest Only) Use Queue Call (For Contest Activitiеs Only)
|
||
ac_use_queue_cont->setCheckable(true);
|
||
Other_m->addAction(ac_use_queue_cont);//2.59
|
||
|
||
Other_m->addSeparator();
|
||
|
||
recognize_tp1 = new QAction(tr("Recognize Period")+" JTMS FSK ISCAT JT6M",this);
|
||
recognize_tp1->setCheckable(true);
|
||
recognize_tp1->setChecked(true);
|
||
Other_m->addAction(recognize_tp1);
|
||
recognize_tp2 = new QAction(tr("Recognize Period")+" MSK FT JT65 Q65",this);// Q65 2.55
|
||
recognize_tp2->setCheckable(true);
|
||
recognize_tp2->setChecked(true);
|
||
Other_m->addAction(recognize_tp2);
|
||
|
||
Other_m->addSeparator();
|
||
|
||
zero_df_scale_m = new QAction(tr("View JT65 DF Axis On Display"),this);
|
||
zero_df_scale_m->setCheckable(true);
|
||
Other_m->addAction(zero_df_scale_m);
|
||
zero_df_scale_m->setChecked(false);
|
||
connect(zero_df_scale_m, SIGNAL(toggled(bool)), MainDisplay, SLOT(SetZeroDfVScale(bool)));
|
||
zero_df_scale_m->setEnabled(false);
|
||
vd_mouse_lines_draw = new QAction(tr("Turn Off JT65 Display Markers"),this);
|
||
vd_mouse_lines_draw->setCheckable(true);
|
||
Other_m->addAction(vd_mouse_lines_draw);
|
||
connect(vd_mouse_lines_draw, SIGNAL(toggled(bool)), MainDisplay, SLOT(SetVDMouseDrawLines(bool)));
|
||
connect(vd_mouse_lines_draw, SIGNAL(toggled(bool)), SecondDisplay, SLOT(SetVDMouseDrawLines(bool)));
|
||
|
||
Other_m->addSeparator();
|
||
|
||
Multi_answer_mod = new QAction(QString(ShKey[lid][26][1]+"\t"+ShKey[lid][26][0]),this);
|
||
Other_m->addAction(Multi_answer_mod);
|
||
Multi_answer_mod->setCheckable(true);
|
||
Multi_answer_mod->setEnabled(false);
|
||
Multi_answer_mod_std = new QAction(QString(ShKey[lid][27][1]+"\t"+ShKey[lid][27][0]),this);
|
||
Other_m->addAction(Multi_answer_mod_std);
|
||
Multi_answer_mod_std->setCheckable(true);
|
||
Multi_answer_mod_std->setEnabled(false);
|
||
g_block_mam = false;
|
||
g_ub_m_k = false;
|
||
g_ub_m_k2 = false;
|
||
g_ub_m_k3 = false;
|
||
|
||
Option_m->addSeparator();
|
||
|
||
W_mod_bt_sw = new HvWModBtSw(this);
|
||
connect(W_mod_bt_sw, SIGNAL(clicked(int)), this, SLOT(ModBtSwClicked(int)));
|
||
QAction *ac_bt_mode = new QAction(tr("Mode Switcher Buttons"),this);
|
||
ac_bt_mode->setIcon(QPixmap(":pic/smenu.png"));
|
||
connect(ac_bt_mode, SIGNAL(triggered()), W_mod_bt_sw, SLOT(dexec()));
|
||
Option_m->addAction(ac_bt_mode);
|
||
|
||
QAction *sh_wf= new QAction(QString(ShKey[lid][32][1]+"\t"+ShKey[lid][32][0]),this);
|
||
sh_wf->setShortcut(QKeySequence(tr(ShKey[lid][32][0],ShKey[lid][32][1])));
|
||
sh_wf->setCheckable(true);
|
||
sh_wf->setChecked(true);
|
||
QAction *sh_tx= new QAction(QString(ShKey[lid][33][1]+"\t"+ShKey[lid][33][0]),this);
|
||
sh_tx->setShortcut(QKeySequence(tr(ShKey[lid][33][0],ShKey[lid][33][1])));
|
||
sh_tx->setCheckable(true);
|
||
sh_tx->setChecked(true);
|
||
Option_m->addAction(sh_wf);
|
||
Option_m->addAction(sh_tx);
|
||
|
||
Start_astro_m = new QAction(tr("View Astronomical Data"),this);
|
||
Start_astro_m->setCheckable(true);
|
||
Option_m->addAction(Start_astro_m);
|
||
|
||
Option_m->addSeparator();
|
||
|
||
//ac_aseq_max_dist = new QAction(tr("Use Auto Seq By Max Distance")+" MSK FT Q65",this);
|
||
ac_aseq_max_dist = new QAction(tr("ASeq: Reply to the Most Distant.")+" MSK FT Q65",this);
|
||
//ac_aseq_max_dist = new QAction(tr("ASeq: Reply to the Farthest.")+" MSK FT Q65",this);
|
||
ac_aseq_max_dist->setCheckable(true);
|
||
Option_m->addAction(ac_aseq_max_dist);
|
||
connect(ac_aseq_max_dist, SIGNAL(toggled(bool)), THvTxW, SLOT(SetUseASeqMaxDist(bool)));//2.66
|
||
|
||
ac_Cfm73 = new QAction(tr("TX Confirmation If 73 Or RR73")+" FT Q65",this);// Q65 2.55
|
||
ac_Cfm73->setCheckable(true);
|
||
Option_m->addAction(ac_Cfm73);
|
||
ac_Cfm73->setEnabled(false);
|
||
|
||
ac_ft_df1500 = new QAction(tr("Use Default DF Tolerance 1500 Hz")+" FT",this);
|
||
ac_ft_df1500->setCheckable(true);
|
||
Option_m->addAction(ac_ft_df1500);
|
||
ac_ft_df1500->setEnabled(false);
|
||
|
||
ac_areset_qso = new QAction(tr("Auto RESET QSO at end")+" MSK FT Q65",this);// Q65 2.55
|
||
ac_areset_qso->setCheckable(true);
|
||
Option_m->addAction(ac_areset_qso);
|
||
ac_areset_qso->setEnabled(false);
|
||
ac_areset_qso->setChecked(true);
|
||
|
||
Option_m->addSeparator();
|
||
|
||
Mon_start_m = new QAction(tr("Monitor ON At Startup"),this);
|
||
Mon_start_m->setCheckable(true);
|
||
//connect(Mon_start_m, SIGNAL(changed()), this, SLOT(SaveFile()));
|
||
Option_m->addAction(Mon_start_m);
|
||
|
||
//THvTxW = new HvTxW(App_Path,lid,dsty);
|
||
|
||
connect(ac_Cfm73, SIGNAL(toggled(bool)), THvTxW, SLOT(SetCfm73(bool)));
|
||
ac_Cfm73->setChecked(true);//by default for this moment
|
||
connect(ac_ft_df1500, SIGNAL(toggled(bool)), THvTxW, SLOT(SetFtDf1500(bool)));//2.41
|
||
connect(ac_ft_df1500, SIGNAL(toggled(bool)), MainDisplay, SLOT(SetFtDf1500(bool)));//2.41
|
||
connect(ac_areset_qso, SIGNAL(toggled(bool)), THvTxW, SLOT(SetAResetQsoAtEnd(bool)));//2.49
|
||
|
||
connect(Multi_answer_mod, SIGNAL(toggled(bool)), this, SLOT(SetMultiAnswerMod(bool)));
|
||
connect(Multi_answer_mod_std, SIGNAL(toggled(bool)), this, SLOT(SetMultiAnswerModStd(bool)));
|
||
|
||
connect(recognize_tp1, SIGNAL(toggled(bool)), THvTxW, SLOT(SetRecognizeTp1(bool)));
|
||
connect(recognize_tp2, SIGNAL(toggled(bool)), THvTxW, SLOT(SetRecognizeTp2(bool)));
|
||
|
||
connect(NetW, SIGNAL(triggered()), THvTxW, SLOT(NetW_exec()));
|
||
connect(RadFreqW, SIGNAL(triggered()), THvTxW, SLOT(RadioFreqW_exec()));
|
||
|
||
connect(Start_astro_m, SIGNAL(toggled(bool)), this, SLOT(ShowCloseAstroW(bool)));
|
||
connect(THvTxW, SIGNAL(EmitAstroWIsClosed()), this, SLOT(SetAstroWIsClosed()));
|
||
|
||
//connect(THvTxW, SIGNAL(EmitLocStInfo(QString,QString,QString)), TRadioAndNetW, SLOT(SetLocalStation(QString,QString,QString)));
|
||
|
||
connect(TDecodeList1, SIGNAL(EmitRxStationInfo(QStringList,int,bool)), THvTxW, SLOT(ValidateStationInfo(QStringList,int,bool)));
|
||
//1.78 only for spotting this down
|
||
connect(TDecodeList2, SIGNAL(EmitRxStationInfo(QStringList,int,bool)), THvTxW, SLOT(ValidateStationInfo(QStringList,int,bool)));
|
||
connect(THvTxW , SIGNAL(EmitGBlockListExp(bool)), TDecodeList1, SLOT(SetStaticGBlockListExp(bool)));//2.66
|
||
//connect(THvTxW , SIGNAL(EmitGBlockListExp(bool)), TDecodeList2, SLOT(SetGBlockListExp(bool)));//2.06
|
||
|
||
connect(THvTxW, SIGNAL(EmitQrgQSY(QStringList)), this, SLOT(SetQrgQSY(QStringList)));//2.46
|
||
|
||
connect(TDecodeList1, SIGNAL(EmitRxTextForAutoSeq(QStringList)), THvTxW, SLOT(SetTextForAutoSeq(QStringList)));
|
||
|
||
//connect(THvTxW, SIGNAL(EmitRemoteStation(QString,QString,int,QString,int,int)),
|
||
//TRadioAndNetW, SLOT(AddRemoteStation(QString,QString,int,QString,int,int)));
|
||
connect(TDecoderMs, SIGNAL(EmitDecodeInProgresPskRep(bool)), THvTxW, SLOT(SetDecodeInProgresPskRep(bool)));
|
||
|
||
connect(THvTxW, SIGNAL(StndInLevel(int)), TMsCore, SLOT(SetInLevel(int)));
|
||
connect(THvTxtColor, SIGNAL(EmitTextMark(bool*,QString)), THvTxW, SLOT(SetTextMark(bool*,QString)));
|
||
connect(THvTxtColor, SIGNAL(EmitTextMarkColors(QColor*,int,bool,bool)), TDecodeList1, SLOT(SetTextMarkColors(QColor*,int,bool,bool)));
|
||
connect(THvTxtColor, SIGNAL(EmitTextMarkColors(QColor*,int,bool,bool)), TDecodeList2, SLOT(SetTextMarkColors(QColor*,int,bool,bool)));
|
||
connect(THvTxtColor, SIGNAL(EmitTextMark(bool*,QString)),FilterDialog,SLOT(SetTextMark(bool*,QString)));//2.69
|
||
|
||
connect(THvTxW, SIGNAL(EmitDListMarkText(QStringList,int,int,int,int,int)), TDecodeList1, SLOT(SetDListMarkText(QStringList,int,int,int,int,int)));
|
||
connect(THvTxW, SIGNAL(EmitDListMarkText(QStringList,int,int,int,int,int)), TDecodeList2, SLOT(SetDListMarkText(QStringList,int,int,int,int,int)));
|
||
|
||
///JTMSK SHORT///
|
||
connect(THvTxW, SIGNAL(EmitListHashCalls(QStringList)), TDecoderMs, SLOT(SetCalsHash(QStringList)));
|
||
connect(THvTxW, SIGNAL(EmitMAMCalls(QStringList)), TDecoderMs, SLOT(SetMAMCalls(QStringList)));
|
||
|
||
///JTMSK SHORT///
|
||
connect(THvTxW, SIGNAL(EmitRxOnlyFiSe(bool)), this, SLOT(SetRxOnlyFiSe(bool)));
|
||
|
||
/// FT8 ////
|
||
connect(THvTxW, SIGNAL(EmitTxToRx(bool)), MainDisplay, SLOT(SetTxToRx(bool)));
|
||
connect(THvTxW, SIGNAL(EmitRxToTx(bool)), MainDisplay, SLOT(SetRxToTx(bool)));//2.63
|
||
|
||
s_v_disp_tx_frq = 1200.0;//2.16 for ft8 only
|
||
s_static_tx_frq = 1500;//2.16
|
||
f_static_tx = false;//2.16
|
||
connect(MainDisplay, SIGNAL(EmitVDTxFreq(double)), TDecoderMs, SLOT(SetTxFreq(double)));
|
||
connect(THvRigControl, SIGNAL(EmitStaticTxFrq(bool,int)), this, SLOT(SetStaticTxFrq(bool,int)));//2.16
|
||
connect(MainDisplay, SIGNAL(EmitVDTxFreq(double)), this, SLOT(SetTxFreq(double)));//2.16
|
||
connect(MainDisplay, SIGNAL(EmitVDTxFreq(double)), THvRigControl, SLOT(SetTxFreq(double)));//2.16
|
||
|
||
connect(THvTxW, SIGNAL(EmitLockTxrx(bool)), MainDisplay, SLOT(SetLockTxrx(bool)));
|
||
connect(THvTxW, SIGNAL(EmitFreqTxW(double)), MainDisplay, SLOT(SetFreqExternal(double)));
|
||
connect(TDecodeList1, SIGNAL(EmitFreqDecListClick(double)), THvTxW, SLOT(SetFreqTxW(double)));
|
||
connect(TDecodeList2, SIGNAL(EmitFreqDecListClick(double)), THvTxW, SLOT(SetFreqTxW(double)));
|
||
|
||
connect(THvTxW, SIGNAL(EmitUdpCmdDl(QStringList)), TDecodeList1, SLOT(SetUdpCmdDl(QStringList)));//2.22
|
||
connect(THvTxW, SIGNAL(EmitUdpCmdDl(QStringList)), TDecodeList2, SLOT(SetUdpCmdDl(QStringList)));//2.22
|
||
connect(THvTxW, SIGNAL(EmitUdpCmdStop(bool)), this, SLOT(SetUdpCmdStop(bool)));//2.22
|
||
connect(TDecodeList1, SIGNAL(EmitUdpDecClr()), THvTxW, SLOT(SetUdpDecClr()));//2.22
|
||
|
||
connect(TDecodeList1, SIGNAL(EmitDetectTextInMsg(QString,QString &)), THvTxW, SLOT(DlDetectTextInMsg(QString,QString &)));//for tooltip 2.27
|
||
connect(TDecodeList2, SIGNAL(EmitDetectTextInMsg(QString,QString &)), THvTxW, SLOT(DlDetectTextInMsg(QString,QString &)));//for tooltip 2.27
|
||
|
||
connect(Direct_log_qso, SIGNAL(toggled(bool)), this, SLOT(SetDLogQso(bool)));
|
||
connect(Prompt_log_qso, SIGNAL(toggled(bool)), this, SLOT(SetPLogQso(bool)));
|
||
Direct_log_qso->setChecked(true);//2.51
|
||
|
||
connect(Info_dupe_qso, SIGNAL(toggled(bool)), THvTxW, SLOT(SetInfoDupeQso(bool)));
|
||
Info_dupe_qso->setChecked(true);//2.51
|
||
|
||
connect(Log_qso_startdt_eq_enddt, SIGNAL(toggled(bool)), THvTxW, SLOT(SetLogQsoStartDtEqEndDt(bool)));
|
||
connect(Log_auto_comm, SIGNAL(toggled(bool)), THvTxW, SLOT(SetLogAutoComm(bool)));
|
||
//THvTxW->TheirLocChanged(); // for ft8
|
||
|
||
connect(THvRigControl, SIGNAL(EmitTxWatchdogParms(int,int,int)), THvTxW, SLOT(SetTxWatchdogParms(int,int,int)));
|
||
connect(THvRigControl, SIGNAL(EmitModSetFrqToRig(bool)), THvTxW, SLOT(SetModSetFrqToRig(bool)));
|
||
|
||
//connect(THvTxW, SIGNAL(EmitRigBandFromFreq(int)), this, SLOT(SetBandFromRigFreq(int)));//1.61= down is started
|
||
connect(THvTxW, SIGNAL(EmitFreqGlobalToRig(QString,bool)), THvRigControl, SLOT(SetFreq(QString,bool)));//2.16=
|
||
//connect(THvTxW, SIGNAL(EmitModeGlobalToRig(QString)), THvRigControl, SLOT(SetMode(QString)));//1.61= stop for the moment
|
||
connect(THvRigControl, SIGNAL(EmitGetedFreq(QString)), THvTxW, SLOT(SetFreqGlobalFromRigCat(QString)));//1.61=
|
||
connect(THvRigControl, SIGNAL(EmitGetedMode(QString)), THvTxW, SLOT(SetModeGlobalFromRigCat(QString)));//1.61=
|
||
connect(THvRigControl, SIGNAL(EmitTxActive(int)), THvTxW, SLOT(SetTxActive(int)));//2.21
|
||
connect(THvRigControl, SIGNAL(EmitRigCatActiveAndRead(bool)), THvTxW, SLOT(SetRigCatActiveAndRead(bool)));//2.53
|
||
|
||
connect(THvTxW, SIGNAL(EmitQSOProgress(int)), TDecoderMs, SLOT(SetQSOProgress(int)));
|
||
connect(THvTxW, SIGNAL(EmitQSOProgress(int)), THvRigControl, SLOT(SetQSOProgress(int)));//2.45
|
||
|
||
connect(THvTxW, SIGNAL(EmitQrgParms(QString,bool)), THvRigControl, SLOT(SetQrgParms(QString,bool)));//2.45
|
||
connect(THvRigControl, SIGNAL(EmitQrgActive(int)), THvTxW, SLOT(SetQrgActive(int)));//2.45
|
||
connect(THvRigControl, SIGNAL(EmitQrgFromRig(QString)), THvTxW, SLOT(SetQrgFromRig(QString)));//2.45
|
||
connect(THvRigControl, SIGNAL(EmitQrgInfoFromCat(QString)), THvTxW, SLOT(SetQrgInfoFromCat(QString)));//2.45
|
||
|
||
connect(THvTxW, SIGNAL(Emit65DeepSearchDb(QStringList)), TDecoderMs, SLOT(Set65DeepSearchDb(QStringList)));//1.49 deep search 65
|
||
THvTxW->Refr65DeepSearchDb();//1.49 deep search 65
|
||
|
||
QDateTime utc_tt = getDateTime();
|
||
THvTxW->SetDataTime(utc_tt);//calculate hotA right
|
||
|
||
QMenu *File_m = new QMenu(tr("File"));
|
||
//File_m->addAction(Open_m);
|
||
File_m->addAction(QPixmap(":pic/fileopen.png"),ShKey[lid][2][1], this, SLOT(Open()),QKeySequence(tr(ShKey[lid][2][0],ShKey[lid][2][1])));
|
||
File_m->addAction(QPixmap(":pic/log.png"),ShKey[lid][9][1], THvTxW, SLOT(ShowLog()),QKeySequence(tr(ShKey[lid][9][0],ShKey[lid][9][1])));
|
||
|
||
QAction *SetDb = new QAction(QPixmap(":pic/setdb.png"),tr("Overwrite Locator Database"),this);
|
||
File_m->addAction(SetDb);
|
||
connect(SetDb, SIGNAL(triggered()), THvTxW, SLOT(SetNewDb()));
|
||
|
||
File_m->addAction(QPixmap(":pic/exit.png"),ShKey[lid][3][1], this, SLOT(close()),QKeySequence(tr(ShKey[lid][3][0],ShKey[lid][3][1])));
|
||
|
||
TCustomPalW = new CustomPalW(x,y);
|
||
connect(TCustomPalW, SIGNAL(EmitCustomPalette(QPixmap,QColor,QColor)), MainDisplay, SLOT(SetCustomPalette(QPixmap,QColor,QColor)));
|
||
connect(TCustomPalW, SIGNAL(EmitCustomPalette(QPixmap,QColor,QColor)), SecondDisplay, SLOT(SetCustomPalette(QPixmap,QColor,QColor)));
|
||
TCustomPalW->SetPaletteToDisplay();
|
||
|
||
QMenu *Palette_m = new QMenu(tr("Palette"));
|
||
//Palette_m->setContentsMargins(2,0,2,0);
|
||
rb_palette[0] = new QAction(tr("Default BW"),this);
|
||
rb_palette[0]->setCheckable(true);
|
||
rb_palette[1] = new QAction(tr("Default Color"),this);
|
||
rb_palette[1]->setCheckable(true);
|
||
rb_palette[1]->setChecked(true);
|
||
for (int i = 2; i < 8; ++i)
|
||
{
|
||
rb_palette[i] = new QAction(QString("%1").arg(i-1)+" "+tr("Palette"),this);
|
||
rb_palette[i]->setCheckable(true);
|
||
}
|
||
rb_palette[8] = new QAction(tr("Custom Palette"),this);
|
||
rb_palette[8]->setCheckable(true);
|
||
|
||
QActionGroup *ac_gr_pal = new QActionGroup(this);
|
||
for (int i = 0; i < 9; ++i) ac_gr_pal->addAction(rb_palette[i]);//2.65
|
||
for (int i = 0; i < 9; ++i) Palette_m->addAction(rb_palette[i]);//2.65
|
||
|
||
Palette_m->addSeparator();
|
||
//QAction *a_start_pal_edit = new QAction("Custom Palette Editor",this);
|
||
QAction *a_start_pal_edit = new QAction(QPixmap(":pic/pal_edit.png"),tr("Custom Palette Editor"),this);
|
||
Palette_m->addAction(a_start_pal_edit);
|
||
connect(a_start_pal_edit, SIGNAL(triggered()), TCustomPalW, SLOT(show()));
|
||
|
||
//Dark style
|
||
ac_dark_st = new QAction("MSHV "+tr("Dark Style"),this);
|
||
ac_dark_st->setCheckable(true);
|
||
Palette_m->addSeparator();
|
||
Palette_m->addAction(ac_dark_st);
|
||
if (styid==1) ac_dark_st->setChecked(true);
|
||
connect(ac_dark_st, SIGNAL(toggled(bool)), this, SLOT(StyleChanged(bool)));
|
||
|
||
//identif_only_one = 1;
|
||
for (int i = 0; i < 9; ++i) connect(rb_palette[i], SIGNAL(toggled(bool)), this, SLOT(PaletteChanged(bool)));//2.65
|
||
|
||
Mode_m = new QMenu(tr("Mode"));
|
||
|
||
allq65 = false;
|
||
s_mod_ident = 2; //HV important set to default mode fsk441
|
||
QActionGroup *ac_gr_mod = new QActionGroup(this);
|
||
for (int i = 0; i < COUNT_MODE; ++i)
|
||
{
|
||
if (i==7) rb_mode[i] = new QAction(ModeStr(i)+" HF/50MHz",this);
|
||
else if (i==8 || i==9) rb_mode[i] = new QAction(ModeStr(i)+" VHF/UHF",this);
|
||
else rb_mode[i] = new QAction(ModeStr(i),this);
|
||
rb_mode[i]->setCheckable(true);
|
||
ac_gr_mod->addAction(rb_mode[i]);
|
||
}
|
||
QMenu *MQ65 = new QMenu("Q65");
|
||
MQ65->setIcon(QPixmap(":pic/smenu.png"));
|
||
for (int i = 0; i < COUNT_MODE; ++i)
|
||
{
|
||
int p = pos_mods[i];
|
||
if (p==14 || p==15 || p==16 || p==17)
|
||
{
|
||
MQ65->addAction(rb_mode[p]);
|
||
if (p==17) Mode_m->addMenu(MQ65);
|
||
}
|
||
else Mode_m->addAction(rb_mode[p]);
|
||
if (p==1 || p==3 || p==5 || p==6 || p==9 || p==12) Mode_m->addSeparator();
|
||
connect(rb_mode[i], SIGNAL(toggled(bool)), this, SLOT(ModeChanged(bool)));
|
||
}
|
||
|
||
Band_m = new QMenu(tr("Band"));
|
||
QMenu *B0_m = new QMenu("VLF ");
|
||
B0_m->setIcon(QPixmap(":pic/smenu.png"));
|
||
Band_m->addMenu(B0_m);
|
||
QMenu *B1_m = new QMenu("HF/VHF ");
|
||
B1_m->setIcon(QPixmap(":pic/smenu.png"));
|
||
Band_m->addMenu(B1_m);
|
||
QMenu *B2_m = new QMenu("VHF/UHF ");
|
||
B2_m->setIcon(QPixmap(":pic/smenu.png"));
|
||
Band_m->addMenu(B2_m);
|
||
QMenu *B3_m = new QMenu("SHF/EHF ");
|
||
B3_m->setIcon(QPixmap(":pic/smenu.png"));
|
||
Band_m->addMenu(B3_m);
|
||
// HF/VHF 1.8-50MHz, VHF/UHF 70-2300MHz SHF/EHF 3.3-228G
|
||
QActionGroup *ac_gr_band = new QActionGroup(this);
|
||
for (int i = 0; i<COUNT_BANDS; ++i)
|
||
{
|
||
QAction *rb_t = new QAction(lst_bands[i],this);
|
||
rb_t->setCheckable(true);
|
||
if (i==16) rb_t->setChecked(true); //2.65 16 default HV 70 MHz
|
||
ac_gr_band->addAction(rb_t);
|
||
ListBands.append(rb_t);
|
||
connect(rb_t, SIGNAL(toggled(bool)), this, SLOT(BandChanged(bool)));
|
||
if (i<3) B0_m->addAction(rb_t);
|
||
else if (i<15) B1_m->addAction(rb_t);
|
||
else if (i<23) B2_m->addAction(rb_t);
|
||
else B3_m->addAction(rb_t);
|
||
//Band_m->addAction(rb_t);
|
||
}
|
||
BandChanged(true); //default set HV 70 MHz
|
||
|
||
connect(THvTxW, SIGNAL(EmitRigBandFromFreq(int)), this, SLOT(SetBandFromRigFreq(int)));//1.61= ListBands needed
|
||
|
||
THvHelpMs = new HvHelpMs(tr("Help"),APP_NAME,App_Path,lid,x,y);
|
||
QMenu *Help_m = new QMenu(tr("Help"));
|
||
|
||
Help_m->addAction(QPixmap(":pic/help.png"),ShKey[lid][0][1], THvHelpMs, SLOT(show()),QKeySequence(tr(ShKey[lid][0][0],ShKey[lid][0][1])));
|
||
|
||
//THvHelpSkMs = new HvHelpSkMs(tr("Keyboard Shortcuts"),APP_NAME,lid,x,y); //2.65
|
||
THvHelpSkMs = new HvHelpSkMs(ShKey[lid][1][1],APP_NAME,lid,x,y);
|
||
Help_m->addAction(QPixmap(":pic/key.png"),ShKey[lid][1][1], THvHelpSkMs, SLOT(show()),QKeySequence(tr(ShKey[lid][1][0],ShKey[lid][1][1])));
|
||
|
||
Help_m->addAction(QPixmap(":pic/spot_dx.png"),ShKey[lid][25][1], THvTxW, SLOT(StartEmptySpotDialog()),QKeySequence(tr(ShKey[lid][25][0],ShKey[lid][25][1])));
|
||
|
||
Help_m->addAction(OCheckTime_m);
|
||
|
||
QAction *BcnList = new QAction(QPixmap(":pic/bcn_list.png"),tr("Beacon List"),this);
|
||
Help_m->addAction(BcnList);
|
||
connect(BcnList, SIGNAL(triggered()), THvTxW, SLOT(ShowBcnList()));
|
||
|
||
THvMsProc = new HvMsProc(tr("MS Procedures"),APP_NAME,App_Path,lid,x,y);
|
||
QAction *A_MsProc;
|
||
A_MsProc = new QAction(QPixmap(":pic/ms_proc.png"),tr("MS Procedures"),this);
|
||
connect(A_MsProc, SIGNAL(triggered()), THvMsProc, SLOT(show()));
|
||
Help_m->addAction(A_MsProc);
|
||
|
||
HvAboutMsHv *THvAboutMsHv = new HvAboutMsHv(tr("About"),APP_NAME,App_Path,lid,this);
|
||
QAction *Help_abaut;
|
||
Help_abaut = new QAction(QPixmap(":pic/ms_ico.png"),tr("About")+" MSHV",this);
|
||
connect(Help_abaut, SIGNAL(triggered()), THvAboutMsHv, SLOT(exec()));
|
||
Help_m->addAction(Help_abaut);
|
||
|
||
/*decoder_depth_all[0] = 2; //MSK144 and MSK40
|
||
decoder_depth_all[1] = 1; //no JTMS
|
||
decoder_depth_all[2] = 1; //no FSK441
|
||
decoder_depth_all[3] = 1; //no FSK314
|
||
decoder_depth_all[4] = 1; //no ISCAT-A
|
||
decoder_depth_all[5] = 1; //no ISCAT-B
|
||
decoder_depth_all[6] = 1; //no JT6M
|
||
decoder_depth_all[7] = 1; //no jt56a
|
||
decoder_depth_all[8] = 1; //no jt56b
|
||
decoder_depth_all[9] = 1; //no jt56c
|
||
decoder_depth_all[10] = 1; //no pi4
|
||
decoder_depth_all[11] = 3; //ft8
|
||
decoder_depth_all[12] = 2; //MSK144ms
|
||
decoder_depth_all[13] = 3; //ft4
|
||
decoder_depth_all[14] = 3; //q65a
|
||
decoder_depth_all[15] = 3; //q65b
|
||
decoder_depth_all[16] = 3; //q65c
|
||
decoder_depth_all[17] = 3; //q65d*/
|
||
for (int i = 0; i < COUNT_MODE; ++i) decoder_depth_all[i] = 1;
|
||
decoder_depth_all[0] = 2; //MSK144 and MSK40
|
||
decoder_depth_all[11] = 3; //ft8
|
||
decoder_depth_all[12] = 2; //MSK144ms
|
||
decoder_depth_all[13] = 3; //ft4
|
||
decoder_depth_all[14] = 3; //q65a
|
||
decoder_depth_all[15] = 3; //q65b
|
||
decoder_depth_all[16] = 3; //q65c
|
||
decoder_depth_all[17] = 3; //q65d
|
||
|
||
QMenu *Decode_m = new QMenu(tr("Decode"));
|
||
//Decode_m->setContentsMargins(2,0,2,0);
|
||
|
||
TCpuWudget = new CpuWudget();
|
||
TCpuWudget->setContentsMargins(0,2,0,0);// da se izrawni s Min_Menu
|
||
|
||
cthr = TCpuWudget->GetThrCount();
|
||
QMenu *ThrM = new QMenu("FT "+tr("Threads")); //2.69
|
||
ThrM->setIcon(QPixmap(":pic/smenu.png"));
|
||
rb_thr[0] = new QAction(tr("Only 1"),this);
|
||
rb_thr[0]->setCheckable(true);
|
||
rb_thr[1] = new QAction(tr("Max")+" 2",this);
|
||
rb_thr[1]->setCheckable(true);
|
||
rb_thr[2] = new QAction(tr("Max")+" 3",this);
|
||
rb_thr[2]->setCheckable(true);
|
||
rb_thr[3] = new QAction(tr("Max")+" 4",this);
|
||
rb_thr[3]->setCheckable(true);
|
||
rb_thr[4] = new QAction(tr("Max")+" 5",this);
|
||
rb_thr[4]->setCheckable(true);
|
||
rb_thr[5] = new QAction(tr("Max")+" 6",this);
|
||
rb_thr[5]->setCheckable(true);
|
||
QActionGroup *ac_gr_thr = new QActionGroup(this);
|
||
for (int i = 0; i < 6; ++i) ac_gr_thr->addAction(rb_thr[i]);
|
||
for (int i = 0; i < 6; ++i) ThrM->addAction(rb_thr[i]);
|
||
for (int i = 0; i < 6; ++i) connect(rb_thr[i], SIGNAL(toggled(bool)), this, SLOT(SetThrLevel(bool)));
|
||
for (int i = 0; i < COUNT_MODE; ++i) thr_all[i] = 1; //2.69
|
||
rb_thr[0]->setChecked(true);
|
||
if (cthr==2) rb_thr[1]->setText(tr("Max")+" 2 "+tr("Do Not Use If TXing"));
|
||
if (cthr==3) rb_thr[2]->setText(tr("Max")+" 3 "+tr("Do Not Use If TXing"));
|
||
if (cthr==4) rb_thr[3]->setText(tr("Max")+" 4 "+tr("Do Not Use If TXing"));
|
||
if (cthr==5) rb_thr[4]->setText(tr("Max")+" 5 "+tr("Do Not Use If TXing"));
|
||
if (cthr==6) rb_thr[5]->setText(tr("Max")+" 6 "+tr("Do Not Use If TXing"));
|
||
RbThrSetEnabled(false);
|
||
|
||
rb_dec_depth[0] = new QAction(tr("Fast")+" MSK FT Q65",this);// Q65 2.55
|
||
rb_dec_depth[0]->setCheckable(true);
|
||
rb_dec_depth[1] = new QAction(tr("Normal")+" MSK FT Q65",this);// Q65 2.55
|
||
rb_dec_depth[1]->setCheckable(true);
|
||
rb_dec_depth[2] = new QAction(tr("Deep")+" MSK FT Q65",this);// Q65 2.55
|
||
rb_dec_depth[2]->setCheckable(true);
|
||
for (int i = 0; i < 3; ++i) rb_dec_depth[i]->setEnabled(false);//HV important set to default mode fsk441
|
||
|
||
//2.39 remm
|
||
cb_3intFt_d = new QAction(tr("Use Three-stage Decoding")+" FT8",this);//Use Three Intervals For Decode FT8 (High Speed PCs)
|
||
cb_3intFt_d->setCheckable(true);
|
||
cb_3intFt_d->setEnabled(false);
|
||
|
||
QActionGroup *ac_gr_dec = new QActionGroup(this);
|
||
for (int i = 0; i < 3; ++i) ac_gr_dec->addAction(rb_dec_depth[i]);
|
||
|
||
cb_msk144rxequal_[0] = new QAction(tr("MSK RX Equalization Off"),this);
|
||
cb_msk144rxequal_[0]->setCheckable(true);
|
||
cb_msk144rxequal_[1] = new QAction(tr("MSK RX Equalization Static"),this);
|
||
cb_msk144rxequal_[1]->setCheckable(true);
|
||
cb_msk144rxequal_[2] = new QAction(tr("MSK RX Equalization Dynamic"),this);
|
||
cb_msk144rxequal_[2]->setCheckable(true);
|
||
cb_msk144rxequal_[3] = new QAction(tr("MSK RX Equalization S And D"),this);
|
||
cb_msk144rxequal_[3]->setCheckable(true);
|
||
|
||
for (int i = 0; i < 4; ++i) cb_msk144rxequal_[i]->setEnabled(false);
|
||
|
||
QActionGroup *ac_gr_eq = new QActionGroup(this);
|
||
for (int i = 0; i < 4; ++i) ac_gr_eq->addAction(cb_msk144rxequal_[i]);
|
||
|
||
TAggressiveDialog = new AggressiveDialog(dsty,this);
|
||
connect(TAggressiveDialog, SIGNAL(EmitLevelAggres(int)), TDecoderMs, SLOT(SetAggresLevFtd(int)));
|
||
connect(TAggressiveDialog, SIGNAL(EmitLevelDeepS(int)), TDecoderMs, SLOT(SetAggresLevDeepS(int)));
|
||
|
||
ac_aggressive = new QAction(QPixmap(":pic/slid_agres.png"),tr("Aggressive Levels")+" JT65",this);
|
||
connect(ac_aggressive, SIGNAL(triggered()), TAggressiveDialog, SLOT(exec()));
|
||
|
||
/*vhf_uhf_decode_fac_all[0] = false; //MSK144 and MSK40
|
||
vhf_uhf_decode_fac_all[1] = false; //no JTMS
|
||
vhf_uhf_decode_fac_all[2] = false; //no FSK441
|
||
vhf_uhf_decode_fac_all[3] = false; //no FSK314
|
||
vhf_uhf_decode_fac_all[4] = false; //no ISCAT-A
|
||
vhf_uhf_decode_fac_all[5] = false; //no ISCAT-B
|
||
vhf_uhf_decode_fac_all[6] = false; //no JT6M
|
||
vhf_uhf_decode_fac_all[7] = true; //no jt56a
|
||
vhf_uhf_decode_fac_all[8] = true; //no jt56b
|
||
vhf_uhf_decode_fac_all[9] = true; //no jt56c
|
||
vhf_uhf_decode_fac_all[10] = false; //no pi4
|
||
vhf_uhf_decode_fac_all[11] = false; //ft8
|
||
vhf_uhf_decode_fac_all[12] = false; //MSK144ms
|
||
vhf_uhf_decode_fac_all[13] = false; //ft4
|
||
vhf_uhf_decode_fac_all[13] = false; //q65*/
|
||
for (int i=0; i<COUNT_MODE; ++i)
|
||
{
|
||
if (i>6 && i<10) vhf_uhf_decode_fac_all[i] = true; // jt65
|
||
else vhf_uhf_decode_fac_all[i] = false;
|
||
}
|
||
|
||
//cb_vhf_uhf_decode_fac = new QAction("Enable VHF/UHF Features JT65",this);
|
||
cb_vhf_uhf_decode_fac = new QAction(tr("Check for VHF/UHF Uncheck for HF Features")+" JT65",this);
|
||
cb_vhf_uhf_decode_fac->setCheckable(true);
|
||
cb_vhf_uhf_decode_fac->setChecked(false);//1.60= def fsk441
|
||
|
||
/*avg_dec_all[0] = false; //MSK144 and MSK40
|
||
avg_dec_all[1] = false; //no JTMS
|
||
avg_dec_all[2] = false; //no FSK441
|
||
avg_dec_all[3] = false; //no FSK314
|
||
avg_dec_all[4] = false; //no ISCAT-A
|
||
avg_dec_all[5] = false; //no ISCAT-B
|
||
avg_dec_all[6] = false; //no JT6M
|
||
avg_dec_all[7] = false; //no jt56a
|
||
avg_dec_all[8] = true; //no jt56b
|
||
avg_dec_all[9] = true; //no jt56c
|
||
avg_dec_all[10] = true; //no pi4 fiktive all time on
|
||
avg_dec_all[11] = false; //ft8
|
||
avg_dec_all[12] = false; //MSK144ms
|
||
avg_dec_all[13] = false; //ft4
|
||
avg_dec_all[14] = false; //q65a have average ?
|
||
avg_dec_all[15] = false; //q65b have average ?
|
||
avg_dec_all[16] = false; //q65c have average ?
|
||
avg_dec_all[17] = false; //q65d have average ?*/
|
||
for (int i = 0; i < COUNT_MODE; ++i) avg_dec_all[i] = false;
|
||
avg_dec_all[8] = true; //no jt56b
|
||
avg_dec_all[9] = true; //no jt56c
|
||
avg_dec_all[10] = true; //no pi4 fiktive all time on
|
||
|
||
cb_avg_decode = new QAction(tr("Enable Averaging")+" JT65 Q65",this);// Q65 2.55
|
||
cb_avg_decode->setCheckable(true);
|
||
cb_avg_decode->setChecked(false);
|
||
|
||
cb_auto_clr_avg_afdec = new QAction(tr("Auto Clear Averaging After Decode")+" Q65",this);
|
||
cb_auto_clr_avg_afdec->setCheckable(true);
|
||
cb_auto_clr_avg_afdec->setChecked(false);
|
||
//cb_auto_clr_avg_afdec->setVisible(false);// Q65 2.55
|
||
|
||
/*deep_search_dec_all[0] = false; //MSK144 and MSK40
|
||
deep_search_dec_all[1] = false; //no JTMS
|
||
deep_search_dec_all[2] = false; //no FSK441
|
||
deep_search_dec_all[3] = false; //no FSK314
|
||
deep_search_dec_all[4] = false; //no ISCAT-A
|
||
deep_search_dec_all[5] = false; //no ISCAT-B
|
||
deep_search_dec_all[6] = false; //no JT6M
|
||
deep_search_dec_all[7] = false; //no jt56a
|
||
deep_search_dec_all[8] = false; //no jt56b
|
||
deep_search_dec_all[9] = false; //no jt56c
|
||
deep_search_dec_all[10] = false; //no pi4
|
||
deep_search_dec_all[11] = false; //ft8
|
||
deep_search_dec_all[12] = false; //MSK144ms
|
||
deep_search_dec_all[13] = false; //ft4*/
|
||
for (int i=0; i<COUNT_MODE; ++i) deep_search_dec_all[i] = false;
|
||
|
||
cb_deep_search_decode = new QAction(tr("Enable Deep Search")+" JT65",this);
|
||
cb_deep_search_decode->setCheckable(true);
|
||
cb_deep_search_decode->setChecked(false);
|
||
|
||
/*decoder_ap_all[0] = false; //MSK144 and MSK40
|
||
decoder_ap_all[1] = false; //no JTMS
|
||
decoder_ap_all[2] = false; //no FSK441
|
||
decoder_ap_all[3] = false; //no FSK314
|
||
decoder_ap_all[4] = false; //no ISCAT-A
|
||
decoder_ap_all[5] = false; //no ISCAT-B
|
||
decoder_ap_all[6] = false; //no JT6M
|
||
decoder_ap_all[7] = false; //no jt56a//1.57=!!!
|
||
decoder_ap_all[8] = false; //no jt56b//1.57=!!!
|
||
decoder_ap_all[9] = false; //no jt56c//1.57=!!!
|
||
decoder_ap_all[10] = false; //no pi4
|
||
decoder_ap_all[11] = true; //ft8
|
||
decoder_ap_all[12] = false; //MSK144ms
|
||
decoder_ap_all[13] = true; //ft4
|
||
decoder_ap_all[14] = true; //q65a ???
|
||
decoder_ap_all[15] = true; //q65b ???
|
||
decoder_ap_all[16] = true; //q65c ???
|
||
decoder_ap_all[17] = true; //q65d ???*/
|
||
for (int i = 0; i < COUNT_MODE; ++i) decoder_ap_all[i] = false;
|
||
decoder_ap_all[11] = true; //ft8
|
||
decoder_ap_all[13] = true; //ft4
|
||
decoder_ap_all[14] = true; //q65a ???
|
||
decoder_ap_all[15] = true; //q65b ???
|
||
decoder_ap_all[16] = true; //q65c ???
|
||
decoder_ap_all[17] = true; //q65d ???
|
||
|
||
cb_ap_decode = new QAction(tr("Enable AP")+" FT JT65 Q65",this);// Q65 2.55
|
||
|
||
cb_ap_decode->setCheckable(true);
|
||
cb_ap_decode->setChecked(false);//default
|
||
cb_ap_decode->setEnabled(false);
|
||
|
||
/*max65_cand_all[0] = 1; //MSK144 and MSK40
|
||
max65_cand_all[1] = 1; //no JTMS
|
||
max65_cand_all[2] = 1; //no FSK441
|
||
max65_cand_all[3] = 1; //no FSK314
|
||
max65_cand_all[4] = 1; //no ISCAT-A
|
||
max65_cand_all[5] = 1; //no ISCAT-B
|
||
max65_cand_all[6] = 1; //no JT6M
|
||
max65_cand_all[7] = 1; //no jt56a
|
||
max65_cand_all[8] = 1; //no jt56b
|
||
max65_cand_all[9] = 1; //no jt56c
|
||
max65_cand_all[10] = 1; //no pi4
|
||
max65_cand_all[11] = 1; //ft8
|
||
max65_cand_all[12] = 1; //MSK144ms
|
||
max65_cand_all[13] = 1; //ft4*/
|
||
for (int i=0; i<COUNT_MODE; ++i)
|
||
{
|
||
max65_cand_all[i] = 1;
|
||
}
|
||
|
||
cb_1_dec_sig_q65 = new QAction(tr("Single Decoded Signal")+" Q65",this);
|
||
cb_1_dec_sig_q65->setCheckable(true);
|
||
cb_1_dec_sig_q65->setEnabled(false);
|
||
connect(cb_1_dec_sig_q65, SIGNAL(toggled(bool)), TDecoderMs, SLOT(SetSingleDecQ65(bool)));
|
||
//cb_1_dec_sig_q65->setVisible(false);// Q65 2.55
|
||
|
||
cb_max_drift = new QAction(tr("Use Drift Correction")+" +/- 100 Hz Q65",this);//2.57 +/- 100 Hz
|
||
cb_max_drift->setCheckable(true);
|
||
cb_max_drift->setEnabled(false);
|
||
connect(cb_max_drift, SIGNAL(toggled(bool)), TDecoderMs, SLOT(SetMaxDrift(bool)));
|
||
//cb_max_drift->setVisible(false);// Q65 2.57
|
||
|
||
cb_dec_aft_eme_delay = new QAction(tr("Decode After EME Delay")+" Q65",this);
|
||
cb_dec_aft_eme_delay->setCheckable(true);
|
||
cb_dec_aft_eme_delay->setEnabled(false);
|
||
connect(cb_dec_aft_eme_delay, SIGNAL(toggled(bool)), TDecoderMs, SLOT(SetDecAftEMEDelay(bool)));
|
||
//cb_dec_aft_eme_delay->setVisible(false);// Q65 2.55
|
||
|
||
cb_max65_cand[0] = new QAction(tr("Single Decoded Signal")+" JT65",this);
|
||
cb_max65_cand[0]->setCheckable(true);
|
||
cb_max65_cand[1] = new QAction(tr("Max 4 Decoded Signals")+" JT65",this);
|
||
cb_max65_cand[1]->setCheckable(true);
|
||
cb_max65_cand[2] = new QAction(tr("Max 8 Decoded Signals")+" JT65",this);
|
||
cb_max65_cand[2]->setCheckable(true);
|
||
cb_max65_cand[3] = new QAction(tr("Max 16 Decoded Signals")+" JT65",this);
|
||
cb_max65_cand[3]->setCheckable(true);
|
||
cb_max65_cand[4] = new QAction(tr("Max 32 Decoded Signals")+" JT65",this);
|
||
cb_max65_cand[4]->setCheckable(true);
|
||
QActionGroup *ac_gr_c65 = new QActionGroup(this);
|
||
for (int i = 0; i < 5; ++i) ac_gr_c65->addAction(cb_max65_cand[i]);
|
||
for (int i = 0; i < 5; ++i) cb_max65_cand[i]->setEnabled(false);
|
||
for (int i = 0; i < 5; ++i) connect(cb_max65_cand[i], SIGNAL(toggled(bool)), this, SLOT(SetMaxCandidats65(bool)));
|
||
cb_max65_cand[1]->setChecked(true);
|
||
|
||
Decode_m->addMenu(ThrM);
|
||
Decode_m->addSeparator();
|
||
for (int i = 0; i < 3; ++i) Decode_m->addAction(rb_dec_depth[i]);
|
||
Decode_m->addAction(cb_3intFt_d);//2.39 remm
|
||
Decode_m->addSeparator();
|
||
for (int i = 0; i < 4; ++i) Decode_m->addAction(cb_msk144rxequal_[i]);
|
||
Decode_m->addSeparator();
|
||
Decode_m->addAction(cb_1_dec_sig_q65);
|
||
Decode_m->addAction(cb_max_drift);
|
||
for (int i = 0; i < 5; ++i) Decode_m->addAction(cb_max65_cand[i]);
|
||
Decode_m->addSeparator();
|
||
Decode_m->addAction(ac_aggressive);
|
||
Decode_m->addAction(cb_vhf_uhf_decode_fac);
|
||
Decode_m->addAction(cb_avg_decode);
|
||
Decode_m->addAction(cb_auto_clr_avg_afdec);
|
||
Decode_m->addAction(cb_deep_search_decode);
|
||
Decode_m->addAction(cb_dec_aft_eme_delay);
|
||
Decode_m->addSeparator();
|
||
Decode_m->addAction(cb_ap_decode);
|
||
|
||
for (int i = 0; i < 3; ++i) connect(rb_dec_depth[i], SIGNAL(toggled(bool)), this, SLOT(DecodeDeept(bool)));
|
||
rb_dec_depth[0]->setChecked(true);//fast dec
|
||
connect(cb_3intFt_d, SIGNAL(toggled(bool)), MainDisplay, SLOT(Decode3intFt(bool)));//2.39 remm
|
||
connect(cb_3intFt_d, SIGNAL(toggled(bool)), TDecoderMs, SLOT(Decode3intFt(bool)));//2.39 remm
|
||
cb_3intFt_d->setChecked(true);//2.51 default
|
||
|
||
for (int i = 0; i < 4; ++i) connect(cb_msk144rxequal_[i], SIGNAL(toggled(bool)), this, SLOT(Msk144RxEqual(bool)));
|
||
cb_msk144rxequal_[0]->setChecked(true);//default Equalization msk144 and decoderms.cpp
|
||
|
||
connect(cb_vhf_uhf_decode_fac, SIGNAL(toggled(bool)), this, SLOT(SetVhfUhfFeatures(bool)));//1.60=
|
||
|
||
connect(cb_avg_decode, SIGNAL(toggled(bool)), this, SLOT(AvgDecodeChanged(bool)));
|
||
connect(cb_auto_clr_avg_afdec, SIGNAL(toggled(bool)), TDecoderMs, SLOT(AutoClrAvgChanged(bool)));
|
||
connect(cb_deep_search_decode, SIGNAL(toggled(bool)), this, SLOT(DeepSearchChanged(bool)));// 1.49 deep search
|
||
|
||
//connect(cb_ap_decode, SIGNAL(toggled(bool)), TDecoderMs, SLOT(SetApDecode(bool)));
|
||
connect(cb_ap_decode, SIGNAL(toggled(bool)), this, SLOT(DecodeAp(bool)));
|
||
|
||
Min_Menu->addMenu(File_m);
|
||
Min_Menu->addMenu(Option_m);
|
||
Min_Menu->addMenu(Palette_m);
|
||
Min_Menu->addMenu(Mode_m);
|
||
Min_Menu->addMenu(Decode_m);
|
||
Min_Menu->addMenu(Band_m);
|
||
//// Translation ////
|
||
Min_Menu->addMenu(lang_m);
|
||
//// end Translation ////
|
||
Min_Menu->addMenu(Help_m);
|
||
|
||
Min_Menu->setContentsMargins(4,0,4,0);//4,0,4,0 ( qreal left, qreal top, qreal right, qreal bottom )
|
||
//Min_Menu->setFixedHeight(23);//1.56=off for +150%
|
||
|
||
QHBoxLayout *H_l = new QHBoxLayout();
|
||
H_l->setContentsMargins ( 0, 0, 0, 0);
|
||
H_l->addWidget(Min_Menu);
|
||
H_l->setAlignment(Min_Menu,Qt::AlignLeft);
|
||
H_l->addWidget(TCpuWudget);
|
||
H_l->setAlignment(TCpuWudget,Qt::AlignRight | Qt::AlignHCenter);
|
||
//H_l->setAlignment(TPicW,Qt::AlignHCenter);
|
||
//H_l->addWidget(THvSMeter_H);
|
||
|
||
int but_height=20;//21
|
||
//QFont b_font = font();
|
||
//b_font.setPointSize(8);
|
||
QPushButton *pb_stop_rx = new QPushButton(tr("STOP MONITOR"));
|
||
pb_stop_rx->setFixedHeight(but_height);
|
||
//pb_stop_rx->setFont(b_font);
|
||
connect(pb_stop_rx, SIGNAL(clicked(bool)), this, SLOT(StopRxGlobal()));
|
||
pb_start_rx = new QPushButton(tr("MONITOR"));
|
||
pb_start_rx->setStyleSheet("QPushButton{background-color :palette(Button);}");
|
||
pb_start_rx->setFixedHeight(but_height);
|
||
//pb_start_rx->setFont(b_font);
|
||
connect(pb_start_rx, SIGNAL(clicked(bool)), this, SLOT(StartRxGlobal()));
|
||
|
||
QPushButton *pb_stop_tx = new QPushButton(tr("STOP TX"));
|
||
pb_stop_tx->setFixedHeight(but_height);
|
||
connect(pb_stop_tx, SIGNAL(clicked(bool)), this, SLOT(StopTxGlobal()));
|
||
|
||
pb_clar_list1 = new QPushButton(tr("CLEAR MESSAGES"));
|
||
pb_clar_list1->setFixedHeight(but_height);
|
||
//pb_clar_list->setFont(b_font);
|
||
connect(pb_clar_list1, SIGNAL(clicked(bool)), TDecodeList1, SLOT(Clear_List()));
|
||
|
||
//pb_clar_list2 = new QPushButton(" CLEAR RX MESSAGES ");
|
||
pb_clar_list2 = new QPushButton(tr("CLR RX FREQ MSG"));
|
||
pb_clar_list2->setFixedHeight(but_height);
|
||
connect(pb_clar_list2, SIGNAL(clicked(bool)), TDecodeList2, SLOT(Clear_List()));
|
||
|
||
QPushButton *pb_rst_qso = new QPushButton(tr("RESET QSO"));
|
||
pb_rst_qso->setFixedHeight(but_height);
|
||
//pb_rst_qso->setFont(b_font);
|
||
connect(pb_rst_qso, SIGNAL(clicked(bool)), THvTxW, SLOT(ResetQSO()));
|
||
|
||
pb_tune = new QPushButton(tr("TUNE"));
|
||
pb_tune->setStyleSheet("QPushButton{background-color :palette(Button);}");
|
||
pb_tune->setFixedSize(65,but_height);
|
||
//pb_tune->setFont(b_font);
|
||
connect(pb_tune, SIGNAL(clicked(bool)), this, SLOT(Tune()));
|
||
f_tune = false;
|
||
|
||
//connect(FontDialog, SIGNAL(EmitFontApp(QFont)), this, SLOT(SetFont(QFont)));
|
||
|
||
pb_clear_avg65 = new QPushButton(tr("CLEAR AVG")+" 0/0 | 0/0");
|
||
pb_clear_avg65->setFixedHeight(but_height);
|
||
pb_clear_avg65->setHidden(true);
|
||
connect(pb_clear_avg65, SIGNAL(clicked(bool)), TDecoderMs, SLOT(SetClearAvg65()));
|
||
|
||
pb_dec_65 = new QPushButton(tr("DECODE")+" NA");//1.49
|
||
pb_dec_65->setFixedHeight(but_height);
|
||
pb_dec_65->setHidden(true);
|
||
pb_dec_65->setEnabled(false);
|
||
//pb_dec_65->setFixedWidth(40);
|
||
|
||
connect(MainDisplay, SIGNAL(EmitIsDispHaveDataForDec65(int,bool)), this, SLOT(IsDispHaveDataForDec65(int,bool)));//1.49
|
||
connect(SecondDisplay, SIGNAL(EmitIsDispHaveDataForDec65(int,bool)), this, SLOT(IsDispHaveDataForDec65(int,bool)));//1.49
|
||
connect(pb_dec_65, SIGNAL(clicked(bool)), this, SLOT(SetButtonDecodeAll65()));//1.49
|
||
|
||
connect(pb_rst_qso, SIGNAL(clicked(bool)), TDecoderMs, SLOT(SetClearAvg65()));//1.36
|
||
connect(pb_clar_list1, SIGNAL(clicked(bool)), TDecoderMs, SLOT(SetClearAvg65()));//1.37
|
||
|
||
connect(TDecoderMs, SIGNAL(EmitAvgSaves(int,int,int,int)), this, SLOT(SetAvg65CountToButtonTxt(int,int,int,int)));
|
||
//connect(MainDisplay, SIGNAL(EmitVDRxFreq(double)), TDecoderMs, SLOT(SetRxFreq65(double)));
|
||
|
||
pb_clear_avgPi4 = new QPushButton(tr("CLEAR AVG")+" 0/0");
|
||
pb_clear_avgPi4->setFixedHeight(but_height);
|
||
pb_clear_avgPi4->setHidden(true);
|
||
connect(pb_clear_avgPi4, SIGNAL(clicked(bool)), TDecoderMs, SLOT(SetClearAvgPi4()));
|
||
connect(TDecoderMs, SIGNAL(EmitAvgSavesPi4(int,int)), this, SLOT(SetAvgPi4CountToButtonTxt(int,int)));
|
||
|
||
pb_clear_avgQ65 = new QPushButton(tr("CLEAR AVG")+" 0 | 0");
|
||
pb_clear_avgQ65->setFixedHeight(but_height);
|
||
pb_clear_avgQ65->setHidden(true);
|
||
connect(pb_clear_avgQ65, SIGNAL(clicked(bool)), TDecoderMs, SLOT(SetClearAvgQ65()));
|
||
connect(TDecoderMs, SIGNAL(EmitAvgSavesQ65(int,int)), this, SLOT(SetAvgQ65CountToButtonTxt(int,int)));
|
||
|
||
//QPushButton *pb_fltr = new QPushButton(tr("FLTR IS OFF"));
|
||
FilterDialog->pb_fltrOnOff->setFixedHeight(but_height);
|
||
//FilterDialog->SetHidFLBtOnOff(true);//FilterDialog->pb_fltrOnOff->setHidden(true);
|
||
|
||
QHBoxLayout *H_butons = new QHBoxLayout();
|
||
H_butons->setContentsMargins(0,0,0,0);
|
||
H_butons->addWidget(pb_start_rx);
|
||
H_butons->addWidget(pb_stop_rx);
|
||
H_butons->addWidget(pb_clar_list1);
|
||
H_butons->addWidget(pb_clar_list2);
|
||
H_butons->addWidget(pb_clear_avg65);
|
||
H_butons->addWidget(pb_clear_avgQ65);
|
||
H_butons->addWidget(pb_clear_avgPi4);
|
||
H_butons->addWidget(pb_dec_65);
|
||
H_butons->addWidget(pb_rst_qso);
|
||
H_butons->addWidget(FilterDialog->pb_fltrOnOff);
|
||
H_butons->addWidget(pb_stop_tx);
|
||
H_butons->addWidget(pb_tune);
|
||
|
||
connect(THvTxW, SIGNAL(EmitMessageS(QString,bool,bool)), this, SLOT(TxMessageS(QString,bool,bool)));
|
||
connect(THvTxW, SIGNAL(EmitAuto()), this, SLOT(SetAuto()));
|
||
|
||
//connect(THvMakros, SIGNAL(EmitRptRsq(bool)), THvTxW, SLOT(SetRptRsq(bool)));
|
||
connect(THvTxW, SIGNAL(EmitMacros(int,QString)),this,SLOT(SetMacros(int,QString)));
|
||
//connect(THvMakros, SIGNAL(EmitMacros(QStringList,int,QString,QString)),
|
||
//this, SLOT(SetMacros(QStringList,int,QString,QString)));//2.32
|
||
//connect(THvMakros, SIGNAL(EmitDistUnit(bool)), THvTxW, SLOT(SetDistUnit(bool)));
|
||
|
||
connect(THvTxW, SIGNAL(EmitFileNameChenged()), this, SLOT(FileNameChengedD1()));
|
||
connect(THvTxW, SIGNAL(EmitFileNameChenged()), this, SLOT(FileNameChengedD2()));
|
||
|
||
connect(MainDisplay, SIGNAL(EmitVDRxFreqF0F1(double,double,double)), TDecoderMs, SLOT(SetRxFreqF0F1(double,double,double)));
|
||
connect(THvTxW, SIGNAL(EmitDfSdbChanged(int,int)), TDecoderMs, SLOT(SetDfSdb(int,int)));
|
||
connect(THvTxW, SIGNAL(EmitDfChanged(int,int)), MainDisplay, SLOT(SetVDdf(int,int)));
|
||
connect(MainDisplay, SIGNAL(EmitVDRxDf(int)), THvTxW, SLOT(SetRxDf(int)));
|
||
|
||
//connect(THvTxW, SIGNAL(EmitShOptChenged(bool)), this, SLOT(SetShOpt(bool)));
|
||
connect(THvTxW, SIGNAL(EmitShOptChenged(bool)), TDecoderMs, SLOT(SetShOpt(bool)));
|
||
connect(THvTxW, SIGNAL(EmitSwlOptChenged(bool)), TDecoderMs, SLOT(SetSwlOpt(bool)));
|
||
|
||
connect(TDecodeList1, SIGNAL(ListSelectedTextAll(QString,QString,QString,QString,QString)),
|
||
THvTxW, SLOT(DecListTextAll(QString,QString,QString,QString,QString)));
|
||
connect(TDecodeList1, SIGNAL(ListSelectedRpt(QString)), THvTxW, SLOT(DecListTextRpt(QString)));
|
||
connect(TDecodeList2, SIGNAL(ListSelectedTextAll(QString,QString,QString,QString,QString)),
|
||
THvTxW, SLOT(DecListTextAll(QString,QString,QString,QString,QString)));
|
||
connect(TDecodeList2, SIGNAL(ListSelectedRpt(QString)), THvTxW, SLOT(DecListTextRpt(QString)));
|
||
connect(ac_2click_list_autu_on, SIGNAL(toggled(bool)), THvTxW, SLOT(Set2ClickDecListAutoOn(bool)));
|
||
ac_2click_list_autu_on->setChecked(true);//2.51
|
||
connect(ac_start_qso_from_tx2_or_tx1, SIGNAL(toggled(bool)), THvTxW, SLOT(SetStartFromTx2Tx1(bool)));
|
||
connect(ac_new_dec_clr_msg_list, SIGNAL(toggled(bool)), TDecodeList1, SLOT(SetNewDecClrMsgListFlag(bool)));
|
||
ac_new_dec_clr_msg_list->setChecked(false);
|
||
connect(ac_use_queue_cont, SIGNAL(toggled(bool)), THvTxW, SLOT(SetUseQueueCont(bool)));//2.59
|
||
|
||
//for format message
|
||
connect(THvTxW, SIGNAL(EmitWords(QStringList,int,int)), TDecoderMs, SLOT(SetWords(QStringList,int,int)));
|
||
connect(Test_tones_m, SIGNAL(triggered()), THvTxW, SLOT(GenTestTones()));
|
||
connect(THvTxW, SIGNAL(EmitZap(bool)), TDecoderMs, SLOT(SetZap(bool)));
|
||
connect(THvTxW, SIGNAL(EmitZap(bool)), MainDisplay, SLOT(SetZap(bool)));
|
||
connect(THvTxW, SIGNAL(EmitZap(bool)), SecondDisplay, SLOT(SetZap(bool)));
|
||
|
||
s_msg = "";
|
||
//s_gen = false;
|
||
//s_imidi = false;
|
||
THvTxW->GetCurrentMsg();
|
||
THvTxW->SetMacrosFirstStart();//THvMakros->SetMacros();
|
||
THvTxW->ReadEDILog();//2.57 after SetMacros for may locator
|
||
//"RT Dec"
|
||
cb_auto_decode_all = new QCheckBox(tr("Auto Dec"));//Auto Decode
|
||
cb_auto_decode_all->setFixedWidth(85);// tested 125%
|
||
//cb_auto_decode_all->setStyleSheet("QCheckBox::indicator{width:13px; height:13px; }");
|
||
connect(cb_auto_decode_all, SIGNAL(toggled(bool)), this, SLOT(CbSetAutoDecodeAll(bool)));
|
||
//connect(cb_auto_decode_all, SIGNAL(toggled(bool)), SecondDisplay, SLOT(SetAutoDecodeAll(bool)));
|
||
cb_auto_decode_all->setChecked(auto_decode_all[2]);// fsk441
|
||
|
||
cb_rtd_decode = new QCheckBox(tr("RT Dec"));//Real-time Decode
|
||
cb_rtd_decode->setFixedWidth(75);//tested 125%
|
||
connect(cb_rtd_decode, SIGNAL(toggled(bool)), this, SLOT(CbSetStartStopRtd(bool)));
|
||
cb_rtd_decode->setChecked(true);
|
||
cb_rtd_decode->setEnabled(false);
|
||
|
||
l_mode = new QLabel(ModeStr(s_mod_ident)); //inportent fsk441
|
||
|
||
//if (dsty) l_mode->setStyleSheet("QLabel {color: rgb(0, 0, 0)}");
|
||
//l_mode->setStyleSheet(ModeColorStr(s_mod_ident));
|
||
if (dsty) l_mode->setStyleSheet(ModeColorStr(s_mod_ident)+" color: rgb(0, 0, 0)}");
|
||
else l_mode->setStyleSheet(ModeColorStr(s_mod_ident)+"}");
|
||
|
||
l_mode->setAlignment(Qt::AlignCenter);
|
||
l_mode->setFixedSize(60,20);//1.30 from 70x20 +125%
|
||
l_mode->setFrameStyle(QFrame::Panel | QFrame::Sunken);
|
||
QHBoxLayout *H_status = new QHBoxLayout();
|
||
H_status->setContentsMargins ( 4, 0, 4, 0);
|
||
H_status->setSpacing(4);
|
||
H_status->addWidget(l_mode);
|
||
H_status->addWidget(cb_auto_decode_all);
|
||
H_status->addWidget(cb_rtd_decode);
|
||
H_status->addWidget(TPicW);
|
||
//H_status->setAlignment(TPicW,Qt::AlignLeft);
|
||
H_status->addWidget(l_tx_text);
|
||
//H_status->setAlignment(l_tx_text,Qt::AlignHCenter);
|
||
H_status->addWidget(THvSMeter_H);
|
||
//H_centr->setAlignment(THvTxW, Qt::AlignRight);
|
||
|
||
// this->setMinimumWidth(MainDisplay->width()+Slider_Tune_Disp->width()+2);
|
||
|
||
pb_save_disp1 = new QPushButton(tr("SAVE DISPLAY")+" 1");
|
||
//pb_save_disp1->setFixedWidth(150);
|
||
pb_save_disp1->setFixedHeight(19);
|
||
//pb_save_disp1->setFont(b_font);
|
||
//pb_save_disp1->setStyleSheet("background-color:rgb(236, 233, 216);");
|
||
pb_save_disp1->setStyleSheet("QPushButton {background-color :palette(Button);}");
|
||
connect(pb_save_disp1, SIGNAL(clicked(bool)), this, SLOT(SaveFileDisplay1()));
|
||
pb_save_disp2 = new QPushButton(tr("SAVE DISPLAY")+" 2");
|
||
//pb_save_disp2->setFixedWidth(150);
|
||
pb_save_disp2->setFixedHeight(19);
|
||
//pb_save_disp2->setFont(b_font);
|
||
//pb_save_disp2->setStyleSheet("background-color:rgb(236, 233, 216);");
|
||
pb_save_disp2->setStyleSheet("QPushButton {background-color :palette(Button);}");
|
||
connect(pb_save_disp2, SIGNAL(clicked(bool)), this, SLOT(SaveFileDisplay2()));
|
||
|
||
cb_flat_dsp = new QCheckBox("FD");
|
||
cb_flat_dsp->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
|
||
cb_flat_dsp->setFixedHeight(17);
|
||
connect(cb_flat_dsp, SIGNAL(toggled(bool)), this, SLOT(SetFlatDisplay_VD(bool)));
|
||
cb_flat_dsp->setChecked(false);
|
||
cb_flat_dsp->setToolTip(tr("Flatten Display"));
|
||
|
||
//cb_flat_dsp->setStyleSheet("QCheckBox {color: white; background-color: rgb(80,80,80); selection-color: white; selection-background-color: rgb(80,80,80);}"
|
||
//"QToolTip { color: #000000; background-color: #ffffff; }");
|
||
if (dsty) cb_flat_dsp->setStyleSheet("QCheckBox {color: white; background-color: rgb(80,80,80);selection-color: white; selection-background-color: rgb(80,80,80);}"
|
||
" QToolTip {color: #000000; background-color: #ffffe1;}");
|
||
else cb_flat_dsp->setStyleSheet("QCheckBox {background-color: white; selection-color: black; selection-background-color: white;}"
|
||
" QToolTip {color: #000000; background-color: #ffffe1;}");
|
||
|
||
cb_adle_dsp = new QCheckBox("AF");
|
||
cb_adle_dsp->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
|
||
cb_adle_dsp->setFixedHeight(17);
|
||
connect(cb_adle_dsp, SIGNAL(toggled(bool)), this, SLOT(SetAdleDisplay_VD(bool)));
|
||
cb_adle_dsp->setChecked(true);//2.51 default
|
||
cb_adle_dsp->setToolTip(tr("Auto Flatten Display"));// Auto Adjust Brightnes and Contrast \nIs Not Recommended
|
||
if (dsty) cb_adle_dsp->setStyleSheet("QCheckBox {color: white; background-color: rgb(80,80,80); selection-color: white; selection-background-color: rgb(80,80,80);}"
|
||
" QToolTip {color: #000000; background-color: #ffffe1;}");
|
||
else cb_adle_dsp->setStyleSheet("QCheckBox {background-color: white; selection-color: black; selection-background-color: white;}"
|
||
" QToolTip {color: #000000; background-color: #ffffe1;}");
|
||
|
||
/*s_vdisp_all_speed[0] = 8;//4; //msk144
|
||
s_vdisp_all_speed[1] = 8;//4; //jtms
|
||
s_vdisp_all_speed[2] = 8;//4; //fsk441
|
||
s_vdisp_all_speed[3] = 8;//4;
|
||
s_vdisp_all_speed[4] = 8;//4;
|
||
s_vdisp_all_speed[5] = 8;//4;
|
||
s_vdisp_all_speed[6] = 8;//4; //jt6m
|
||
s_vdisp_all_speed[7] = 8;//4; //jt65a
|
||
s_vdisp_all_speed[8] = 8;//4; //jt65b
|
||
s_vdisp_all_speed[9] = 8;//4; //jt65c
|
||
s_vdisp_all_speed[10] = 8;//4; //pi4
|
||
s_vdisp_all_speed[11] = 9;//5; //ft8 fictive
|
||
s_vdisp_all_speed[12] = 8;//4; //msk144ms
|
||
s_vdisp_all_speed[13] = 9;//5; //ft4 fictive
|
||
s_vdisp_all_speed[14] = 8;//q65a
|
||
s_vdisp_all_speed[15] = 8;//q65b
|
||
s_vdisp_all_speed[16] = 8;//q65c
|
||
s_vdisp_all_speed[17] = 8;//q65d*/
|
||
for (int i = 0; i < COUNT_MODE; ++i) s_vdisp_all_speed[i] = 8;
|
||
s_vdisp_all_speed[11] = 9;//5; //ft8 fictive
|
||
s_vdisp_all_speed[13] = 9;//5; //ft4 fictive
|
||
|
||
SB_VDispSpeed = new HvSpinBox();
|
||
SB_VDispSpeed->setRange(1,9);//1.51 1,9//1,5
|
||
SB_VDispSpeed->setValue(s_vdisp_all_speed[s_mod_ident]);
|
||
SB_VDispSpeed->setFixedHeight(19);//problem hv
|
||
//SB_VDispSpeed->setFixedWidth(79);//125% problem hv
|
||
SB_VDispSpeed->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
|
||
SB_VDispSpeed->setPrefix(tr("Speed")+" ");
|
||
//SB_VDispSpeed->setSuffix(" Hz");
|
||
SB_VDispSpeed->findChild<QLineEdit*>()->setReadOnly(true);
|
||
SB_VDispSpeed->setContextMenuPolicy(Qt::NoContextMenu);
|
||
if (dsty) SB_VDispSpeed->setStyleSheet("QSpinBox {background-color: rgb(80,80,80); selection-color: white; selection-background-color: rgb(80,80,80);}");
|
||
else SB_VDispSpeed->setStyleSheet("QSpinBox {background-color: white; selection-color: black; selection-background-color: white;}");
|
||
|
||
SB_VDispStartFreq = new HvSpinBox();
|
||
SB_VDispStartFreq->setRange(0,3000);//s3000+b2000=5000 max
|
||
SB_VDispStartFreq->setValue(200);
|
||
SB_VDispStartFreq->setFixedHeight(19);//problem hv
|
||
//SB_VDispStartFreq->setFixedWidth(113);//125% problem hv
|
||
SB_VDispStartFreq->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
|
||
SB_VDispStartFreq->setPrefix(tr("Start")+" ");
|
||
SB_VDispStartFreq->setSuffix(" Hz");
|
||
SB_VDispStartFreq->findChild<QLineEdit*>()->setReadOnly(true);
|
||
SB_VDispStartFreq->setContextMenuPolicy(Qt::NoContextMenu);
|
||
if (dsty) SB_VDispStartFreq->setStyleSheet("QSpinBox {background-color: rgb(80,80,80); selection-color: white; selection-background-color: rgb(80,80,80);}");
|
||
else SB_VDispStartFreq->setStyleSheet("QSpinBox {background-color: white; selection-color: black; selection-background-color: white;}");
|
||
SB_VDispStartFreq->setSingleStep(100);
|
||
|
||
SB_VDispBandwidth = new HvSpinBox();
|
||
SB_VDispBandwidth->setRange(2000,5000);//s3000+b2000=5000 max
|
||
SB_VDispBandwidth->setValue(2000);
|
||
SB_VDispBandwidth->setFixedHeight(19);//problem hv
|
||
//SB_VDispBandwidth->setFixedWidth(107);//125% problem hv
|
||
SB_VDispBandwidth->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
|
||
SB_VDispBandwidth->setPrefix("BW ");
|
||
SB_VDispBandwidth->setSuffix(" Hz");
|
||
SB_VDispBandwidth->findChild<QLineEdit*>()->setReadOnly(true);
|
||
SB_VDispBandwidth->setContextMenuPolicy(Qt::NoContextMenu);
|
||
if (dsty) SB_VDispBandwidth->setStyleSheet("QSpinBox {background-color: rgb(80,80,80); selection-color: white; selection-background-color: rgb(80,80,80);}");
|
||
else SB_VDispBandwidth->setStyleSheet("QSpinBox {background-color: white; selection-color: black; selection-background-color: white;}");
|
||
SB_VDispBandwidth->setSingleStep(100);
|
||
|
||
QHBoxLayout *H_bsave = new QHBoxLayout();
|
||
H_bsave->setContentsMargins ( 0, 0, 0, 0);
|
||
H_bsave->setSpacing(0);//1.51 0
|
||
H_bsave->addWidget(SB_VDispSpeed);
|
||
H_bsave->addWidget(SB_VDispStartFreq);
|
||
H_bsave->addWidget(SB_VDispBandwidth);
|
||
H_bsave->addWidget(cb_flat_dsp);
|
||
H_bsave->addWidget(cb_adle_dsp);
|
||
H_bsave->addWidget(pb_save_disp1);
|
||
H_bsave->addWidget(pb_save_disp2);
|
||
SB_VDispSpeed->setHidden(true);
|
||
SB_VDispStartFreq->setHidden(true);
|
||
SB_VDispBandwidth->setHidden(true);
|
||
cb_flat_dsp->setHidden(true);
|
||
cb_adle_dsp->setHidden(true);
|
||
|
||
connect(SB_VDispStartFreq, SIGNAL(valueChanged(int)), this, SLOT(VDispStartBandChanged(int)));
|
||
connect(SB_VDispBandwidth, SIGNAL(valueChanged(int)), this, SLOT(VDispStartBandChanged(int)));
|
||
|
||
//connect(SB_VDispSpeed, SIGNAL(valueChanged(int)), TMsCore, SLOT(SetVDispSpeed(int)));
|
||
connect(SB_VDispSpeed, SIGNAL(valueChanged(int)), this, SLOT(SetVDispSpeed(int)));
|
||
|
||
QVBoxLayout *V_disp = new QVBoxLayout();
|
||
V_disp->setContentsMargins ( 0, 0, 0, 0);
|
||
V_disp->setSpacing(0);
|
||
|
||
V_disp->addWidget(MainDisplay);
|
||
V_disp->addWidget(SecondDisplay);
|
||
V_disp->addLayout(H_bsave);
|
||
//V_disp->setAlignment(SecondDisplay, Qt::AlignHCenter | Qt::AlignTop);
|
||
|
||
QFont f_t = font();
|
||
f_t.setPointSize(7);
|
||
QString strr = "TUNE DISP";//"TUNE DISPLAYS";//TUNE DISPLAYS TUNE DSPLs TUNE DISP
|
||
QVBoxLayout *V_btns_txt_sldr = new QVBoxLayout();
|
||
V_btns_txt_sldr->setContentsMargins ( 0, 0, 0, 0);
|
||
V_btns_txt_sldr->setSpacing(0);
|
||
|
||
//// 2/1 Display //////////
|
||
QPixmap pixmap1(":pic/2d_release.png"); //1d_release.png
|
||
QPixmap pixmap2(":pic/2d_press.png"); //1d_press.png
|
||
QPixmap pixmap3(":pic/1d_release.png"); //2d_release.png
|
||
QPixmap pixmap4(":pic/1d_press.png"); //2d_press.png
|
||
pb_2D_1D = new HvButton_Left4();
|
||
pb_2D_1D->SetupButton_hv(pixmap1, pixmap2, pixmap3, pixmap4, 0, 0);
|
||
connect(pb_2D_1D, SIGNAL(Release_Lift_Button_hv()), this, SLOT(BtSet2D1D()));
|
||
V_btns_txt_sldr->addWidget(pb_2D_1D);
|
||
//V_sldr->setAlignment(pb_2D_1D,Qt::AlignTop);
|
||
|
||
//V_sldr->setAlignment(pb_2D_1D,Qt::AlignTop);
|
||
QPixmap pixmap5(":pic/d1_release.png"); //1d_release.png
|
||
QPixmap pixmap6(":pic/d1_press.png"); //1d_press.png
|
||
QPixmap pixmap7(":pic/d2_release.png"); //2d_release.png
|
||
QPixmap pixmap8(":pic/d2_press.png"); //2d_press.png
|
||
pb_D1_D2 = new HvButton_Left4();
|
||
pb_D1_D2->SetupButton_hv(pixmap5, pixmap6, pixmap7, pixmap8, 0, 0);
|
||
connect(pb_D1_D2, SIGNAL(Release_Lift_Button_hv()), this, SLOT(BtSetD1D2()));
|
||
pb_D1_D2->setHidden(true);
|
||
////END 2/1 Display //////////
|
||
|
||
QVBoxLayout *V_txt_ = new QVBoxLayout();
|
||
V_txt_->setContentsMargins ( 0, 0, 0, 0);
|
||
V_txt_->setSpacing(0);
|
||
for (int i = 0; i<strr.count(); i++)
|
||
{
|
||
QLabel *l_ct = new QLabel((QString)"<font color=white>"+strr.at(i));
|
||
l_ct->setFont(f_t);
|
||
txt_tunedsp.append(l_ct);
|
||
V_txt_->addWidget(txt_tunedsp.at(i));
|
||
V_txt_->setAlignment(txt_tunedsp.at(i),Qt::AlignCenter);// po horizontal
|
||
}
|
||
|
||
connect(FontDialog, SIGNAL(EmitFontApp(QFont)), TDecodeList1, SLOT(SetFontHeader(QFont)));
|
||
connect(FontDialog, SIGNAL(EmitFontApp(QFont)), TDecodeList2, SLOT(SetFontHeader(QFont)));
|
||
connect(FontDialog, SIGNAL(EmitFontApp(QFont)), THvTxW, SLOT(SetFont(QFont)));
|
||
connect(FontDialog, SIGNAL(EmitFontApp(QFont)), this, SLOT(SetFont(QFont)));
|
||
FontDialog->SetDefFont();
|
||
|
||
//V_txt_sldr->addWidget(Slider_Tune_Disp);
|
||
//V_txt_sldr->addWidget(Slider_Cont_Disp);
|
||
V_txt_->setAlignment(Qt::AlignVCenter);
|
||
QVBoxLayout *V_sldr_ = new QVBoxLayout();
|
||
V_sldr_->setContentsMargins ( 0, 0, 0, 0);
|
||
V_sldr_->setSpacing(0);
|
||
V_sldr_->addWidget(Slider_Tune_Disp);
|
||
V_sldr_->addWidget(Slider_Cont_Disp);
|
||
V_sldr_->setAlignment(Qt::AlignVCenter);
|
||
//V_sld_->setAlignment(Qt::AlignBottom);
|
||
|
||
V_btns_txt_sldr->addLayout(V_txt_);
|
||
V_btns_txt_sldr->addLayout(V_sldr_);
|
||
|
||
//V_sldr->setAlignment(Slider_Tune_Disp,Qt::AlignVCenter);
|
||
V_btns_txt_sldr->addWidget(pb_D1_D2);
|
||
//V_sldr->setAlignment(pb_D1_D2,Qt::AlignBottom);
|
||
//V_btns_txt_sldr->setAlignment(Qt::AlignJustify);
|
||
|
||
QHBoxLayout *H_disp_btn_txt_sld = new QHBoxLayout();
|
||
H_disp_btn_txt_sld->setContentsMargins ( 0, 0, 0, 0);
|
||
H_disp_btn_txt_sld->setSpacing(0);
|
||
|
||
//QDockWidget *DW = new QDockWidget("Display");
|
||
//QWidget *Box_dspl = new QWidget();
|
||
Box_dspl = new QWidget();
|
||
//if (dsty) Box_dspl->setStyleSheet("background-color:rgb(30,30,30)");
|
||
Box_dspl->setStyleSheet("background-color:black;");
|
||
//Box_dspl->setFrameShape(QFrame::WinPanel);
|
||
//Box_dspl->setFrameShadow(QFrame::Raised);
|
||
Box_dspl->setLayout(H_disp_btn_txt_sld);
|
||
Box_dspl->setContentsMargins(0,0,0,0);
|
||
|
||
H_disp_btn_txt_sld->addLayout(V_disp);
|
||
//H_disp_sld->setAlignment(V_disp, Qt::AlignRight);
|
||
H_disp_btn_txt_sld->addLayout(V_btns_txt_sldr);
|
||
//H_disp_sld->setAlignment(Slider_Tune_Disp, Qt::AlignLeft);
|
||
//H_disp_sld->setAlignment(Qt::AlignHCenter);
|
||
//DW->setWidget(Box_dspl);
|
||
//DW->setContentsMargins(0,0,0,0);
|
||
//DW->setFixedHeight(160);
|
||
|
||
QHBoxLayout *H_dlist = new QHBoxLayout();
|
||
H_dlist->setContentsMargins ( 0, 0, 0, 0);
|
||
H_dlist->setSpacing(0);
|
||
H_dlist->addWidget(TDecodeList1);
|
||
H_dlist->addWidget(TDecodeList2);
|
||
|
||
QVBoxLayout *V_l = new QVBoxLayout(this);
|
||
setLayout(V_l);
|
||
V_l->setContentsMargins(1,0,1,0);// ( qreal left, qreal top, qreal right, qreal bottom )
|
||
V_l->setSpacing(0);
|
||
V_l->addLayout(H_l);
|
||
//V_l->addWidget(DW);
|
||
V_l->addWidget(Box_dspl);
|
||
V_l->addLayout(H_status);
|
||
V_l->addWidget(W_mod_bt_sw);
|
||
V_l->addLayout(H_dlist);
|
||
V_l->addLayout(H_butons);
|
||
V_l->addWidget(THvTxW);
|
||
|
||
connect(sh_wf, SIGNAL(toggled(bool)), this, SLOT(SetShowHideWf(bool)));
|
||
connect(sh_tx, SIGNAL(toggled(bool)), this, SLOT(SetShowHideTx(bool)));
|
||
|
||
/*offset_hour = 0;
|
||
offset_min = 0;
|
||
offset_t = (offset_hour*3600)+(60*offset_min);*/
|
||
connect(TMsCore, SIGNAL(Refresh_time()), this, SLOT(Refresh()));
|
||
|
||
period_time_sec = 30.0;
|
||
|
||
time_pos_1period = 0;
|
||
time_pos_2period = 0;
|
||
fast_find_period = false;
|
||
connect(THvTxW, SIGNAL(EmitReriodTime(float)), this, SLOT(SetPeriodTime(float)));
|
||
|
||
connect(THvTxW, SIGNAL(StndOutLevel(int)), TMsPlayerHV, SLOT(SetVolume(int)));
|
||
THvTxW->SetInLevel("50");//corect sliders from 100 to 50%
|
||
THvTxW->SetOutLevel("95");//corect sliders from 100 to 95%
|
||
|
||
f_is_moved_to_prev_desk_pos = false;
|
||
|
||
Read_Settings(App_Path+"/settings/ms_settings");
|
||
|
||
/*if(g_ub_m_k3)// Q65 2.57 for drift
|
||
{
|
||
//Mode_m->insertMenu(rb_mode_jt65a,MQ65);
|
||
//cb_1_dec_sig_q65->setVisible(true);
|
||
//cb_auto_clr_avg_afdec->setVisible(true);
|
||
//cb_dec_aft_eme_delay->setVisible(true);
|
||
//cb_max_drift->setVisible(true);
|
||
}*/
|
||
|
||
TAllTxt = new AllTxt(App_Path);
|
||
QDateTime utc_t = getDateTime();
|
||
TAllTxt->ReadAllTxt(utc_t.toString("yyyy_MM"));
|
||
connect(TDecodeList1, SIGNAL(EmitRxAllTxt(QString)), this, SLOT(SetRxAllTxt(QString)));
|
||
|
||
if (!f_is_moved_to_prev_desk_pos) move(x,y); //2.63
|
||
|
||
setAcceptDrops(true);
|
||
f_decoder_busy = false;
|
||
f_tx_busy = false;
|
||
f_de_active = false;//special flag not same as f_decoder_busy
|
||
//qDebug()<<"W_MAIN START";
|
||
}
|
||
Main_Ms::~Main_Ms()
|
||
{
|
||
//// Translation ////
|
||
SaveSS();
|
||
//// end Translation ////
|
||
THvTxW->StopAuto();
|
||
TMsPlayerHV->Stop();
|
||
StopRxGlobal();
|
||
TMsCore->close_sound();
|
||
SaveSettings();//Save_Settings(App_Path+"/settings/ms_settings");
|
||
SetRigTxRx(false);
|
||
THvRigControl->CatStopPttIfClose();//2.38
|
||
usleep(120000);//2.57 =120000 HDSDR=50ms ft991a=10ms
|
||
THvTxW->SetBlockEmitFreqToRig(true); //2.69 no show MA freq restrict QMessageBox at close (DestroyPort())
|
||
THvRigControl->DestroyPort();
|
||
}
|
||
void Main_Ms::StyleChanged(bool)
|
||
{
|
||
QString slang = tr("To change the Style, you need to MANUALLY RESTART MSHV");
|
||
QMessageBox::information(this,"MSHV",slang,QMessageBox::Close);
|
||
}
|
||
//// Translation ////
|
||
void Main_Ms::LangChanged(bool)
|
||
{
|
||
static bool one = false;
|
||
if (one)
|
||
{
|
||
one = false;
|
||
return;
|
||
}
|
||
one = true;
|
||
|
||
const QString slang[COUNT_LANGS] =
|
||
{
|
||
"To change the Language, you need to MANUALLY RESTART MSHV",
|
||
"За да промените Езика, трябва РЪЧНО ДА РЕСТАРТИРАТЕ MSHV",
|
||
"Для смены Языка, необходимо ВРУЧНУЮ ПЕРЕЗАПУСК MSHV",
|
||
"要更改语言, 您需要手动重新启动 MSHV",
|
||
"要更改語言, 您需要手動重新啟動 MSHV",
|
||
"Para cambiar la Lengua, has de REINICIAR MSHV MANUALMENTE", //eses
|
||
"Per canviar l'idioma, has de REINICIAR MSHV MANUALMENT", //caes
|
||
"Para alterar o idioma, terá que REINICIAR MANUALMENTE o MSHV", //ptpt
|
||
"Pentru a schimba limba, trebuie să reporniți manual programul MSHV", //roro
|
||
"For at skifte sprog skal MSHV genstartes MANUELT", //dadk
|
||
"Język zostanie zmieniony po RESTARCIE PROGRAMU", //plpl
|
||
"Pour changer la langue, vous devez REDEMARRER MANUELLEMENT MSHV !", //frfr
|
||
"Para mudar o idioma, é necessário reiniciar manualmente o MSHV", //ptbr
|
||
"For å endre språket må du starte MSHV manuelt på nytt", //nbno
|
||
"Per cambiare il Linguaggio, devi fare un RESTART MANUALE DI MSHV" //itit
|
||
};
|
||
int z = 0;
|
||
for (int i = 0; i < COUNT_LANGS; ++i)
|
||
{
|
||
if (ac_l[i]->isChecked())
|
||
{
|
||
z = i;
|
||
break;
|
||
}
|
||
}
|
||
QMessageBox::information(this,"MSHV",slang[z],QMessageBox::Close);
|
||
}
|
||
void Main_Ms::SaveSS()
|
||
{
|
||
QString langid = "0";
|
||
for (int i = 0; i < COUNT_LANGS; ++i)
|
||
{
|
||
if (ac_l[i]->isChecked())
|
||
{
|
||
langid = QString("%1").arg(i);
|
||
break;
|
||
}
|
||
}
|
||
QFile file(App_Path+"/settings/ms_start");
|
||
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) return;
|
||
QTextStream out(&file);
|
||
out << "def_lang="+langid << "\n";
|
||
out << "def_style=" << QString("%1").arg(ac_dark_st->isChecked()) << "\n";
|
||
file.close();
|
||
}
|
||
//// end Translation ////
|
||
void Main_Ms::SetShowHideWf(bool f)
|
||
{
|
||
if (f) Box_dspl->setHidden(false);
|
||
else Box_dspl->setHidden(true);
|
||
TDecodeList1->HideShowWfTxRefreshList();
|
||
TDecodeList2->HideShowWfTxRefreshList();
|
||
}
|
||
void Main_Ms::SetShowHideTx(bool f)
|
||
{
|
||
if (f) THvTxW->setHidden(false);
|
||
else THvTxW->setHidden(true);
|
||
TDecodeList1->HideShowWfTxRefreshList();
|
||
TDecodeList2->HideShowWfTxRefreshList();
|
||
}
|
||
void Main_Ms::SetFlatDisplay_VD(bool f)
|
||
{
|
||
if (f && cb_adle_dsp->isChecked()) cb_adle_dsp->setChecked(false);
|
||
MainDisplay->SetFlatDisplay_VD(f);
|
||
}
|
||
void Main_Ms::SetAdleDisplay_VD(bool f)
|
||
{
|
||
if (f && cb_flat_dsp->isChecked()) cb_flat_dsp->setChecked(false);
|
||
MainDisplay->SetAdleDisplay_VD(f);
|
||
}
|
||
void Main_Ms::SetThrLevel(bool)
|
||
{
|
||
//static int p_rb_id = -1;
|
||
for (int i = 0; i < 6; ++i)
|
||
{
|
||
if (rb_thr[i]->isChecked())
|
||
{
|
||
//if (p_rb_id == i) break;
|
||
//p_rb_id = i;
|
||
TDecoderMs->SetThrLevel(i+1); //qDebug()<<"Mode="<<s_mod_ident<<"Threads="<<i+1;
|
||
thr_all[s_mod_ident] = i+1;
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
void Main_Ms::SetDLogQso(bool)
|
||
{
|
||
if (Direct_log_qso->isChecked()) Prompt_log_qso->setChecked(false);
|
||
THvTxW->SetDPLogQso(Direct_log_qso->isChecked(),Prompt_log_qso->isChecked());
|
||
}
|
||
void Main_Ms::SetPLogQso(bool)
|
||
{
|
||
if (Prompt_log_qso->isChecked()) Direct_log_qso->setChecked(false);
|
||
THvTxW->SetDPLogQso(Direct_log_qso->isChecked(),Prompt_log_qso->isChecked());
|
||
}
|
||
void Main_Ms::SetStaticTxFrq(bool f,int val) //from rig control
|
||
{
|
||
s_static_tx_frq = val; //qDebug()<<"1= rig contr"<<s_mod_ident<<f<<val;
|
||
f_static_tx = f;
|
||
SetTxFreq_p();
|
||
}
|
||
void Main_Ms::SetTxFreq(double val) //from main disp
|
||
{
|
||
s_v_disp_tx_frq = val; //qDebug()<<"2= from main disp"<<s_mod_ident<<val;
|
||
SetTxFreq_p();
|
||
}
|
||
void Main_Ms::SetTxFreq_p() //tx freq from display and static
|
||
{
|
||
static double prv_f0 = -1.0;
|
||
if (s_mod_ident==11 || s_mod_ident==13 || allq65) //modes with static and variable TX freq
|
||
{
|
||
double f = s_v_disp_tx_frq;
|
||
if (f_static_tx) f = (double)s_static_tx_frq;
|
||
if (prv_f0 != f)
|
||
{
|
||
prv_f0 = f;
|
||
TMsPlayerHV->SetTxFreq(f); //qDebug()<<"Main_TMsPlayerHV->SetTxFreq="<<s_mod_ident<<f_static_tx<<f;
|
||
}
|
||
}
|
||
}
|
||
void Main_Ms::RefreshWindowTitle()
|
||
{
|
||
QString band; //qDebug()<<"Main_TMsPlayerHV->SetTxFreq=================="<<s_mod_ident;
|
||
for (int i = 0; i<COUNT_BANDS; ++i)
|
||
{
|
||
if (ListBands.at(i)->isChecked())
|
||
{
|
||
band = lst_bands[i];
|
||
break;
|
||
}
|
||
}
|
||
QString str_t = APP_NAME;
|
||
str_t.insert(4," "+band);
|
||
if (s_mod_ident == 0 || s_mod_ident == 11 || s_mod_ident == 13 || allq65)
|
||
{
|
||
QString str_t2 = "";
|
||
if (s_contest_name != "None" && s_contest_name != "EU RSQ And Serial Number")
|
||
str_t2 = " - "+s_contest_name+s_trmN+" -";
|
||
if (s_mod_ident == 11 || s_mod_ident == 13 || allq65)
|
||
{
|
||
if (Multi_answer_mod->isChecked())
|
||
str_t2 = " - "+tr("MA DXpedition")+" -";
|
||
else if (Multi_answer_mod_std->isChecked() && str_t2.isEmpty())
|
||
str_t2 = " - "+tr("MA Standard")+" -";
|
||
}
|
||
str_t.append(str_t2);
|
||
}
|
||
setWindowTitle(str_t);
|
||
}
|
||
void Main_Ms::RefreshCbCfm73()
|
||
{
|
||
if ((s_mod_ident == 11 || s_mod_ident == 13 || allq65) && !Multi_answer_mod->isChecked())
|
||
ac_Cfm73->setEnabled(true);
|
||
else
|
||
ac_Cfm73->setEnabled(false);
|
||
}
|
||
void Main_Ms::SetMultiAnswerMod(bool f)
|
||
{
|
||
if (f) Multi_answer_mod_std->setChecked(false);
|
||
|
||
if (Multi_answer_mod->isChecked())//2.51 enable AP MASTD All || Multi_answer_mod_std->isChecked()
|
||
TDecoderMs->SetMultiAnswerMod(true);
|
||
else
|
||
TDecoderMs->SetMultiAnswerMod(false);
|
||
|
||
THvTxW->SetMultiAnswerMod(Multi_answer_mod->isChecked(),Multi_answer_mod_std->isChecked());
|
||
RefreshWindowTitle();
|
||
RefreshCbCfm73();
|
||
}
|
||
void Main_Ms::SetMultiAnswerModStd(bool f)
|
||
{
|
||
if (f) Multi_answer_mod->setChecked(false);
|
||
|
||
if (Multi_answer_mod->isChecked())//2.51 enable AP MASTD All || Multi_answer_mod_std->isChecked()
|
||
TDecoderMs->SetMultiAnswerMod(true);
|
||
else
|
||
TDecoderMs->SetMultiAnswerMod(false);
|
||
|
||
THvTxW->SetMultiAnswerMod(Multi_answer_mod->isChecked(),Multi_answer_mod_std->isChecked());
|
||
RefreshWindowTitle();
|
||
RefreshCbCfm73();
|
||
}
|
||
void Main_Ms::SetMacros(int contest_id,QString trmN_stdC)//2.15
|
||
{
|
||
if (contest_id == 0)// 0 standard
|
||
{
|
||
g_block_mam = false;
|
||
Multi_answer_mod->setEnabled(true);
|
||
Multi_answer_mod_std->setEnabled(true); //ac_use_queue_cont->setEnabled(false);//2.60 not correct
|
||
}
|
||
else //for future if(contest_id == 2 || contest_id == 3 || contest_id == 4 || contest_id == 5)
|
||
{
|
||
if (!g_ub_m_k)
|
||
{
|
||
g_block_mam = true;
|
||
Multi_answer_mod->setEnabled(false);
|
||
Multi_answer_mod->setChecked(false);
|
||
Multi_answer_mod_std->setEnabled(false);
|
||
Multi_answer_mod_std->setChecked(false);
|
||
} //ac_use_queue_cont->setEnabled(true);//2.60 not correct
|
||
}//THvTxW->SetMacros(l,contest_id,s,trmN);
|
||
|
||
s_contest_name = s_cont_name[contest_id];
|
||
s_trmN = "";
|
||
if (trmN_stdC.at(0)=='1') s_trmN = ", Run 1"; //2.61
|
||
if (trmN_stdC.at(0)=='2') s_trmN = ", Run 2";
|
||
if (s_mod_ident==12 || s_mod_ident==0 || s_mod_ident==11 || s_mod_ident==13 || allq65)
|
||
{
|
||