Bewars: displayWidgets() stuff is not yet complete!

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8343 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2017-12-18 21:50:00 +00:00
parent e94eb37ddc
commit 71a395c1c2
2 changed files with 12 additions and 10 deletions

View File

@ -899,7 +899,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
splashTimer.setSingleShot (true); splashTimer.setSingleShot (true);
splashTimer.start (20 * 1000); splashTimer.start (20 * 1000);
/*
if(m_config.my_callsign()=="K1JT" or m_config.my_callsign()=="K9AN" or if(m_config.my_callsign()=="K1JT" or m_config.my_callsign()=="K9AN" or
m_config.my_callsign()=="G4WJS" || m_config.my_callsign () == "W9XYZ") { m_config.my_callsign()=="G4WJS" || m_config.my_callsign () == "W9XYZ") {
ui->actionWSPR_LF->setEnabled(true); ui->actionWSPR_LF->setEnabled(true);
@ -911,7 +911,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
"Please use WSJT-X v1.8.0\n", errorMsg); "Please use WSJT-X v1.8.0\n", errorMsg);
Q_EMIT finished (); Q_EMIT finished ();
} }
*/
if(!ui->cbMenus->isChecked()) { if(!ui->cbMenus->isChecked()) {
ui->cbMenus->setChecked(true); ui->cbMenus->setChecked(true);
@ -4790,22 +4790,24 @@ void MainWindow::acceptQSO2(QDateTime const& QSO_date_off, QString const& call,
m_dateTimeQSOOn = QDateTime {}; m_dateTimeQSOOn = QDateTime {};
} }
int MainWindow::nWidgets(QString t) qint64 MainWindow::nWidgets(QString t)
{ {
// qDebug() << t << N_WIDGETS << t.length();
Q_ASSERT(t.length()==N_WIDGETS); Q_ASSERT(t.length()==N_WIDGETS);
int n=0; qint64 n=0;
for(int i=0; i<N_WIDGETS; i++) { for(int i=0; i<N_WIDGETS; i++) {
n=n + n + t.mid(i,1).toInt(); n=n + n + t.mid(i,1).toInt();
} }
return n; return n;
} }
void MainWindow::displayWidgets(int n) void MainWindow::displayWidgets(qint64 n)
{ {
int j=1<<(N_WIDGETS-1); qint64 j=qint64(1)<<(N_WIDGETS-1);
bool b; bool b;
for(int i=0; i<N_WIDGETS; i++) { for(int i=0; i<N_WIDGETS; i++) {
b=(n&j) != 0; b=(n&j) != 0;
// qDebug() << i << j << (n&j) << b;
if(i==0) ui->txFirstCheckBox->setVisible(b); if(i==0) ui->txFirstCheckBox->setVisible(b);
if(i==1) ui->TxFreqSpinBox->setVisible(b); if(i==1) ui->TxFreqSpinBox->setVisible(b);
if(i==2) ui->RxFreqSpinBox->setVisible(b); if(i==2) ui->RxFreqSpinBox->setVisible(b);

View File

@ -49,7 +49,7 @@
#define NUM_FT8_SYMBOLS 79 #define NUM_FT8_SYMBOLS 79
#define NUM_CW_SYMBOLS 250 #define NUM_CW_SYMBOLS 250
#define TX_SAMPLE_RATE 48000 #define TX_SAMPLE_RATE 48000
#define N_WIDGETS 27 #define N_WIDGETS 32
extern int volatile itone[NUM_ISCAT_SYMBOLS]; //Audio tones for all Tx symbols extern int volatile itone[NUM_ISCAT_SYMBOLS]; //Audio tones for all Tx symbols
extern int volatile icw[NUM_CW_SYMBOLS]; //Dits for CW ID extern int volatile icw[NUM_CW_SYMBOLS]; //Dits for CW ID
@ -669,8 +669,8 @@ private:
void remove_child_from_event_filter (QObject *); void remove_child_from_event_filter (QObject *);
void setup_status_bar (bool vhf); void setup_status_bar (bool vhf);
void tx_watchdog (bool triggered); void tx_watchdog (bool triggered);
int nWidgets(QString t); qint64 nWidgets(QString t);
void displayWidgets(int n); void displayWidgets(qint64 n);
void vhfWarning(); void vhfWarning();
QChar current_submode () const; // returns QChar {0} if sub mode is QChar current_submode () const; // returns QChar {0} if sub mode is
// not appropriate // not appropriate