Say how many QTCs are left with the station being worked

WAE gives a point for every QTC line, so an operator needs to know what is
still there to exchange. The entry window now carries N1MM's QTCinfo line in
WAE: how many QTC lines have already gone with the station in the callsign
box, how many more may go, and how many contacts are left to report to
anybody. The QTC window shows the same line.

The numbers come from the log rows, the way N1MM works them out:

- exchanged is every QTC row with that call, both directions and all bands,
  and ten is the lot
- available is every contact not reported to anybody yet, without the dupes
  and without the station itself, which is N1MM's QTCRecordsetCount
- what is left with the station is what is free of its ten, and no more than
  the contacts there are to report when we are the one reporting

Europe on CW and SSB only takes traffic down, so its line leaves the last
number out, as N1MM's does.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0157i7PiZyqBkquxS9A6FTdQ
This commit is contained in:
2026-09-10 19:30:25 +00:00
co-authored by Claude Opus 5
parent 00bbb0e6b3
commit 3e326053a0
6 changed files with 223 additions and 13 deletions
@@ -6,6 +6,7 @@ using Avalonia.Layout;
using Avalonia.Media;
using Avalonia.Threading;
using Nonemm.Contests;
using Nonemm.Contests.Rules;
using Nonemm.Core;
using Nonemm.App.Theming;
using Nonemm.Session;
@@ -799,6 +800,7 @@ public sealed partial class EntryWindow : Window
Title = TitleLine();
ShowCallFrame();
PathText.Text = PathLine();
ShowQtcInfo();
UserTextText.Text = Logging.Session.History.Find(Logging.Entry.Call)?.UserText ?? "";
ShowLights();
@@ -950,6 +952,24 @@ public sealed partial class EntryWindow : Window
+ $"{path.DistanceKm:N0} km · {path.DistanceKm * MilesPerKilometre:N0} mi{sun}";
}
/// WAE's QTC tally for the station being worked, which N1MM keeps in a
/// blue label under the entry boxes: how many lines have gone with it, how
/// many more may go, and how many contacts are left to report to anybody.
/// The line is only there in WAE, because no other contest has traffic.
private void ShowQtcInfo()
{
if (Logging is null || Logging.Contest is not Wae)
{
QtcInfoText.IsVisible = false;
return;
}
string call = Logging.Entry.Call.Trim();
QtcCounts counts = new QtcTraffic(Logging)
.CountsFor(Callsign.Parse(call.Length >= 3 ? call : ""));
QtcInfoText.Text = counts.IsFull ? $"{counts.Text} — at the limit" : counts.Text;
QtcInfoText.IsVisible = true;
}
/// A blank line where a bearing should be is a puzzle. This says which of
/// the two ends could not be placed and what to do about it.
private string WhyNoPath()