Unified STATUS and HB flags for better visibility.
This commit is contained in:
		
							parent
							
								
									de2d1dcf8d
								
							
						
					
					
						commit
						a46035fa86
					
				@ -6820,7 +6820,14 @@ void MainWindow::buildRepeatMenu(QMenu *menu, QPushButton * button, int * interv
 | 
			
		||||
void MainWindow::sendHeartbeat(){
 | 
			
		||||
    QString mycall = m_config.my_callsign();
 | 
			
		||||
    QString mygrid = m_config.my_grid().left(4);
 | 
			
		||||
    QString message = QString("%1: HB %2").arg(mycall).arg(mygrid).trimmed();
 | 
			
		||||
 | 
			
		||||
    QStringList parts;
 | 
			
		||||
 | 
			
		||||
    parts.append(QString("%1: HB").arg(mycall));
 | 
			
		||||
    parts.append(generateStatusFlags());
 | 
			
		||||
    parts.append(mygrid);
 | 
			
		||||
 | 
			
		||||
    QString message = parts.join(" ").trimmed();
 | 
			
		||||
 | 
			
		||||
    auto f = m_config.heartbeat_anywhere() ? -1 : findFreeFreqOffset(500, 1000, 50);
 | 
			
		||||
 | 
			
		||||
@ -9415,19 +9422,26 @@ QString MainWindow::generateStatus() {
 | 
			
		||||
    QString lastActiveString = since(lastActive).toUpper().replace("NOW", "0M");
 | 
			
		||||
 | 
			
		||||
    QStringList status;
 | 
			
		||||
    status.append(generateStatusFlags());
 | 
			
		||||
 | 
			
		||||
    if(!lastActiveString.isEmpty()){
 | 
			
		||||
        status.append(lastActiveString);
 | 
			
		||||
        status.append(lastActiveString.trimmed());
 | 
			
		||||
    }
 | 
			
		||||
    if(ui->autoReplyButton->isChecked()) status.append("AUTO");
 | 
			
		||||
    if(ui->hbMacroButton->isChecked() && m_hbInterval > 0) status.append("HB");
 | 
			
		||||
    if(ui->spotButton->isChecked()) status.append("SPOT");
 | 
			
		||||
    if(!m_config.relay_off()) status.append("RELAY");
 | 
			
		||||
 | 
			
		||||
    status.append("V" + version().replace("-devel", "").replace("-rc", ""));
 | 
			
		||||
 | 
			
		||||
    return status.join(" ").trimmed();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QStringList MainWindow::generateStatusFlags() {
 | 
			
		||||
    QStringList flags;
 | 
			
		||||
    if(ui->hbMacroButton->isChecked() && m_hbInterval > 0) flags.append("HB");
 | 
			
		||||
    if(ui->autoReplyButton->isChecked()) flags.append("AUTO");
 | 
			
		||||
    if(!m_config.relay_off()) flags.append("RELAY");
 | 
			
		||||
    if(ui->spotButton->isChecked()) flags.append("SPOT");
 | 
			
		||||
    return flags;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void MainWindow::processCommandActivity() {
 | 
			
		||||
#if 0
 | 
			
		||||
    if (!m_txFrameQueue.isEmpty()) {
 | 
			
		||||
 | 
			
		||||
@ -947,6 +947,7 @@ private:
 | 
			
		||||
  void processCompoundActivity();
 | 
			
		||||
  void processBufferedActivity();
 | 
			
		||||
  QString generateStatus();
 | 
			
		||||
  QStringList generateStatusFlags();
 | 
			
		||||
  void processCommandActivity();
 | 
			
		||||
  QString inboxPath();
 | 
			
		||||
  void refreshInboxCounts();
 | 
			
		||||
 | 
			
		||||
@ -1117,6 +1117,9 @@ QTextEdit[transmitting="true"] {
 | 
			
		||||
         <number>6</number>
 | 
			
		||||
        </property>
 | 
			
		||||
        <widget class="QTextBrowser" name="callDetailTextBrowser">
 | 
			
		||||
         <property name="visible">
 | 
			
		||||
           <bool>false</bool>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="frameShape">
 | 
			
		||||
          <enum>QFrame::Box</enum>
 | 
			
		||||
         </property>
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										11
									
								
								varicode.cpp
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								varicode.cpp
									
									
									
									
									
								
							@ -123,7 +123,7 @@ QRegularExpression directed_re("^"                    +
 | 
			
		||||
                               optional_cmd_pattern   +
 | 
			
		||||
                               optional_num_pattern);
 | 
			
		||||
 | 
			
		||||
QRegularExpression heartbeat_re(R"(^\s*(?<type>CQCQCQ|CQ QRPP?|CQ DX|CQ TEST|CQ( CQ){0,2}|HB)(?:\s(?<grid>[A-R]{2}[0-9]{2}))?\b)");
 | 
			
		||||
QRegularExpression heartbeat_re(R"(^\s*(?<type>CQCQCQ|CQ QRPP?|CQ DX|CQ TEST|CQ( CQ){0,2}|HB( AUTO)?( RELAY)?( SPOT)?)(?:\s(?<grid>[A-R]{2}[0-9]{2}))?\b)");
 | 
			
		||||
 | 
			
		||||
QRegularExpression compound_re("^\\s*[`]"              +
 | 
			
		||||
                               callsign_pattern        +
 | 
			
		||||
@ -206,8 +206,13 @@ QMap<quint32, QString> cqs = {
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
QMap<quint32, QString> hbs = {
 | 
			
		||||
    { 0, "HB"  }, // HB ACTIVE
 | 
			
		||||
    { 1, "HB"  }, // HB IDLE
 | 
			
		||||
    { 0, "HB"  },                 // HB
 | 
			
		||||
    { 1, "HB AUTO"  },            // HB AUTO
 | 
			
		||||
    { 2, "HB AUTO RELAY"  },      // HB AUTO RELAY
 | 
			
		||||
    { 3, "HB AUTO RELAY SPOT"  }, // HB AUTO RELAY SPOT
 | 
			
		||||
    { 4, "HB RELAY"  },           // HB      RELAY
 | 
			
		||||
    { 5, "HB RELAY SPOT"  },      // HB      RELAY SPOT
 | 
			
		||||
    { 6, "HB SPOT"  },            // HB            SPOT
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user