Summary
Connect all DX Assistant components inside MainWindow. Currently the DXClusterAssistant action and instance are commented out (lines ~2681–2684 and ~873–875 in mainwindow.cpp). This issue activates them and wires the full signal/slot pipeline.
New members in mainwindow.h
std::unique_ptr<DXClusterAssistant> dxClusterAssistant;
DXAssistantEngine *dxAssistantEngine = nullptr;
ClubLogMostWanted *clubLogMostWanted = nullptr;
QString myContinent; // derived once at startup
QAction *dxClusterAssistantAct = nullptr;
Startup sequence (in init() / startServices())
myContinent = world->getQRZContinentShortName(stationCallsign)
- Instantiate
ClubLogMostWanted (if enabled in settings); call fetch()
- Instantiate
DXAssistantEngine with &awards, world, dataProxy, clubLogMostWanted, myContinent
- Lazy-instantiate
DXClusterAssistant (created on first slotShowDXClusterAssistant() call, same pattern as StatisticsWidget)
Signal connections
// New cluster spot → score it → feed to assistant
connect(dxClusterWidget.get(), &DXClusterWidget::dxspotArrived,
this, &MainWindow::slotDXAssistantNewSpot);
// New QSO logged → recalculate all spot scores
connect(&awards, &Awards::awardDXCCUpdated,
this, &MainWindow::slotDXAssistantRecalculate);
// ClubLog most-wanted list refreshed → recalculate
connect(clubLogMostWanted, &ClubLogMostWanted::mostWantedUpdated,
this, &MainWindow::slotDXAssistantRecalculate);
// User activates a spot → tune radio + fill QSO entry form
connect(dxClusterAssistant.get(), &DXClusterAssistant::spotTuneRequested,
this, &MainWindow::slotDXAssistantSpotTuneRequested);
New slots
// Called for every arriving DXCluster spot
void MainWindow::slotDXAssistantNewSpot(const DXSpot &spot)
{
if (!dxClusterAssistant) return;
DXAssistantSpot scored = dxAssistantEngine->score(spot);
if (scored.score >= 0) // score == -1 means discard (confirmed / invalid)
dxClusterAssistant->addOrUpdateSpot(scored);
}
// Called after Awards update or ClubLog list refresh
void MainWindow::slotDXAssistantRecalculate()
{
if (dxClusterAssistant)
dxClusterAssistant->recalculateAll();
}
// Called when user double-clicks or context-menu "tunes" to a spot
void MainWindow::slotDXAssistantSpotTuneRequested(const DXAssistantSpot &spot)
{
clusterSpotToLog(spot.dxCall, spot.freq);
}
// Lazy show/hide
void MainWindow::slotShowDXClusterAssistant()
{
if (!dxClusterAssistant) {
dxClusterAssistant = std::make_unique<DXClusterAssistant>(
&awards, world, dataProxy, Q_FUNC_INFO, this);
dxClusterAssistant->init();
// re-connect spotTuneRequested here
}
dxClusterAssistant->show();
dxClusterAssistant->raise();
}
Tools menu
Uncomment and complete (currently commented at lines ~2681–2684):
dxClusterAssistantAct = new QAction(tr("DX Assistant"), this);
dxClusterAssistantAct->setToolTip(tr("Show the DX Assistant — prioritised list of workable spots."));
toolMenu->addAction(dxClusterAssistantAct);
connect(dxClusterAssistantAct, &QAction::triggered,
this, &MainWindow::slotShowDXClusterAssistant);
Settings guard
All wiring is conditional on DXAssistant/enabled in QSettings. If disabled, the menu action is hidden and no signals are connected.
Files affected
src/mainwindow.h — new members, new slots
src/mainwindow.cpp — implement slots, connect signals, uncomment menu action
src/CMakeLists.txt (or equivalent) — add new source files to build if not already included
Related
Part of the DX Assistant feature. Requires the widget redesign, scoring engine, and ClubLogMostWanted issues to be completed first.
Summary
Connect all DX Assistant components inside
MainWindow. Currently theDXClusterAssistantaction and instance are commented out (lines ~2681–2684 and ~873–875 inmainwindow.cpp). This issue activates them and wires the full signal/slot pipeline.New members in
mainwindow.hStartup sequence (in
init()/startServices())myContinent = world->getQRZContinentShortName(stationCallsign)ClubLogMostWanted(if enabled in settings); callfetch()DXAssistantEnginewith&awards,world,dataProxy,clubLogMostWanted,myContinentDXClusterAssistant(created on firstslotShowDXClusterAssistant()call, same pattern asStatisticsWidget)Signal connections
New slots
Tools menu
Uncomment and complete (currently commented at lines ~2681–2684):
Settings guard
All wiring is conditional on
DXAssistant/enabledinQSettings. If disabled, the menu action is hidden and no signals are connected.Files affected
src/mainwindow.h— new members, new slotssrc/mainwindow.cpp— implement slots, connect signals, uncomment menu actionsrc/CMakeLists.txt(or equivalent) — add new source files to build if not already includedRelated
Part of the DX Assistant feature. Requires the widget redesign, scoring engine, and ClubLogMostWanted issues to be completed first.