Added call detail tooltip into the call activity
This commit is contained in:
parent
c75b21b0b5
commit
aae1c20f12
@ -7709,14 +7709,7 @@ void MainWindow::on_tableWidgetRXAll_selectionChanged(const QItemSelection &/*se
|
|||||||
ui->extFreeTextMsgEdit->setPlaceholderText(placeholderText);
|
ui->extFreeTextMsgEdit->setPlaceholderText(placeholderText);
|
||||||
|
|
||||||
#if JS8CALL_SHOW_CALL_DETAIL_BROWSER
|
#if JS8CALL_SHOW_CALL_DETAIL_BROWSER
|
||||||
// heard detail
|
auto html = generateCallDetail(selectedCall);
|
||||||
QString hearing = m_heardGraphOutgoing.value(selectedCall).values().join(", ");
|
|
||||||
QString heardby = m_heardGraphIncoming.value(selectedCall).values().join(", ");
|
|
||||||
auto html = selectedCall.isEmpty() || selectedCall.contains("@") ? "" : (
|
|
||||||
QString("<h1>%1</h1>").arg(selectedCall.toHtmlEscaped()) +
|
|
||||||
QString("<p><strong>HEARING</strong>: %1</p>").arg(hearing.toHtmlEscaped()) +
|
|
||||||
QString("<p><strong>HEARD BY</strong>: %1</p>").arg(heardby.toHtmlEscaped())
|
|
||||||
);
|
|
||||||
ui->callDetailTextBrowser->setHtml(html);
|
ui->callDetailTextBrowser->setHtml(html);
|
||||||
ui->callDetailTextBrowser->setVisible(!selectedCall.isEmpty() && (!hearing.isEmpty() || !heardby.isEmpty()));
|
ui->callDetailTextBrowser->setVisible(!selectedCall.isEmpty() && (!hearing.isEmpty() || !heardby.isEmpty()));
|
||||||
#endif
|
#endif
|
||||||
@ -7726,6 +7719,23 @@ void MainWindow::on_tableWidgetRXAll_selectionChanged(const QItemSelection &/*se
|
|||||||
updateTextDisplay();
|
updateTextDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString MainWindow::generateCallDetail(QString selectedCall){
|
||||||
|
if(selectedCall.isEmpty() || selectedCall.contains("@")){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// heard detail
|
||||||
|
QString hearing = m_heardGraphOutgoing.value(selectedCall).values().join(", ");
|
||||||
|
QString heardby = m_heardGraphIncoming.value(selectedCall).values().join(", ");
|
||||||
|
QStringList detail = {
|
||||||
|
QString("<h1>%1</h1>").arg(selectedCall.toHtmlEscaped()),
|
||||||
|
QString("<p><strong>HEARING</strong>: %1</p>").arg(hearing.toHtmlEscaped()),
|
||||||
|
QString("<p><strong>HEARD BY</strong>: %1</p>").arg(heardby.toHtmlEscaped()),
|
||||||
|
};
|
||||||
|
|
||||||
|
return detail.join("\n");
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_tableWidgetCalls_cellClicked(int /*row*/, int /*col*/){
|
void MainWindow::on_tableWidgetCalls_cellClicked(int /*row*/, int /*col*/){
|
||||||
ui->tableWidgetRXAll->selectionModel()->select(
|
ui->tableWidgetRXAll->selectionModel()->select(
|
||||||
ui->tableWidgetRXAll->selectionModel()->selection(),
|
ui->tableWidgetRXAll->selectionModel()->selection(),
|
||||||
@ -10564,6 +10574,7 @@ void MainWindow::displayCallActivity() {
|
|||||||
|
|
||||||
auto displayItem = new QTableWidgetItem(displayCall);
|
auto displayItem = new QTableWidgetItem(displayCall);
|
||||||
displayItem->setData(Qt::UserRole, QVariant(d.call));
|
displayItem->setData(Qt::UserRole, QVariant(d.call));
|
||||||
|
displayItem->setToolTip(generateCallDetail(displayCall));
|
||||||
|
|
||||||
ui->tableWidgetCalls->setItem(row, col++, displayItem);
|
ui->tableWidgetCalls->setItem(row, col++, displayItem);
|
||||||
|
|
||||||
|
@ -314,6 +314,7 @@ private slots:
|
|||||||
void on_tableWidgetRXAll_cellClicked(int row, int col);
|
void on_tableWidgetRXAll_cellClicked(int row, int col);
|
||||||
void on_tableWidgetRXAll_cellDoubleClicked(int row, int col);
|
void on_tableWidgetRXAll_cellDoubleClicked(int row, int col);
|
||||||
void on_tableWidgetRXAll_selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
void on_tableWidgetRXAll_selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
||||||
|
QString generateCallDetail(QString selectedCall);
|
||||||
void on_tableWidgetCalls_cellClicked(int row, int col);
|
void on_tableWidgetCalls_cellClicked(int row, int col);
|
||||||
void on_tableWidgetCalls_cellDoubleClicked(int row, int col);
|
void on_tableWidgetCalls_cellDoubleClicked(int row, int col);
|
||||||
void on_tableWidgetCalls_selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
void on_tableWidgetCalls_selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
||||||
|
Loading…
Reference in New Issue
Block a user